Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Texo] NullPointer while generating ORM Annotated Model
[Texo] NullPointer while generating ORM Annotated Model [message #1061601] Mon, 03 June 2013 08:54 Go to next message
Bastian Wagenfeld is currently offline Bastian Wagenfeld
Messages: 162
Registered: January 2013
Senior Member
Hi Martin,

I tried to generate an ORM annotated model. I right-clicked o the ecore-file and selected the Generate-ORM-annotated-model-function. The the following error message is shown:

index.php/fa/15133/0/

The other generations (like code generation) work fine. I updated Texo this morning via the update site. My colleague who didn't update Texo can generate the annotations model.

Do you have an idea what could be wrong?

Best regards
Bastian
Re: [Texo] NullPointer while generating ORM Annotated Model [message #1061604 is a reply to message #1061601] Mon, 03 June 2013 08:55 Go to previous messageGo to next message
Martin Taal is currently offline Martin Taal
Messages: 5339
Registered: July 2009
Senior Member
Not good at all, probably a mistake by me, can you somewhere find the stacktrace? Maybe in a log or in an error view?

gr. Martin

On 06/03/2013 10:54 AM, Bastian Wagenfeld wrote:
> Hi Martin,
>
> I tried to generate an ORM annotated model. I right-clicked o the ecore-file and selected the Generate-ORM-annotated-model-function. The the following error message is shown:
>
>
>
> The other generations (like code generation) work fine. I updated Texo this morning via the update site. My colleague who didn't update Texo can generate the annotations model.
>
> Do you have an idea what could be wrong?
>
> Best regards
> Bastian
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: [Texo] NullPointer while generating ORM Annotated Model [message #1061605 is a reply to message #1061604] Mon, 03 June 2013 09:08 Go to previous messageGo to next message
Bastian Wagenfeld is currently offline Bastian Wagenfeld
Messages: 162
Registered: January 2013
Senior Member
Sorry, forgot the stack trace Smile

!ENTRY org.eclipse.ui 4 0 2013-06-03 11:02:45.498
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:87)
	at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
Caused by: java.lang.reflect.InvocationTargetException
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)
	at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
	at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:275)
	at org.eclipse.ui.internal.progress.ProgressManager$3.run(ProgressManager.java:960)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:995)
	at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:970)
	at org.eclipse.ui.internal.progress.ProgressManager.run(ProgressManager.java:1166)
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:80)
	... 29 more
Caused by: java.lang.IllegalStateException: java.lang.NullPointerException
	at org.eclipse.emf.texo.generator.AnnotationModelGenerator.createStoreAnnotationModel(AnnotationModelGenerator.java:92)
	at org.eclipse.emf.texo.eclipse.popup.actions.GenerateAnnotationModel.generateFromURI(GenerateAnnotationModel.java:101)
	at org.eclipse.emf.texo.eclipse.popup.actions.GenerateAnnotationModel.generateFromUris(GenerateAnnotationModel.java:47)
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:128)
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:108)
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction$1.execute(BaseGenerateAction.java:76)
	at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: java.lang.NullPointerException
	at java.io.File.<init>(File.java:251)
	at org.eclipse.emf.texo.generator.AnnotationModelGenerator.createStoreAnnotationModel(AnnotationModelGenerator.java:69)
	... 9 more
Re: [Texo] NullPointer while generating ORM Annotated Model [message #1061616 is a reply to message #1061605] Mon, 03 June 2013 09:57 Go to previous messageGo to next message
Martin Taal is currently offline Martin Taal
Messages: 5339
Registered: July 2009
Senior Member
I am doing an new build right now, which hopefully solves this..

gr. Martin

On 06/03/2013 11:08 AM, Bastian Wagenfeld wrote:
> Sorry, forgot the stack trace :)
>
> !ENTRY org.eclipse.ui 4 0 2013-06-03 11:02:45.498
> !MESSAGE Unhandled event loop exception
> !STACK 0
> java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:87)
> at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
> at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
> at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
> at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
> at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
> at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
> at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
> at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
> at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
> at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
> at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
> at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:601)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
> Caused by: java.lang.reflect.InvocationTargetException
> at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)
> at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
> at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:275)
> at org.eclipse.ui.internal.progress.ProgressManager$3.run(ProgressManager.java:960)
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
> at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:995)
> at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:970)
> at org.eclipse.ui.internal.progress.ProgressManager.run(ProgressManager.java:1166)
> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:80)
> ... 29 more
> Caused by: java.lang.IllegalStateException: java.lang.NullPointerException
> at
> org.eclipse.emf.texo.generator.AnnotationModelGenerator.createStoreAnnotationModel(AnnotationModelGenerator.java:92)
> at
> org.eclipse.emf.texo.eclipse.popup.actions.GenerateAnnotationModel.generateFromURI(GenerateAnnotationModel.java:101)
> at
> org.eclipse.emf.texo.eclipse.popup.actions.GenerateAnnotationModel.generateFromUris(GenerateAnnotationModel.java:47)
> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:128)
> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:108)
> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction$1.execute(BaseGenerateAction.java:76)
> at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
> at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
> at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
> at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
> Caused by: java.lang.NullPointerException
> at java.io.File.<init>(File.java:251)
> at
> org.eclipse.emf.texo.generator.AnnotationModelGenerator.createStoreAnnotationModel(AnnotationModelGenerator.java:69)
> ... 9 more
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: [Texo] NullPointer while generating ORM Annotated Model [message #1061632 is a reply to message #1061616] Mon, 03 June 2013 11:19 Go to previous messageGo to next message
Martin Taal is currently offline Martin Taal
Messages: 5339
Registered: July 2009
Senior Member
I published a new build.

gr. Martin

On 06/03/2013 11:57 AM, Martin Taal wrote:
> I am doing an new build right now, which hopefully solves this..
>
> gr. Martin
>
> On 06/03/2013 11:08 AM, Bastian Wagenfeld wrote:
>> Sorry, forgot the stack trace :)
>>
>> !ENTRY org.eclipse.ui 4 0 2013-06-03 11:02:45.498
>> !MESSAGE Unhandled event loop exception
>> !STACK 0
>> java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
>> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:87)
>> at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
>> at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
>> at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
>> at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
>> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
>> at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
>> at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>> at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
>> at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
>> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
>> at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>> at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
>> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
>> at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
>> at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
>> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
>> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
>> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
>> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> at java.lang.reflect.Method.invoke(Method.java:601)
>> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
>> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
>> at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
>> Caused by: java.lang.reflect.InvocationTargetException
>> at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)
>> at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
>> at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:275)
>> at org.eclipse.ui.internal.progress.ProgressManager$3.run(ProgressManager.java:960)
>> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
>> at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:995)
>> at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:970)
>> at org.eclipse.ui.internal.progress.ProgressManager.run(ProgressManager.java:1166)
>> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:80)
>> ... 29 more
>> Caused by: java.lang.IllegalStateException: java.lang.NullPointerException
>> at
>> org.eclipse.emf.texo.generator.AnnotationModelGenerator.createStoreAnnotationModel(AnnotationModelGenerator.java:92)
>> at
>> org.eclipse.emf.texo.eclipse.popup.actions.GenerateAnnotationModel.generateFromURI(GenerateAnnotationModel.java:101)
>> at
>> org.eclipse.emf.texo.eclipse.popup.actions.GenerateAnnotationModel.generateFromUris(GenerateAnnotationModel.java:47)
>> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:128)
>> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:108)
>> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction$1.execute(BaseGenerateAction.java:76)
>> at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
>> at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
>> at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
>> at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
>> Caused by: java.lang.NullPointerException
>> at java.io.File.<init>(File.java:251)
>> at
>> org.eclipse.emf.texo.generator.AnnotationModelGenerator.createStoreAnnotationModel(AnnotationModelGenerator.java:69)
>> ... 9 more
>>
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: [Texo] NullPointer while generating ORM Annotated Model [message #1061642 is a reply to message #1061632] Mon, 03 June 2013 11:43 Go to previous messageGo to next message
Bastian Wagenfeld is currently offline Bastian Wagenfeld
Messages: 162
Registered: January 2013
Senior Member
Hi Martin,

I'm sorry, but this had no effect. I just installed the new version, deleted all older plugins, restarted Eclipse, but still get the following message:
!ENTRY org.eclipse.ui 4 0 2013-06-03 13:40:25.680
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:86)
	at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
