Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo 3] Internal Error - installBundle - NullPointerException
[Acceleo 3] Internal Error - installBundle - NullPointerException [message #645683] Sun, 19 December 2010 19:57 Go to next message
Kirsten M. Z. is currently offline Kirsten M. Z.Friend
Messages: 132
Registered: July 2010
Senior Member
Hello,

in past (~half a year) I learned to use Acceleo and was able to use it for some use cases. However, with the newest bundles (Acceleo 3.0.1 or 3.1.0M4) together with Topcased/Eclipse 4.2.0 and 4.2.1 I am unable to start a Acceleo generation.

I want to start my M2T by using the IDE and a "Acceleo Application" configuration ("Acceleo Plug-In Application"). However, I get the following error:

An internal error occurred during: "Launching MyModel2Code".

java.lang.NullPointerException
at org.eclipse.acceleo.common.internal.utils.workspace.AcceleoWorkspaceUtil.installBundle(AcceleoWorkspaceUtil.java:877)
at org.eclipse.acceleo.common.internal.utils.workspace.AcceleoWorkspaceUtil.refreshContributions(AcceleoWorkspaceUtil.java:647)
at org.eclipse.acceleo.common.internal.utils.workspace.AcceleoWorkspaceUtil.getClass(AcceleoWorkspaceUtil.java:419)
at org.eclipse.acceleo.ide.ui.launching.strategy.AcceleoLaunchOperation.run(AcceleoLaunchOperation.java:97)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1957)
at org.eclipse.acceleo.ide.ui.launching.strategy.AcceleoPluginLaunchingStrategy.launch(AcceleoPluginLaunchingStrategy.java:220)
at org.eclipse.acceleo.ide.ui.launching.strategy.AcceleoPluginLaunchingStrategy.launch(AcceleoPluginLaunchingStrategy.java:124)
at org.eclipse.acceleo.internal.ide.ui.launching.AcceleoLaunchDelegate.launch(AcceleoLaunchDelegate.java:51)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:853)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:702)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:923)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1126)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)


The error happens even before any code of mine. I have absolutely no idea where to start solving this problem. My sources/project does not have any obvious error.

I also checked an Acceleo sample project. It did not work immediately, but finally it started and I was able to debug the MTL file.

Thanks in advance!
Re: [Acceleo 3] Internal Error - installBundle - NullPointerException [message #645686 is a reply to message #645683] Sun, 19 December 2010 21:50 Go to previous messageGo to next message
Kirsten M. Z. is currently offline Kirsten M. Z.Friend
Messages: 132
Registered: July 2010
Senior Member
Oh... Crying or Very Sad

The more I try, the more errors I get. Right now, I am testing for 12 hours, and I still have no idea what's wrong.

I often get errors like "Structural feature 'lement' not found", "The feature 'lement' is not a valid feature" or "Structural feature 'uardian' not found". Yes, somehow the first letter of the feature gets swallowed (only experienced this with Acceleo 3.0.1).

However, I also get another very interesting error right now (sometimes). This error seems like a "meaningful error" (in contrast to the other ones). He tells me, that my class definition cannot be found (org/example/MyModelPackage). I cannot comprehend this error, because the file "org/example/MyModelPackage.class" exists. Its jar file is also in the build path of my Acceleo project. The according plug-in is also installed in my Eclipse environment. This is not enough? How is it possible, that he complains, that he cannot find the class definition?

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$5.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.acceleo.module.sample17.ui.popupMenus.AcceleoGenerateSampleAction.run(AcceleoGenerateSampleAction.java:91)
	at org.eclipse.ui.actions.ActionDelegate.runWithEvent(ActionDelegate.java:70)
	at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:241)
	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:4066)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
	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:369)
	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:619)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
Caused by: java.lang.NoClassDefFoundError: org/example/MyModelPackage
	at org.eclipse.acceleo.module.sample17.files.Generate.registerPackages(Generate.java:252)
	at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator.initialize(AbstractAcceleoGenerator.java:291)
	at org.eclipse.acceleo.module.sample17.files.Generate.<init>(Generate.java:83)
	at org.eclipse.acceleo.module.sample17.ui.common.GenerateAll.doGenerate(GenerateAll.java:88)
	at org.eclipse.acceleo.module.sample17.ui.popupMenus.AcceleoGenerateSampleAction$1.run(AcceleoGenerateSampleAction.java:76)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)


or

java.lang.NoClassDefFoundError: org/example/MyModelPackage
	at org.eclipse.acceleo.module.sample17.files.Generate.registerPackages(Generate.java:252)
	at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator.initialize(AbstractAcceleoGenerator.java:291)
	at org.eclipse.acceleo.module.sample17.files.Generate.<init>(Generate.java:83)
	at org.eclipse.acceleo.module.sample17.ui.common.GenerateAll.doGenerate(GenerateAll.java:88)
	at org.eclipse.acceleo.module.sample17.ui.popupMenus.AcceleoGenerateSampleAction$1.run(AcceleoGenerateSampleAction.java:76)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: java.lang.ClassNotFoundException: org/example/MyModelPackage
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	... 6 more

