[Acceleo] Standalone problem [message #903396] |
Thu, 23 August 2012 13:28 |
pere b Messages: 7 Registered: November 2011 |
Junior Member |
|
|
Hi,
I've created a M2T transformation and I need to call it from another application (outside Eclipse). I'm following the steps listed here (http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.acceleo.doc%2Fpages%2Freference%2Fstandalone.html) but i get this exception:
Quote:Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.core.runtime.Platform
at org.eclipse.ocl.common.OCLCommon.getPreference(OCLCommon.java:74)
at org.eclipse.ocl.lpg.AbstractBasicEnvironment.getValue(AbstractBasicEnvironment.java:440)
at org.eclipse.ocl.options.ParsingOptions.getValue(ParsingOptions.java:330)
at org.eclipse.ocl.AbstractEnvironment.createTypeChecker(AbstractEnvironment.java:1214)
at org.eclipse.ocl.AbstractEnvironment.getTypeChecker(AbstractEnvironment.java:1196)
at org.eclipse.ocl.AbstractEnvironment.getAdapter(AbstractEnvironment.java:1236)
at org.eclipse.ocl.util.OCLUtil.getAdapter(OCLUtil.java:102)
at org.eclipse.ocl.util.TypeUtil.getTypeCheckerAdapter(TypeUtil.java:800)
at org.eclipse.ocl.util.TypeUtil.findAttribute(TypeUtil.java:171)
at org.eclipse.ocl.AbstractEnvironment.doLookupProperty(AbstractEnvironment.java:657)
at org.eclipse.ocl.AbstractEnvironment.lookupProperty(AbstractEnvironment.java:638)
at org.eclipse.ocl.AbstractTypeResolver.findTupleType(AbstractTypeResolver.java:430)
at org.eclipse.ocl.AbstractTypeResolver.resolveTupleType(AbstractTypeResolver.java:382)
at org.eclipse.ocl.AbstractTypeResolver$ResolveSwitch.caseTupleType(AbstractTypeResolver.java:1008)
at org.eclipse.ocl.types.util.TypesSwitch.doSwitch(TypesSwitch.java:267)
at org.eclipse.ocl.types.util.TypesSwitch.doSwitchSuperTypes(TypesSwitch.java:117)
at org.eclipse.ocl.types.util.TypesSwitch.doSwitchSuperTypes(TypesSwitch.java:122)
at org.eclipse.ocl.types.util.TypesSwitch.doSwitch(TypesSwitch.java:105)
at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69)
at org.eclipse.ocl.AbstractTypeResolver.resolve(AbstractTypeResolver.java:127)
at org.eclipse.ocl.AbstractTypeResolver$ResolveSwitch.caseCollectionType(AbstractTypeResolver.java:1003)
at org.eclipse.ocl.types.util.TypesSwitch.doSwitch(TypesSwitch.java:168)
at org.eclipse.ocl.types.util.TypesSwitch.doSwitchSuperTypes(TypesSwitch.java:117)
at org.eclipse.ocl.types.util.TypesSwitch.doSwitchSuperTypes(TypesSwitch.java:122)
at org.eclipse.ocl.types.util.TypesSwitch.doSwitchSuperTypes(TypesSwitch.java:122)
at org.eclipse.ocl.types.util.TypesSwitch.doSwitch(TypesSwitch.java:105)
at org.eclipse.emf.ecore.util.Switch.doSwitch(Switch.java:69)
at org.eclipse.ocl.AbstractTypeResolver.resolve(AbstractTypeResolver.java:127)
at org.eclipse.ocl.util.TypeUtil.resolveType(TypeUtil.java:617)
at org.eclipse.ocl.util.OCLStandardLibraryUtil.getSetType(OCLStandardLibraryUtil.java:2216)
at org.eclipse.ocl.util.OCLStandardLibraryUtil.createCollectionOperations(OCLStandardLibraryUtil.java:1754)
at org.eclipse.ocl.ecore.internal.OCLStandardLibraryImpl.build(OCLStandardLibraryImpl.java:375)
at org.eclipse.ocl.ecore.internal.OCLStandardLibraryImpl.init(OCLStandardLibraryImpl.java:205)
at org.eclipse.ocl.ecore.internal.OCLStandardLibraryImpl.<clinit>(OCLStandardLibraryImpl.java:97)
at org.eclipse.ocl.ecore.EcoreEnvironment.getOCLStandardLibrary(EcoreEnvironment.java:271)
at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator.getOCLStdLibPackage(AbstractAcceleoGenerator.java:728)
at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator.registerPackages(AbstractAcceleoGenerator.java:503)
at org.eclipse.acceleo.module.m2t_jmt.main.Generate.registerPackages(Generate.java:346)
at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator.initialize(AbstractAcceleoGenerator.java:422)
at org.eclipse.acceleo.module.m2t_jmt.main.Generate.<init>(Generate.java:92)
at acceleotest.AcceleoTest.main(AcceleoTest.java:35)
Java Result: 1
Previosly I was getting a different exception. I solved it by including the library org.eclipse.ocl.common in the project.
I don't know what is wrong, can you help me?
Thanks a lot!
[Updated on: Thu, 23 August 2012 13:28] Report message to a moderator
|
|
|
|
Re: [Acceleo] Standalone problem [message #903434 is a reply to message #903427] |
Thu, 23 August 2012 15:37 |
pere b Messages: 7 Registered: November 2011 |
Junior Member |
|
|
Thanks for your answer, Ed.
I should have said that I already have added org.eclipse.core.runtime to the project. In fact, I have added every org.eclipse.core.runtime.* jar that I've found...
How do I make my project a Plugin project? I export my acceleo project as a "Deployable plug-ins and fragments". Should I export it as a Runnable jar?
[Updated on: Thu, 23 August 2012 15:38] Report message to a moderator
|
|
|
|
|
|
|
|
Re: [Acceleo] Standalone problem [message #904418 is a reply to message #903571] |
Tue, 28 August 2012 11:52 |
|
Hi,
The inclusion of these three new "required at runtime" jars is a regression. Commented on the bug mentionned by Ed. o.e.core.runtime at least we can remove, I'd need to track down what forces us to have ocl.common and osgi too in order to determine whether these regressions can be resolved or if we have to live with them.
Laurent Goubet
Obeo
|
|
|
Powered by
FUDForum. Page generated in 2.23413 seconds