Caused by: java.lang.reflect.InvocationTargetException
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)
	at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
	at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:275)
	at org.eclipse.ui.internal.progress.ProgressManager$3.run(ProgressManager.java:960)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:995)
	at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:970)
	at org.eclipse.ui.internal.progress.ProgressManager.run(ProgressManager.java:1166)
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:79)
	... 29 more
Caused by: java.lang.IllegalStateException: java.lang.IllegalStateException: java.lang.NullPointerException
	at org.eclipse.emf.texo.eclipse.popup.actions.GenerateAnnotationModel.generateFromModelFile(GenerateAnnotationModel.java:106)
	at org.eclipse.emf.texo.eclipse.popup.actions.GenerateAnnotationModel.generateFromModelFiles(GenerateAnnotationModel.java:48)
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:127)
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:107)
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction$1.execute(BaseGenerateAction.java:75)
	at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: java.lang.IllegalStateException: java.lang.NullPointerException
	at org.eclipse.emf.texo.generator.AnnotationModelGenerator.createStoreAnnotationModel(AnnotationModelGenerator.java:98)
	at org.eclipse.emf.texo.eclipse.popup.actions.GenerateAnnotationModel.generateFromModelFile(GenerateAnnotationModel.java:104)
	... 8 more
Caused by: java.lang.NullPointerException
	at java.io.File.<init>(File.java:251)
	at org.eclipse.emf.texo.generator.AnnotationModelGenerator.createStoreAnnotationModel(AnnotationModelGenerator.java:70)
	... 9 more
Re: [Texo] NullPointer while generating ORM Annotated Model [message #1061670 is a reply to message #1061642] Mon, 03 June 2013 12:35 Go to previous messageGo to next message
Martin Taal is currently offline Martin Taal
Messages: 5339
Registered: July 2009
Senior Member
Hi Bastian,
And I need to say sorry again :-(, I found that to, in the meantime I have done another build which should really solve
this, I published it 5 mins ago, this latest build hopefully helps...

gr. Martin

On 06/03/2013 01:43 PM, Bastian Wagenfeld wrote:
> Hi Martin,
>
> I'm sorry, but this had no effect. I just installed the new version, deleted all older plugins, restarted Eclipse, but
> still get the following message:
> !ENTRY org.eclipse.ui 4 0 2013-06-03 13:40:25.680
> !MESSAGE Unhandled event loop exception
> !STACK 0
> java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:86)
> at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
> at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
> at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
> at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
> at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
> at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
> at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
> at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
> at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
> at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
> at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
> at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:601)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
> Caused by: java.lang.reflect.InvocationTargetException
> at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)
> at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
> at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:275)
> at org.eclipse.ui.internal.progress.ProgressManager$3.run(ProgressManager.java:960)
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
> at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:995)
> at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:970)
> at org.eclipse.ui.internal.progress.ProgressManager.run(ProgressManager.java:1166)
> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:79)
> ... 29 more
> Caused by: java.lang.IllegalStateException: java.lang.IllegalStateException: java.lang.NullPointerException
> at
> org.eclipse.emf.texo.eclipse.popup.actions.GenerateAnnotationModel.generateFromModelFile(GenerateAnnotationModel.java:106)
> at
> org.eclipse.emf.texo.eclipse.popup.actions.GenerateAnnotationModel.generateFromModelFiles(GenerateAnnotationModel.java:48)
> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:127)
> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:107)
> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction$1.execute(BaseGenerateAction.java:75)
> at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
> at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
> at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
> at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
> Caused by: java.lang.IllegalStateException: java.lang.NullPointerException
> at
> org.eclipse.emf.texo.generator.AnnotationModelGenerator.createStoreAnnotationModel(AnnotationModelGenerator.java:98)
> at
> org.eclipse.emf.texo.eclipse.popup.actions.GenerateAnnotationModel.generateFromModelFile(GenerateAnnotationModel.java:104)
> ... 8 more
> Caused by: java.lang.NullPointerException
> at java.io.File.<init>(File.java:251)
> at
> org.eclipse.emf.texo.generator.AnnotationModelGenerator.createStoreAnnotationModel(AnnotationModelGenerator.java:70)
> ... 9 more
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: [Texo] NullPointer while generating ORM Annotated Model [message #1061675 is a reply to message #1061670] Mon, 03 June 2013 13:02 Go to previous messageGo to next message
Bastian Wagenfeld is currently offline Bastian Wagenfeld
Messages: 162
Registered: January 2013
Senior Member
Hi Martin,

I'm so sorry to say it again, but it doesn't work in this version.
I'll post the stack trace again, since at least the last line changed.
Maybe I could change anything in the ecore to make it work?

!ENTRY org.eclipse.ui 4 0 2013-06-03 14:55:39.549
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:86)
	at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
Caused by: java.lang.reflect.InvocationTargetException
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)
	at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
	at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:275)
	at org.eclipse.ui.internal.progress.ProgressManager$3.run(ProgressManager.java:960)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:995)
	at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:970)
	at org.eclipse.ui.internal.progress.ProgressManager.run(ProgressManager.java:1166)
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:79)
	... 29 more
Caused by: java.lang.IllegalStateException: java.lang.IllegalStateException: java.lang.NullPointerException
	at org.eclipse.emf.texo.eclipse.popup.actions.GenerateAnnotationModel.generateFromModelFile(GenerateAnnotationModel.java:107)
	at org.eclipse.emf.texo.eclipse.popup.actions.GenerateAnnotationModel.generateFromModelFiles(GenerateAnnotationModel.java:48)
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:127)
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:107)
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction$1.execute(BaseGenerateAction.java:75)
	at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: java.lang.IllegalStateException: java.lang.NullPointerException
	at org.eclipse.emf.texo.generator.AnnotationModelGenerator.createStoreAnnotationModel(AnnotationModelGenerator.java:95)
	at org.eclipse.emf.texo.eclipse.popup.actions.GenerateAnnotationModel.generateFromModelFile(GenerateAnnotationModel.java:104)
	... 8 more
Caused by: java.lang.NullPointerException
	at org.eclipse.emf.texo.annotations.AnnotationModelSuffixHandler.createAnnotationsModelURIWithSuffix(AnnotationModelSuffixHandler.java:48)
	at org.eclipse.emf.texo.generator.AnnotationModelGenerator.createStoreAnnotationModel(AnnotationModelGenerator.java:71)
	... 9 more


Thanks for your fast reactions!
Bastian
Re: [Texo] NullPointer while generating ORM Annotated Model [message #1061677 is a reply to message #1061675] Mon, 03 June 2013 13:14 Go to previous messageGo to next message
Bastian Wagenfeld is currently offline Bastian Wagenfeld
Messages: 162
Registered: January 2013
Senior Member
Hi Martin,

it seems, I cannot generate ORM-files, too. I'll post the stack trace which looks different. Maybe this could help.

!ENTRY org.eclipse.ui 4 0 2013-06-03 15:13:17.143
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:86)
	at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
Caused by: java.lang.reflect.InvocationTargetException
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)
	at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
	at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:275)
	at org.eclipse.ui.internal.progress.ProgressManager$3.run(ProgressManager.java:960)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:995)
	at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:970)
	at org.eclipse.ui.internal.progress.ProgressManager.run(ProgressManager.java:1166)
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:79)
	... 29 more
Caused by: java.lang.IllegalStateException: java.lang.NullPointerException
	at org.eclipse.emf.texo.orm.annotator.ORMGenerator.generateFromModelFile(ORMGenerator.java:195)
	at org.eclipse.emf.texo.orm.annotator.ORMGenerator.generateFromModelFiles(ORMGenerator.java:177)
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:127)
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:107)
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction$1.execute(BaseGenerateAction.java:75)
	at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: java.lang.NullPointerException
	at java.io.File.<init>(File.java:251)
	at org.eclipse.emf.texo.orm.annotator.ORMGenerator.storeORM(ORMGenerator.java:221)
	at org.eclipse.emf.texo.orm.annotator.ORMGenerator.generateStoreORM(ORMGenerator.java:211)
	at org.eclipse.emf.texo.orm.annotator.ORMGenerator.generateFromModelFile(ORMGenerator.java:193)
	... 8 more
Re: [Texo] NullPointer while generating ORM Annotated Model [message #1061737 is a reply to message #1061677] Mon, 03 June 2013 16:37 Go to previous messageGo to next message
Martin Taal is currently offline Martin Taal
Messages: 5339
Registered: July 2009
Senior Member
Hi Bastian,
With me it works fine, so it must be something specific to your dev project which I am missing.

Can you email me your dev project?

gr. Martin

On 06/03/2013 03:14 PM, Bastian Wagenfeld wrote:
> Hi Martin,
>
> it seems, I cannot generate ORM-files, too. I'll post the stack trace which looks different. Maybe this could help.
>
> !ENTRY org.eclipse.ui 4 0 2013-06-03 15:13:17.143
> !MESSAGE Unhandled event loop exception
> !STACK 0
> java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:86)
> at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
> at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
> at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
> at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
> at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
> at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
> at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
> at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
> at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
> at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
> at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
> at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:601)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
> Caused by: java.lang.reflect.InvocationTargetException
> at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)
> at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
> at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:275)
> at org.eclipse.ui.internal.progress.ProgressManager$3.run(ProgressManager.java:960)
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
> at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:995)
> at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:970)
> at org.eclipse.ui.internal.progress.ProgressManager.run(ProgressManager.java:1166)
> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:79)
> ... 29 more
> Caused by: java.lang.IllegalStateException: java.lang.NullPointerException
> at org.eclipse.emf.texo.orm.annotator.ORMGenerator.generateFromModelFile(ORMGenerator.java:195)
> at org.eclipse.emf.texo.orm.annotator.ORMGenerator.generateFromModelFiles(ORMGenerator.java:177)
> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:127)
> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:107)
> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction$1.execute(BaseGenerateAction.java:75)
> at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
> at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
> at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
> at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
> Caused by: java.lang.NullPointerException
> at java.io.File.<init>(File.java:251)
> at org.eclipse.emf.texo.orm.annotator.ORMGenerator.storeORM(ORMGenerator.java:221)
> at org.eclipse.emf.texo.orm.annotator.ORMGenerator.generateStoreORM(ORMGenerator.java:211)
> at org.eclipse.emf.texo.orm.annotator.ORMGenerator.generateFromModelFile(ORMGenerator.java:193)
> ... 8 more


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: [Texo] NullPointer while generating ORM Annotated Model [message #1061791 is a reply to message #1061737] Tue, 04 June 2013 05:24 Go to previous messageGo to next message
Bastian Wagenfeld is currently offline Bastian Wagenfeld
Messages: 162
Registered: January 2013
Senior Member
Hi,

I just sent you a mail with my identifiable model.

Bastian
Re: [Texo] NullPointer while generating ORM Annotated Model [message #1063916 is a reply to message #1061791] Sat, 15 June 2013 11:57 Go to previous messageGo to next message
sigi jeske is currently offline sigi jeske
Messages: 1
Registered: June 2013
Junior Member
just replace in class "org.eclipse.emf.texo.orm.annotator.ORMGenerator" in line 191 the "URI.createURI(modelFile.getLocation().toString()).trimSegments(1);" by "URI.createFileURI(...);" and it works.

Re: [Texo] NullPointer while generating ORM Annotated Model [message #1067900 is a reply to message #1063916] Thu, 11 July 2013 07:54 Go to previous messageGo to next message
gabriele boldrin is currently offline gabriele boldrin
Messages: 19
Registered: December 2009
Junior Member
I am using Texo 0.1.0.v201306031205 (the last version) and I can not generate the ORM file. Maybe there is one more error?
I am attaching an example and the log file

java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:86)
	at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
Caused by: java.lang.reflect.InvocationTargetException
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)
	at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
	at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:275)
	at org.eclipse.ui.internal.progress.ProgressManager$3.run(ProgressManager.java:960)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:995)
	at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:970)
	at org.eclipse.ui.internal.progress.ProgressManager.run(ProgressManager.java:1166)
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:79)
	... 30 more
Caused by: java.lang.IllegalStateException: java.lang.IllegalStateException: java.lang.NullPointerException
	at org.eclipse.emf.texo.eclipse.popup.actions.GenerateAnnotationModel.generateFromModelFile(GenerateAnnotationModel.java:107)
	at org.eclipse.emf.texo.eclipse.popup.actions.GenerateAnnotationModel.generateFromModelFiles(GenerateAnnotationModel.java:48)
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:127)
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:107)
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction$1.execute(BaseGenerateAction.java:75)
	at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: java.lang.IllegalStateException: java.lang.NullPointerException
	at org.eclipse.emf.texo.generator.AnnotationModelGenerator.createStoreAnnotationModel(AnnotationModelGenerator.java:95)
	at org.eclipse.emf.texo.eclipse.popup.actions.GenerateAnnotationModel.generateFromModelFile(GenerateAnnotationModel.java:104)
	... 8 more
Caused by: java.lang.NullPointerException
	at org.eclipse.emf.texo.annotations.AnnotationModelSuffixHandler.createAnnotationsModelURIWithSuffix(AnnotationModelSuffixHandler.java:48)
	at org.eclipse.emf.texo.generator.AnnotationModelGenerator.createStoreAnnotationModel(AnnotationModelGenerator.java:71)
	... 9 more
  • Attachment: test2.ecore
    (Size: 0.76KB, Downloaded 31 times)
Re: [Texo] NullPointer while generating ORM Annotated Model [message #1068111 is a reply to message #1067900] Fri, 12 July 2013 09:05 Go to previous messageGo to next message
Martin Taal is currently offline Martin Taal
Messages: 5339
Registered: July 2009
Senior Member
Hi Gabriele,
I published a new build which should print more information in the stack trace why this fails.

Can you retry it for me with the latest build?

gr. Martin

On 07/11/2013 09:54 AM, gabriele boldrin wrote:
> I am using Texo 0.1.0.v201306031205 (the last version) and I can not generate the ORM file. Maybe there is one more error?
> I am attaching an example and the log file
>
>
> java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:86)
> at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
> at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
> at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
> at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
> at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
> at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
> at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
> at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
> at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
> at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
> at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
> at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
> Caused by: java.lang.reflect.InvocationTargetException
> at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)
> at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
> at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:275)
> at org.eclipse.ui.internal.progress.ProgressManager$3.run(ProgressManager.java:960)
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
> at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:995)
> at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:970)
> at org.eclipse.ui.internal.progress.ProgressManager.run(ProgressManager.java:1166)
> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:79)
> ... 30 more
> Caused by: java.lang.IllegalStateException: java.lang.IllegalStateException: java.lang.NullPointerException
> at org.eclipse.emf.texo.eclipse.popup.actions.GenerateAnnotationModel.generateFromModelFile(GenerateAnnotationModel.java:107)
> at org.eclipse.emf.texo.eclipse.popup.actions.GenerateAnnotationModel.generateFromModelFiles(GenerateAnnotationModel.java:48)
> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:127)
> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:107)
> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction$1.execute(BaseGenerateAction.java:75)
> at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
> at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
> at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
> at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
> Caused by: java.lang.IllegalStateException: java.lang.NullPointerException
> at org.eclipse.emf.texo.generator.AnnotationModelGenerator.createStoreAnnotationModel(AnnotationModelGenerator.java:95)
> at org.eclipse.emf.texo.eclipse.popup.actions.GenerateAnnotationModel.generateFromModelFile(GenerateAnnotationModel.java:104)
> ... 8 more
> Caused by: java.lang.NullPointerException
> at org.eclipse.emf.texo.annotations.AnnotationModelSuffixHandler.createAnnotationsModelURIWithSuffix(AnnotationModelSuffixHandler.java:48)
> at org.eclipse.emf.texo.generator.AnnotationModelGenerator.createStoreAnnotationModel(AnnotationModelGenerator.java:71)
> ... 9 more
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: [Texo] NullPointer while generating ORM Annotated Model [message #1068135 is a reply to message #1068111] Fri, 12 July 2013 10:57 Go to previous messageGo to next message
gabriele boldrin is currently offline gabriele boldrin
Messages: 19
Registered: December 2009
Junior Member
Hi Martin,

I tried to generate an ORM annotated model.
I right-clicked the ecore-file and selected the Generate-ORM-annotated-model-function, but it doesn't work in this version.
The error occurs for any model

Exception:


java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:86)
	at com.nterpriseapps.ide.modelgenerator.internal.ORMAnnotatedModelGeneratorCustom.run(ORMAnnotatedModelGeneratorCustom.java:18)
	at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
Caused by: java.lang.reflect.InvocationTargetException
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)
	at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
	at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:275)
	at org.eclipse.ui.internal.progress.ProgressManager$3.run(ProgressManager.java:960)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:995)
	at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:970)
	at org.eclipse.ui.internal.progress.ProgressManager.run(ProgressManager.java:1166)
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:79)
	... 31 more
Caused by: java.lang.IllegalStateException: java.lang.IllegalStateException: Exception for modelFile: /com.nterpriseapps.mdl.test/mdl/test2.ecore epackage test epackage uri : platform:/resource/com.nterpriseapps.mdl.test/mdl/test2.ecore
	at org.eclipse.emf.texo.eclipse.popup.actions.GenerateAnnotationModel.generateFromModelFile(GenerateAnnotationModel.java:107)
	at org.eclipse.emf.texo.eclipse.popup.actions.GenerateAnnotationModel.generateFromModelFiles(GenerateAnnotationModel.java:48)
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:127)
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:107)
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction$1.execute(BaseGenerateAction.java:75)
	at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: java.lang.IllegalStateException: Exception for modelFile: /com.nterpriseapps.mdl.test/mdl/test2.ecore epackage test epackage uri : platform:/resource/com.nterpriseapps.mdl.test/mdl/test2.ecore
	at org.eclipse.emf.texo.generator.AnnotationModelGenerator.createStoreAnnotationModel(AnnotationModelGenerator.java:95)
	at org.eclipse.emf.texo.eclipse.popup.actions.GenerateAnnotationModel.generateFromModelFile(GenerateAnnotationModel.java:104)
	... 8 more
Caused by: java.lang.NullPointerException
	at org.eclipse.emf.texo.annotations.AnnotationModelSuffixHandler.createAnnotationsModelURIWithSuffix(AnnotationModelSuffixHandler.java:48)
	at org.eclipse.emf.texo.generator.AnnotationModelGenerator.createStoreAnnotationModel(AnnotationModelGenerator.java:71)
	... 9 more
Re: [Texo] NullPointer while generating ORM Annotated Model [message #1068138 is a reply to message #1068135] Fri, 12 July 2013 11:37 Go to previous messageGo to next message
Martin Taal is currently offline Martin Taal
Messages: 5339
Registered: July 2009
Senior Member
Hi Gabriele,
Yes the new build does not fix it, it prints some more information. Let me research further based on this new info.

gr. Martin

On 07/12/2013 12:57 PM, gabriele boldrin wrote:
> Hi Martin,
>
> I tried to generate an ORM annotated model. I right-clicked the ecore-file and selected the
> Generate-ORM-annotated-model-function, but it doesn't work in this version.
> The error occurs for any model
>
> Exception:
>
>
>
> java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:86)
> at
> com.nterpriseapps.ide.modelgenerator.internal.ORMAnnotatedModelGeneratorCustom.run(ORMAnnotatedModelGeneratorCustom.java:18)
>
> at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
> at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
> at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
> at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
> at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
> at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
> at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
> at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
> at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
> at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
> at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
> at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
> Caused by: java.lang.reflect.InvocationTargetException
> at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)
> at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
> at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:275)
> at org.eclipse.ui.internal.progress.ProgressManager$3.run(ProgressManager.java:960)
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
> at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:995)
> at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:970)
> at org.eclipse.ui.internal.progress.ProgressManager.run(ProgressManager.java:1166)
> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:79)
> ... 31 more
> Caused by: java.lang.IllegalStateException: java.lang.IllegalStateException: Exception for modelFile:
> /com.nterpriseapps.mdl.test/mdl/test2.ecore epackage test epackage uri :
> platform:/resource/com.nterpriseapps.mdl.test/mdl/test2.ecore
> at
> org.eclipse.emf.texo.eclipse.popup.actions.GenerateAnnotationModel.generateFromModelFile(GenerateAnnotationModel.java:107)
> at
> org.eclipse.emf.texo.eclipse.popup.actions.GenerateAnnotationModel.generateFromModelFiles(GenerateAnnotationModel.java:48)
> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:127)
> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:107)
> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction$1.execute(BaseGenerateAction.java:75)
> at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
> at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
> at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
> at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
> Caused by: java.lang.IllegalStateException: Exception for modelFile: /com.nterpriseapps.mdl.test/mdl/test2.ecore
> epackage test epackage uri : platform:/resource/com.nterpriseapps.mdl.test/mdl/test2.ecore
> at
> org.eclipse.emf.texo.generator.AnnotationModelGenerator.createStoreAnnotationModel(AnnotationModelGenerator.java:95)
> at
> org.eclipse.emf.texo.eclipse.popup.actions.GenerateAnnotationModel.generateFromModelFile(GenerateAnnotationModel.java:104)
> ... 8 more
> Caused by: java.lang.NullPointerException
> at
> org.eclipse.emf.texo.annotations.AnnotationModelSuffixHandler.createAnnotationsModelURIWithSuffix(AnnotationModelSuffixHandler.java:48)
>
> at
> org.eclipse.emf.texo.generator.AnnotationModelGenerator.createStoreAnnotationModel(AnnotationModelGenerator.java:71)
> ... 9 more
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: [Texo] NullPointer while generating ORM Annotated Model [message #1070569 is a reply to message #1061601] Thu, 18 July 2013 08:30 Go to previous messageGo to next message
R. Oldenburg is currently offline R. Oldenburg
Messages: 24
Registered: September 2011
Junior Member
Hi all,

just had the same issue.
I could resolve it quick-and-dirty with the following change in AnnotationModelGenerator:

line 70:
-       final URI fileUri = URI.createURI(modelFile.getParent().getLocation().toOSString());
-       final File file = new File(AnnotationModelSuffixHandler.createAnnotationsModelURIWithSuffix(fileUri, suffix)
-           .toFileString());
+      final URI fileUri = URI.createFileURI(modelFile.getLocation().toOSString());
+      final File file = new File(fileUri.toString()).getParentFile();


Regards,
Roland
Re: [Texo] NullPointer while generating ORM Annotated Model [message #1070671 is a reply to message #1070569] Thu, 18 July 2013 12:35 Go to previous messageGo to next message
Martin Taal is currently offline Martin Taal
Messages: 5339
Registered: July 2009
Senior Member
Hi Roland,
Thanks for sharing (this one has bugged me for a while...), looking again at the code I think it should be changed. Can
you try/test the attached diff? Does it help?

Thanks again Roland!

gr. Martin

On 07/18/2013 10:30 AM, R. Oldenburg wrote:
> Hi all,
>
> just had the same issue.
> I could resolve it quick-and-dirty with the following change in AnnotationModelGenerator:
>
> line 70:
> - final URI fileUri = URI.createURI(modelFile.getParent().getLocation().toOSString());
> - final File file = new File(AnnotationModelSuffixHandler.createAnnotationsModelURIWithSuffix(fileUri, suffix)
> - .toFileString());
> + final URI fileUri = URI.createFileURI(modelFile.getLocation().toOSString());
> + final File file = new File(fileUri.toString()).getParentFile();
>
> Regards,
> Roland


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: [Texo] NullPointer while generating ORM Annotated Model [message #1073658 is a reply to message #1070671] Thu, 25 July 2013 08:49 Go to previous messageGo to next message
Thorben Ruthke is currently offline Thorben Ruthke
Messages: 1
Registered: July 2013
Junior Member
Hi Martin,

Roland told me to test the attached diff and it seems like that there is no NPE anymore.

I can generate all of the possible models without problems.

grotjes/Regards Smile
Thorben
Re: [Texo] NullPointer while generating ORM Annotated Model [message #1073766 is a reply to message #1073658] Thu, 25 July 2013 12:59 Go to previous messageGo to next message
Martin Taal is currently offline Martin Taal
Messages: 5339
Registered: July 2009
Senior Member
Hi Thorben, great to hear, thanks for trying. The latest build/publication solves this problem.

gr. Martin

On 07/25/2013 01:56 PM, Thorben Ruthke wrote:
> Hi Martin,
>
> Roland told me to test the attached diff and it seems like that there is no NPE anymore.
>
> I can generate all of the possible models without problems.
>
> grotjes/Regards :)
> Thorben
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: [Texo] NullPointer while generating ORM Annotated Model [message #1074136 is a reply to message #1073658] Fri, 26 July 2013 07:17 Go to previous messageGo to next message
gabriele boldrin is currently offline gabriele boldrin
Messages: 19
Registered: December 2009
Junior Member
Hi Martin,
I tried the new release but the generation ORM file does not work.

!ENTRY org.eclipse.ui 4 0 2013-07-26 08:52:05.943
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:86)
	at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
Caused by: java.lang.reflect.InvocationTargetException
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)
	at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
	at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:275)
	at org.eclipse.ui.internal.progress.ProgressManager$3.run(ProgressManager.java:960)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:995)
	at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:970)
	at org.eclipse.ui.internal.progress.ProgressManager.run(ProgressManager.java:1166)
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:79)
	... 30 more
Caused by: java.lang.IllegalStateException: java.lang.IllegalStateException: Exception for modelFile: /com.nterpriseapps.mdl.adbk.core/mdl/adbk.ecore epackage adbk epackage uri : platform:/resource/com.nterpriseapps.mdl.adbk.core/mdl/adbk.ecore
	at org.eclipse.emf.texo.eclipse.popup.actions.GenerateAnnotationModel.generateFromModelFile(GenerateAnnotationModel.java:107)
	at org.eclipse.emf.texo.eclipse.popup.actions.GenerateAnnotationModel.generateFromModelFiles(GenerateAnnotationModel.java:48)
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:127)
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:107)
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction$1.execute(BaseGenerateAction.java:75)
	at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: java.lang.IllegalStateException: Exception for modelFile: /com.nterpriseapps.mdl.adbk.core/mdl/adbk.ecore epackage adbk epackage uri : platform:/resource/com.nterpriseapps.mdl.adbk.core/mdl/adbk.ecore
	at org.eclipse.emf.texo.generator.AnnotationModelGenerator.createStoreAnnotationModel(AnnotationModelGenerator.java:93)
	at org.eclipse.emf.texo.eclipse.popup.actions.GenerateAnnotationModel.generateFromModelFile(GenerateAnnotationModel.java:104)
	... 8 more