[Updated on: Sun, 19 December 2010 21:58]

Report message to a moderator

Re: [Acceleo 3] Internal Error - installBundle - NullPointerException [message #645733 is a reply to message #645686] Mon, 20 December 2010 09:52 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------060807060900090900070603
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

I don't really know what you've tested, but you seem to mix multiple
things here...

First things first : if you are developping Eclipse plugins, you should
never have to play with the build path or jar files. When you need to
add a dependency to your project, you open the META-INF/MANIFEST.MF
file, open the "dependencies" tab, then add the dependency from there.
Adding the jar file to the build path will only get you obscure errors.

The first error you got (with the "installBundle" trace) means that your
generator project has a dependency towards another project of your
workspace ... which is not a plugin or which has invalid MANIFEST.MF or
plugin.xml artifacts.

If you follow the "getting started" for Acceleo, do you still get these
errors :

- Create a New -> Acceleo Project
- Add dependencies from the MANIFEST.MF to the required projects
- Copy/paste your generators in this 'clean' project
- Try and launch the generation

Laurent Goubet
Obeo

On 19/12/2010 22:50, vultur wrote:
> Oh... :cry:
> The more I try, the more errors I get. Right now, I am testing for 12
> hours, and I still have no idea what's wrong.
>
> I often get errors like "Structural feature 'lement' not found" or
> "Structural feature 'uardian' not found". Yes, somehow the first letter
> of the feature gets swallowed (only experienced this with Acceleo 3.0.1).
>
> However, I also get another very interesting error right now
> (sometimes). This error seems like a "meaningful error" (in contrast to
> the other ones). He tells me, that my class definition cannot be found
> (org/example/MyModelPackage). I cannot comprehend this error, because
> the file "org/example/MyModelPackage.class" exists. Its jar file is also
> in the build path of my Acceleo project. The according plug-in is also
> installed in my Eclipse environment. This is not enough? How is it
> possible, that he complains, that he cannot find the class definition?
>
> java.lang.reflect.InvocationTargetException
> at org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:421)
> at
> org.eclipse.jface.dialogs.ProgressMonitorDialog.run(Progress MonitorDialog.java:507)
>
> at
> org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.r un(ProgressMonitorJobsDialog.java:275)
>
> at
> org.eclipse.ui.internal.progress.ProgressManager$5.run(Progr essManager.java:960)
>
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:70)
> at
> org.eclipse.ui.internal.progress.ProgressManager.busyCursorW hile(ProgressManager.java:995)
>
> at
> org.eclipse.ui.internal.progress.ProgressManager.busyCursorW hile(ProgressManager.java:970)
>
> at
> org.eclipse.ui.internal.progress.ProgressManager.run(Progres sManager.java:1166)
>
> at
> org.eclipse.acceleo.module.sample17.ui.popupMenus.AcceleoGen erateSampleAction.run(AcceleoGenerateSampleAction.java:91)
>
> at
> org.eclipse.ui.actions.ActionDelegate.runWithEvent(ActionDel egate.java:70)
> at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:241)
> at
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:584)
>
> at
> org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:501)
>
> at
> org.eclipse.jface.action.ActionContributionItem$5.handleEven t(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.ja va:4066)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3657)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2640)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:24 38)
> at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:332)
>
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:664)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:115)
>
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.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(EclipseS tarter.java:369)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.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: 619)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
> Caused by: java.lang.NoClassDefFoundError: org/example/MyModelPackage
> at
> org.eclipse.acceleo.module.sample17.files.Generate.registerP ackages(Generate.java:252)
>
> at
> org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator. initialize(AbstractAcceleoGenerator.java:291)
>
> at
> org.eclipse.acceleo.module.sample17.files.Generate.<init>(Generate.java:83)
> at
> org.eclipse.acceleo.module.sample17.ui.common.GenerateAll.do Generate(GenerateAll.java:88)
>
> at
> org.eclipse.acceleo.module.sample17.ui.popupMenus.AcceleoGen erateSampleAction$1.run(AcceleoGenerateSampleAction.java:76)
>
> at
> org.eclipse.jface.operation.ModalContext$ModalContextThread. run(ModalContext.java:121)
>


--------------060807060900090900070603
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------060807060900090900070603--
Previous Topic:Setting up mwe workflow file contents?
Next Topic:[Xpand] : runing workflows with ant or Maven
Goto Forum:
  


Current Time: Thu Oct 10 08:03:51 GMT 2024

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

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

Back to the top