- This topic has 2 replies, 3 voices, and was last updated 19 years, 2 months ago by shari.
-
AuthorPosts
-
Paulo NevesMemberHi,
When I do reverse engineer UML from java I obtain following error:
Creation of element failed
String index out of range: -2My system information:
OS: WinXP
Eclipse: 3.1.0
MyEclipse: 4.0.0 build 20050829-4.0.0-GA
Fresh installation (eclipse and myeclipse)log error:
!SESSION 2005-09-01 09:31:02.166 ----------------------------------------------- eclipse.buildId=I20050627-1435 java.version=1.4.2_03 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=pt_BR Command-line arguments: -os win32 -ws win32 -arch x86 -data D:\workspace\projects\ !ENTRY org.eclipse.jdt.ui 4 10001 2005-09-01 09:37:43.307 !MESSAGE Internal Error !STACK 0 java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:357) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:291) at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:830) at com.genuitec.eclipse.core.portability.NewElementWizard.performFinish(Unknown Source) at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:676) at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:349) at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:556) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3080) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2713) at org.eclipse.jface.window.Window.runEventLoop(Window.java:809) at org.eclipse.jface.window.Window.open(Window.java:787) at com.genuitec.eclipse.uml.action.UMLImportSourcesActionDelegate$2.run(UMLImportSourcesActionDelegate.java:72) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3057) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2716) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334) at org.eclipse.core.launcher.Main.basicRun(Main.java:278) at org.eclipse.core.launcher.Main.run(Main.java:973) at org.eclipse.core.launcher.Main.main(Main.java:948) Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -2 at java.lang.String.substring(String.java:1444) at org.argouml.uml.reveng.java.Modeller.addDocumentationTag(Modeller.java:1886) at org.argouml.uml.reveng.java.Modeller.addOperation(Modeller.java:1067) at org.argouml.uml.reveng.java.JavaRecognizer.field(JavaRecognizer.java:1220) at org.argouml.uml.reveng.java.JavaRecognizer.classBlock(JavaRecognizer.java:1068) at org.argouml.uml.reveng.java.JavaRecognizer.classDefinition(JavaRecognizer.java:598) at org.argouml.uml.reveng.java.JavaRecognizer.typeDefinition(JavaRecognizer.java:434) at org.argouml.uml.reveng.java.JavaRecognizer.compilationUnit(JavaRecognizer.java:352) at com.genuitec.eclipse.uml.wizard.ReverseEngineerJavaWizard.parseFile(ReverseEngineerJavaWizard.java:242) at com.genuitec.eclipse.uml.wizard.ReverseEngineerJavaWizard.doImport(ReverseEngineerJavaWizard.java:162) at com.genuitec.eclipse.uml.wizard.ReverseEngineerJavaWizard.finishPage(ReverseEngineerJavaWizard.java:89) at com.genuitec.eclipse.core.portability.NewElementWizard$2.run(Unknown Source) at org.eclipse.jdt.internal.core.BatchOperation.executeOperation(BatchOperation.java:39) at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:718) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1719) at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:3760) at org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:87) at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:346) ... 34 more Root exception: java.lang.StringIndexOutOfBoundsException: String index out of range: -2 at java.lang.String.substring(String.java:1444) at org.argouml.uml.reveng.java.Modeller.addDocumentationTag(Modeller.java:1886) at org.argouml.uml.reveng.java.Modeller.addOperation(Modeller.java:1067) at org.argouml.uml.reveng.java.JavaRecognizer.field(JavaRecognizer.java:1220) at org.argouml.uml.reveng.java.JavaRecognizer.classBlock(JavaRecognizer.java:1068) at org.argouml.uml.reveng.java.JavaRecognizer.classDefinition(JavaRecognizer.java:598) at org.argouml.uml.reveng.java.JavaRecognizer.typeDefinition(JavaRecognizer.java:434) at org.argouml.uml.reveng.java.JavaRecognizer.compilationUnit(JavaRecognizer.java:352) at com.genuitec.eclipse.uml.wizard.ReverseEngineerJavaWizard.parseFile(ReverseEngineerJavaWizard.java:242) at com.genuitec.eclipse.uml.wizard.ReverseEngineerJavaWizard.doImport(ReverseEngineerJavaWizard.java:162) at com.genuitec.eclipse.uml.wizard.ReverseEngineerJavaWizard.finishPage(ReverseEngineerJavaWizard.java:89) at com.genuitec.eclipse.core.portability.NewElementWizard$2.run(Unknown Source) at org.eclipse.jdt.internal.core.BatchOperation.executeOperation(BatchOperation.java:39) at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:718) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1719) at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:3760) at org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:87) at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:346) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:291) at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:830) at com.genuitec.eclipse.core.portability.NewElementWizard.performFinish(Unknown Source) at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:676) at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:349) at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:556) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3080) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2713) at org.eclipse.jface.window.Window.runEventLoop(Window.java:809) at org.eclipse.jface.window.Window.open(Window.java:787) at com.genuitec.eclipse.uml.action.UMLImportSourcesActionDelegate$2.run(UMLImportSourcesActionDelegate.java:72) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3057) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2716) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334) at org.eclipse.core.launcher.Main.basicRun(Main.java:278) at org.eclipse.core.launcher.Main.run(Main.java:973) at org.eclipse.core.launcher.Main.main(Main.java:948)
Riyad KallaMemberWould it be possible to send us the source code of this project so we could determine why this was happening?
Also I’d ask does your project use any Java 5.0 features like generics, enumerations, etc?
shariMember@support-rkalla wrote:
Would it be possible to send us the source code of this project so we could determine why this was happening?
I’m also having the same problem. A little trial & error gives an interesting fact.
I have a good-sized project with 4 ‘main’ packages. 3 of these have 34, 54 and 161 classes inside. The 4th package contains 277 classes.
Reverse engineering bombs when I select the 4th package, even by itself, but not when I select the other packages (all trials done starting eclipse anew to avoid leakage interferences). I tried also selecting all 3 “small packages” at once (totalling 249 classes). It works.
Could it be 256 is a magic number for some piece of the reverse engineering code?
Manually de-selecting a number of classes in the 4th package so that total is below 256 however is not helping, even though the error message is about string index -1 instead of -2.
Let me know if and how I can help in tracking down the issue. -
AuthorPosts