[
https://issues.jboss.org/browse/TEIIDDES-2089?page=com.atlassian.jira.plu...
]
Barry LaFond edited comment on TEIIDDES-2089 at 3/21/14 9:32 AM:
-----------------------------------------------------------------
Here is the code that throws the exception ...
{code:title=DdlImporter}
public void setModelFolder(String modelFolderName ) {
modelFolder = null;
//chgProcessor = null;
if (modelFolderName == null) throw new
EmptyArgumentException("modelFolderName"); //$NON-NLS-1$
modelFolderName = modelFolderName.trim();
IPath modelFolderPath = Path.fromPortableString(modelFolderName).makeAbsolute();
if (modelFolderName.isEmpty() || modelFolderPath.segmentCount() == 0) throw new
EmptyArgumentException("modelFolderName"); //$NON-NLS-1$
// Verify project is valid
String projectName = modelFolderPath.segment(0);
IWorkspace workspace = ModelerCore.getWorkspace();
IWorkspaceRoot root = workspace.getRoot();
if (root.findMember(projectName) != null) {
boolean found = false;
for (IProject project : projects)
if (projectName.equals(project.getName())) {
found = true;
break;
}
if (!found) throw new
IllegalArgumentException(DdlImporterI18n.MODEL_FOLDER_IN_NON_MODEL_PROJECT_MSG);
}
{code}
was (Author: blafond):
Here is the code that throws the exception ...
{code:title=DdlImporter}
public void setModelFolder(String modelFolderName ) {
modelFolder = null;
//chgProcessor = null;
if (modelFolderName == null) throw new
EmptyArgumentException("modelFolderName"); //$NON-NLS-1$
modelFolderName = modelFolderName.trim();
IPath modelFolderPath = Path.fromPortableString(modelFolderName).makeAbsolute();
if (modelFolderName.isEmpty() || modelFolderPath.segmentCount() == 0) throw new
EmptyArgumentException("modelFolderName"); //$NON-NLS-1$
// Verify project is valid
String projectName = modelFolderPath.segment(0);
IWorkspace workspace = ModelerCore.getWorkspace();
IWorkspaceRoot root = workspace.getRoot();
if (root.findMember(projectName) != null) {
boolean found = false;
for (IProject project : projects)
if (projectName.equals(project.getName())) {
found = true;
break;
}
if (!found) throw new
IllegalArgumentException(DdlImporterI18n.MODEL_FOLDER_IN_NON_MODEL_PROJECT_MSG);
}
// Verify folder is valid
if (!workspace.validatePath(modelFolderPath.toString(), IResource.PROJECT |
IResource.FOLDER).isOK()) throw new IllegalArgumentException(
{code}
Teiid connection import throws
"java.lang.IllegalArgumentException: The supplied model folder refers to an existing
non-model project" on Windows
-------------------------------------------------------------------------------------------------------------------------------------------------
Key: TEIIDDES-2089
URL:
https://issues.jboss.org/browse/TEIIDDES-2089
Project: Teiid Designer
Issue Type: Bug
Affects Versions: 8.3.2
Reporter: Lucie Fabrikova
Import-> Teiid designer -> Teiid connection >> source model:
Next button doesn't move to next page of wizard on Windows (both 7, XP), but throws
following exception in error log:
java.lang.IllegalArgumentException: The supplied model folder refers to an existing
non-model project.
at org.teiid.designer.ddl.importer.DdlImporter.setModelFolder(DdlImporter.java:344)
at
org.teiid.designer.teiidimporter.ui.wizard.TeiidImportManager.setTargetModelLocation(TeiidImportManager.java:433)
at
org.teiid.designer.teiidimporter.ui.wizard.TeiidImportWizard.init(TeiidImportWizard.java:134)
at
org.eclipse.ui.internal.dialogs.WorkbenchWizardNode.getWizard(WorkbenchWizardNode.java:185)
at
org.eclipse.jface.wizard.WizardSelectionPage.getNextPage(WizardSelectionPage.java:104)
at
org.eclipse.ui.internal.dialogs.WorkbenchWizardSelectionPage.getNextPage(WorkbenchWizardSel
...
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira