Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 314441 - [Texo]Nightly build #154 raises unhandled event loop exception when generating code
Summary: [Texo]Nightly build #154 raises unhandled event loop exception when generatin...
Status: RESOLVED FIXED
Alias: None
Product: EMFT
Classification: Modeling
Component: Texo (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Martin Taal CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-26 07:53 EDT by Philippe Roland CLA
Modified: 2010-05-27 15:26 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Roland CLA 2010-05-26 07:53:40 EDT
Build Identifier: 20100218-1602

Hey, 

I manually installed nightly build 154 (0.1.0v201005252108) and have been unable to generate code from the model ever since; attempting to do so creates an "unhandled event loop exception" error in the event log.

Stack trace follows:

eclipse.buildId=unknown
java.version=1.6.0_02
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=fr_FR
Framework arguments:  -product org.eclipse.epp.package.modeling.product
Command-line arguments:  -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.modeling.product -clean


Error
Wed May 26 13:45:07 CEST 2010
Unhandled event loop exception

java.lang.IllegalStateException: Exception while generating
at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:77)
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:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3910)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
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:368)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
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:559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
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$4.run(ProgressManager.java:966)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:1001)
at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:976)
at org.eclipse.ui.internal.progress.ProgressManager.run(ProgressManager.java:1182)
at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:75)
... 28 more
Caused by: java.lang.NullPointerException
at org.eclipse.emf.texo.generator.ModelController.annotate(ModelController.java:59)
at org.eclipse.emf.texo.eclipse.popup.actions.GenerateCode.generateFromUris(GenerateCode.java:48)
at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:120)
at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:99)
at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.access$0(BaseGenerateAction.java:81)
at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction$1.execute(BaseGenerateAction.java:71)
at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

I should probably also mention that this does not happen with the build currently up over at http://download.eclipse.org/modeling/emft/texo/updates/interim .

Cheers,
Philippe Roland

Reproducible: Always

Steps to Reproduce:
1.Manually install nightly build 154 on top of a fresh Modeling eclipse install
(I don't know if this is relevant, but FWIW I use the technique described here http://www.venukb.com/2006/08/20/install-eclipse-plugins-the-easy-way/)
2.Create an ecore file, any ecore file
3.Attempt to generate code.
Comment 1 Martin Taal CLA 2010-05-26 08:19:43 EDT
Hi Philipp,
I will check this out in the evening today.

gr. Martin
Comment 2 Martin Taal CLA 2010-05-26 08:35:11 EDT
btw, the last few builds of Texo have not been stable (some failing testcases). So it is sometimes risky to download the nightly builds, you can see the build status here:
https://build.eclipse.org/hudson/job/emft-texo-nightly

gr. Martin
Comment 3 Philippe Roland CLA 2010-05-26 08:53:23 EDT
I see. Sorry if this bug report is redundant, two weeks ago I'd never dealt with incubating open source in my life, much less filed a bugzilla or downloaded nightly builds. 
Generally speaking, could you tell me if filing bugzillas on nightly builds (as opposed to actual releases) is OK with open source communities?

Thanks for all your hard work.
Philippe Roland
Comment 4 Martin Taal CLA 2010-05-26 12:03:23 EDT
Hi Philippe,
Yes ofcourse filing bugzillas on nightly builds is fine :-).

gr. Martin
Comment 5 Philipp Wode CLA 2010-05-27 10:36:19 EDT
Hi Martin,

I have updated to the latest build. But when I try to generate model code nothing happens. No exception or error message appears.

Can you check this?

Thanks
Philipp
Comment 6 Martin Taal CLA 2010-05-27 10:39:43 EDT
No code gets generated either?

gr. Martin
Comment 7 Philipp Wode CLA 2010-05-27 10:54:56 EDT
Exactly
Comment 8 Martin Taal CLA 2010-05-27 10:56:54 EDT
do you anything in the 'error log view'?

gr. Martin
Comment 9 Philipp Wode CLA 2010-05-27 11:14:38 EDT
It raises an unhandled event loop exception, see below.


!ENTRY org.eclipse.ui 4 0 2010-05-27 17:12:33.964
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.IllegalStateException: Exception while generating
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:77)
	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:1003)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3910)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
	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:368)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	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:559)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
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$4.run(ProgressManager.java:966)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:1001)
	at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:976)
	at org.eclipse.ui.internal.progress.ProgressManager.run(ProgressManager.java:1182)
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:75)
	... 28 more
Caused by: java.lang.NullPointerException
	at org.eclipse.emf.texo.generator.ModelController.annotate(ModelController.java:59)
	at org.eclipse.emf.texo.eclipse.popup.actions.GenerateCode.generateFromUris(GenerateCode.java:48)
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:120)
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:99)
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.access$0(BaseGenerateAction.java:81)
	at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction$1.execute(BaseGenerateAction.java:71)
	at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Comment 10 Martin Taal CLA 2010-05-27 11:36:15 EDT
okay found it, I solved it and am doing a new build.
Comment 11 Martin Taal CLA 2010-05-27 12:33:55 EDT
I published a new build which should hopefully solve this.

Let me know if it works fine for you now.

Thanks!


gr. Martin
Comment 12 Philipp Wode CLA 2010-05-27 14:23:00 EDT
Yes, code generation works now perfectly. Good job.

Still another thing. When I try to generate a xml file using the ModelXMLSaver (as in the Wiki described) I get an IllegalStateException (see below). What does this exactly mean and how can I solve this?
Comments to JAXB support come in the Bugzilla 313494 later.

Exception in thread "main" java.lang.IllegalStateException: The class class de.philipp.sample.domain.Library is not managed by this ModelResolver
	at org.eclipse.emf.texo.utils.Check.isNotNull(Check.java:66)
	at org.eclipse.emf.texo.model.ModelResolver.getModelDescriptor(ModelResolver.java:263)
	at org.eclipse.emf.texo.model.ModelResolver.getModelObject(ModelResolver.java:208)
	at org.eclipse.emf.texo.xml.ModelEMFConverter.createTarget(ModelEMFConverter.java:134)
	at org.eclipse.emf.texo.xml.ModelEMFConverter.convert(ModelEMFConverter.java:86)
	at org.eclipse.emf.texo.xml.ModelXMLSaver.write(ModelXMLSaver.java:72)
	at de.philipp.sample.main.Main.main(Main.java:33)
Comment 13 Philipp Wode CLA 2010-05-27 14:34:32 EDT
Oh, my mistake. I forgot to call "LibraryModelFactory factory = LibraryModelPackage.MODELFACTORY;"

So everywhere works fine :)
Comment 14 Martin Taal CLA 2010-05-27 15:26:14 EDT
Yes, you need to 'touch' the model package before you can use it. I will add a remark in the wiki.

I will close this issue, please re-open it if you encounter it again.

gr. Martin