Caused by: java.lang.NullPointerException
	at org.eclipse.emf.texo.annotations.AnnotationModelSuffixHandler.createAnnotationsModelURIWithSuffix(AnnotationModelSuffixHandler.java:48)
	at org.eclipse.emf.texo.generator.AnnotationModelGenerator.createStoreAnnotationModel(AnnotationModelGenerator.java:68)
	... 9 more


Looking at the code, the problem should be here:


public void createStoreAnnotationModel(EPackage ePackage, String suffix, EPackage annotationEPackage, IFile modelFile) {
    try {
      final ResourceSet resourceSet = ePackage.eResource().getResourceSet();
      final URI fileUri = URI.createURI(modelFile.getLocation().toOSString());
      final File file = new File(AnnotationModelSuffixHandler.createAnnotationsModelURIWithSuffix(fileUri, suffix).toFileString());
      final Resource resource;
      if (file.exists()) {
        resource = resourceSet.getResource(fileUri, true);
      } else {
        resource = resourceSet.createResource(fileUri);
        final String encoding = ((XMLResource) ePackage.eResource()).getEncoding();
        ((XMLResource) resource).setEncoding(encoding);
      }


I have corrected the code in this way:

@Override
public void createStoreAnnotationModel(EPackage ePackage,String suffix, EPackage annotationEPackage,IFile modelFile) {
// TODO Auto-generated method stub
try {
	final ResourceSet resourceSet = ePackage.eResource().getResourceSet();
	final org.eclipse.emf.common.util.URI fileUri = org.eclipse.emf.common.util.URI.createFileURI(modelFile.getLocation().toOSString()); //change
	final org.eclipse.emf.common.util.URI fileOrmUri = AnnotationModelSuffixHandler.createAnnotationsModelURIWithSuffix(fileUri,suffix);//change
	final File file = new File(fileOrmUri.toFileString());//change
	final Resource resource;
	if (file.exists()) {
		resource = resourceSet.getResource(fileUri, true);
	} else {
		resource = resourceSet.createResource(fileOrmUri);//change
		final String encoding = ((XMLResource) ePackage.eResource()).getEncoding();
		((XMLResource) resource).setEncoding(encoding);
	.....				
						}
Re: [Texo] NullPointer while generating ORM Annotated Model [message #1074392 is a reply to message #1074136] Fri, 26 July 2013 16:35 Go to previous messageGo to next message
Martin Taal is currently offline Martin Taal
Messages: 5339
Registered: July 2009
Senior Member
Hi Gabriele, Thorben,
I published a new build which should hopefully solve this problem...

Can you retry?

gr. Martin

On 07/26/2013 09:17 AM, gabriele boldrin wrote:
> Hi Martin,
> I tried the new release but the generation ORM file does not work.
>
>
> !ENTRY org.eclipse.ui 4 0 2013-07-26 08:52:05.943
> !MESSAGE Unhandled event loop exception
> !STACK 0
> java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:86)
> at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
> at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
> at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
> at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
> at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
> at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
> at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
> at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
> at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
> at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
> at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
> at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
> Caused by: java.lang.reflect.InvocationTargetException
> at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)
> at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
> at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:275)
> at org.eclipse.ui.internal.progress.ProgressManager$3.run(ProgressManager.java:960)
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
> at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:995)
> at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:970)
> at org.eclipse.ui.internal.progress.ProgressManager.run(ProgressManager.java:1166)
> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:79)
> ... 30 more
> Caused by: java.lang.IllegalStateException: java.lang.IllegalStateException: Exception for modelFile:
> /com.nterpriseapps.mdl.adbk.core/mdl/adbk.ecore epackage adbk epackage uri :
> platform:/resource/com.nterpriseapps.mdl.adbk.core/mdl/adbk.ecore
> at
> org.eclipse.emf.texo.eclipse.popup.actions.GenerateAnnotationModel.generateFromModelFile(GenerateAnnotationModel.java:107)
> at
> org.eclipse.emf.texo.eclipse.popup.actions.GenerateAnnotationModel.generateFromModelFiles(GenerateAnnotationModel.java:48)
> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:127)
> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:107)
> at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction$1.execute(BaseGenerateAction.java:75)
> at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
> at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
> at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
> at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
> Caused by: java.lang.IllegalStateException: Exception for modelFile: /com.nterpriseapps.mdl.adbk.core/mdl/adbk.ecore
> epackage adbk epackage uri : platform:/resource/com.nterpriseapps.mdl.adbk.core/mdl/adbk.ecore
> at
> org.eclipse.emf.texo.generator.AnnotationModelGenerator.createStoreAnnotationModel(AnnotationModelGenerator.java:93)
> at
> org.eclipse.emf.texo.eclipse.popup.actions.GenerateAnnotationModel.generateFromModelFile(GenerateAnnotationModel.java:104)
> ... 8 more
> Caused by: java.lang.NullPointerException
> at
> org.eclipse.emf.texo.annotations.AnnotationModelSuffixHandler.createAnnotationsModelURIWithSuffix(AnnotationModelSuffixHandler.java:48)
>
> at
> org.eclipse.emf.texo.generator.AnnotationModelGenerator.createStoreAnnotationModel(AnnotationModelGenerator.java:68)
> ... 9 more
>
>
> Looking at the code, the problem should be here:
>
>
>
> public void createStoreAnnotationModel(EPackage ePackage, String suffix, EPackage annotationEPackage, IFile modelFile) {
> try {
> final ResourceSet resourceSet = ePackage.eResource().getResourceSet();
> final URI fileUri = URI.createURI(modelFile.getLocation().toOSString());
> final File file = new File(AnnotationModelSuffixHandler.createAnnotationsModelURIWithSuffix(fileUri,
> suffix).toFileString());
> final Resource resource;
> if (file.exists()) {
> resource = resourceSet.getResource(fileUri, true);
> } else {
> resource = resourceSet.createResource(fileUri);
> final String encoding = ((XMLResource) ePackage.eResource()).getEncoding();
> ((XMLResource) resource).setEncoding(encoding);
> }
>
>
> I have corrected the code in this way:
>
>
> @Override
> public void createStoreAnnotationModel(EPackage ePackage,String suffix, EPackage annotationEPackage,IFile modelFile) {
> // TODO Auto-generated method stub
> try {
> final ResourceSet resourceSet = ePackage.eResource().getResourceSet();
> final org.eclipse.emf.common.util.URI fileUri =
> org.eclipse.emf.common.util.URI.createFileURI(modelFile.getLocation().toOSString()); //change
> final org.eclipse.emf.common.util.URI fileOrmUri =
> AnnotationModelSuffixHandler.createAnnotationsModelURIWithSuffix(fileUri,suffix);//change
> final File file = new File(fileOrmUri.toFileString());//change
> final Resource resource;
> if (file.exists()) {
> resource = resourceSet.getResource(fileUri, true);
> } else {
> resource = resourceSet.createResource(fileOrmUri);//change
> final String encoding = ((XMLResource) ePackage.eResource()).getEncoding();
> ((XMLResource) resource).setEncoding(encoding);
> .....
> }
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: [Texo] NullPointer while generating ORM Annotated Model [message #1075257 is a reply to message #1074392] Mon, 29 July 2013 06:05 Go to previous messageGo to next message
Bastian Wagenfeld is currently offline Bastian Wagenfeld
Messages: 162
Registered: January 2013
Senior Member
Hi Martin,

I tried to generate the eclipselink-orm this morning after installing the newest version and deleting the old jars:
java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:86)
	at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:826)
	at org.eclipse.jface.window.Window.open(Window.java:802)
	at org.eclipse.ui.internal.views.log.EventDetailsDialog.open(EventDetailsDialog.java:180)
	at org.eclipse.ui.internal.views.log.EventDetailsDialogAction.run(EventDetailsDialogAction.java:98)
	at org.eclipse.ui.internal.views.log.LogView$15.doubleClick(LogView.java:536)
	at org.eclipse.jface.viewers.StructuredViewer$1.run(StructuredViewer.java:845)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	at org.eclipse.jface.viewers.StructuredViewer.fireDoubleClick(StructuredViewer.java:843)
	at org.eclipse.jface.viewers.AbstractTreeViewer.handleDoubleSelect(AbstractTreeViewer.java:1477)
	at org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:1246)
	at org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:249)
	at org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.java:246)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:307)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:331)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:331)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
