[Acceleo] NullPointerException when running standalone [message #1755338] |
Thu, 02 March 2017 08:06  |
Eclipse User |
|
|
|
Hi,
i have a Project to generate Java files with Acceleo. When i start the generation in eclipse everything works just fine.
If i start the generation without eclipse, so just the exported jar file, i get the following exception:
Quote:java.lang.NullPointerException
at org.eclipse.acceleo.common.internal.utils.workspace.AcceleoWorkspaceUtil.getResourceURL(AcceleoWorkspaceUtil.java:278)
at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator.findModuleURL(AbstractAcceleoGenerator.java:746)
at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator.initialize(AbstractAcceleoGenerator.java:408)
at cpsModeler.logic.interceptor.codeGenerator.main.Generate.<init>(Generate.java:118)
here is the code i use to start the generation:
File projectRoot = new File(getMySourcePath().concat(acceleoFilesPath));
AcceleoProject acceleoProject = new AcceleoProject(projectRoot);
new AcceleoParser(acceleoProject, false, false, false).buildAll(null);
Generate codeGenerator = new Generate(model, new File(getMySourcePath() + outputPath),Collections.emptyList());
codeGenerator.registerPackages(generationResource.getResourceSet());
codeGenerator.registerResourceFactories(generationResource.getResourceSet());
codeGenerator.doGenerate(new BasicMonitor());
Here Generate is the automatically generated java file from Acceleo.
What am i doing wrong? Any Ideas?
|
|
|
|
|
Re: [Acceleo] NullPointerException when running standalone [message #1757824 is a reply to message #1756304] |
Mon, 20 March 2017 07:12  |
Eclipse User |
|
|
|
Thanks for your reply.
I also suggest, that this Plugin is not running but could not yet figure out why. Maybe i missed something i should have executed but did still not find any information about it. Working examples can only be run in eclipse (what is my current problem) where the acceleo plugin seems to start this specific plugin.
Best regards
Benno
|
|
|
Powered by
FUDForum. Page generated in 0.03063 seconds