Caused by: java.lang.reflect.InvocationTargetException
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)
	at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
	at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:275)
	at org.eclipse.ui.internal.progress.ProgressManager$3.run(ProgressManager.java:960)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:995)
	at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:970)
	at org.eclipse.ui.internal.progress.ProgressManager.run(ProgressManager.java:1166)
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:79)
	... 48 more
Caused by: java.lang.IllegalStateException: java.lang.NullPointerException
	at org.eclipse.emf.texo.orm.annotator.ORMGenerator.generateFromModelFile(ORMGenerator.java:195)
	at org.eclipse.emf.texo.orm.annotator.ORMGenerator.generateFromModelFiles(ORMGenerator.java:177)
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:127)
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:107)
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction$1.execute(BaseGenerateAction.java:75)
	at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2345)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: java.lang.NullPointerException
	at java.io.File.<init>(File.java:251)
	at org.eclipse.emf.texo.orm.annotator.ORMGenerator.storeORM(ORMGenerator.java:221)
	at org.eclipse.emf.texo.orm.annotator.ORMGenerator.generateStoreORM(ORMGenerator.java:211)
	at org.eclipse.emf.texo.orm.annotator.ORMGenerator.generateFromModelFile(ORMGenerator.java:193)
	... 8 more



Changing line 191 from
URI.createURI(modelFile.getLocation().toString()).trimSegments(1);

to
URI.createFileURI(modelFile.getLocation().toString()).trimSegments(1);

works for me and Texo creates annotated models as well as orms Smile

Best regards
Bastian
Re: [Texo] NullPointer while generating ORM Annotated Model [message #1075373 is a reply to message #1075257] Mon, 29 July 2013 10:13 Go to previous messageGo to next message
Bastian Wagenfeld is currently offline Bastian Wagenfeld
Messages: 162
Registered: January 2013
Senior Member
Hi Martin,

you just uploaded a new version, right?! So in this version everything's working fine Smile

Thank you a lot!
Bastian
Re: [Texo] NullPointer while generating ORM Annotated Model [message #1075382 is a reply to message #1075373] Mon, 29 July 2013 10:32 Go to previous message
Martin Taal is currently offline Martin Taal
Messages: 5339
Registered: July 2009
Senior Member
:-) Yes I was about to ping you on this version, I made the last change you proposed.

Thanks for your patience in this, good to hear that it works now :-)

gr. Martin

On 07/29/2013 12:13 PM, Bastian Wagenfeld wrote:
> Hi Martin,
>
> you just uploaded a new version, right?! So in this version everything's working fine :)
>
> Thank you a lot!
> Bastian


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Previous Topic:EMF customizing element delete command
Next Topic:Remote cdo server
Goto Forum:
  


Current Time: Sat Oct 25 17:39:33 GMT 2014

Powered by FUDForum. Page generated in 0.04579 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software