Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » [Luna] OCLinEcoreStandaloneSetup fails
[Luna] OCLinEcoreStandaloneSetup fails [message #1389273] Fri, 27 June 2014 15:10 Go to next message
Matthias Schoettle is currently offline Matthias SchoettleFriend
Messages: 21
Registered: July 2009
Junior Member
Hello,

I just updated Eclipse from Kepler to Luna and I have some problems with the standalone setup of OCL in Ecore. My project depends on org.eclipse.ocl.examples.xtext.oclinecore (and its dependencies) and my previous initialization code run as a Java application throws an exception in Luna, but not in Kepler:

org.eclipse.ocl.examples.pivot.OCL.initialize(null);
String oclDelegateURI = OCLDelegateDomain.OCL_DELEGATE_URI_PIVOT;    
EOperation.Internal.InvocationDelegate.Factory.Registry.INSTANCE.put(oclDelegateURI,
            new OCLInvocationDelegateFactory.Global());
EStructuralFeature.Internal.SettingDelegate.Factory.Registry.INSTANCE.put(oclDelegateURI,
            new OCLSettingDelegateFactory.Global());
EValidator.ValidationDelegate.Registry.INSTANCE.put(oclDelegateURI,
            new OCLValidationDelegateFactory.Global());
OCLinEcoreStandaloneSetup.doSetup();
org.eclipse.ocl.examples.pivot.model.OCLstdlib.install();


Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/uml2/uml/Type 
at org.eclipse.ocl.examples.pivot.PivotStandaloneSetup.init(PivotStandaloneSetup.java:71)
at org.eclipse.ocl.examples.pivot.PivotStandaloneSetup.createInjectorAndDoEMFRegistration(PivotStandaloneSetup.java:124)
at org.eclipse.ocl.examples.pivot.PivotStandaloneSetup.doSetup(PivotStandaloneSetup.java:59)
at org.eclipse.ocl.examples.xtext.base.BaseStandaloneSetup.init(BaseStandaloneSetup.java:44)
at org.eclipse.ocl.examples.xtext.base.BaseStandaloneSetup.createInjectorAndDoEMFRegistration(BaseStandaloneSetup.java:68)
at org.eclipse.ocl.examples.xtext.base.BaseStandaloneSetup.doSetup(BaseStandaloneSetup.java:35)
at org.eclipse.ocl.examples.xtext.essentialocl.EssentialOCLStandaloneSetup.init(EssentialOCLStandaloneSetup.java:48)
at org.eclipse.ocl.examples.xtext.essentialocl.EssentialOCLStandaloneSetup.createInjectorAndDoEMFRegistration(EssentialOCLStandaloneSetup.java:77)
at org.eclipse.ocl.examples.xtext.essentialocl.EssentialOCLStandaloneSetup.doSetup(EssentialOCLStandaloneSetup.java:39)
at org.eclipse.ocl.examples.xtext.oclinecore.OCLinEcoreStandaloneSetupGenerated.createInjectorAndDoEMFRegistration(OCLinEcoreStandaloneSetupGenerated.java:30)
at org.eclipse.ocl.examples.xtext.oclinecore.OCLinEcoreStandaloneSetup.doSetup(OCLinEcoreStandaloneSetup.java:30)


The PivotStandaloneSetup class seems to call UMLASResourceFactory.INSTANCE.getClass(); in the Luna version. Previously the containing plugin depended on uml2.uml and uml2.uml.resources.

Is there anything missing in my initialization code or is this a bug?

Thank you!
Re: [Luna] OCLinEcoreStandaloneSetup fails [message #1389274 is a reply to message #1389273] Fri, 27 June 2014 15:14 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7670
Registered: July 2009
Senior Member
Hi

The new code no longer re-exports UML, which allows us to support both
Eclipse UML 4.0 (on Indigo and Juno) and 5.0 (on Luna and Mars).

Just add your own dependency on org.eclipse.uml2.uml.resources

Regards

Ed Willink


On 27/06/2014 16:10, Matthias Schoettle wrote:
> Hello,
>
> I just updated Eclipse from Kepler to Luna and I have some problems
> with the standalone setup of OCL in Ecore. My project depends on
> org.eclipse.ocl.examples.xtext.oclinecore (and its dependencies) and
> my previous initialization code run as a Java application throws an
> exception in Luna, but not in Kepler:
> org.eclipse.ocl.examples.pivot.OCL.initialize(null);
> String oclDelegateURI = OCLDelegateDomain.OCL_DELEGATE_URI_PIVOT;
> EOperation.Internal.InvocationDelegate.Factory.Registry.INSTANCE.put(oclDelegateURI,
> new OCLInvocationDelegateFactory.Global());
> EStructuralFeature.Internal.SettingDelegate.Factory.Registry.INSTANCE.put(oclDelegateURI,
>
> new OCLSettingDelegateFactory.Global());
> EValidator.ValidationDelegate.Registry.INSTANCE.put(oclDelegateURI,
> new OCLValidationDelegateFactory.Global());
> OCLinEcoreStandaloneSetup.doSetup();
> org.eclipse.ocl.examples.pivot.model.OCLstdlib.install();
>
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/eclipse/uml2/uml/Type at
> org.eclipse.ocl.examples.pivot.PivotStandaloneSetup.init(PivotStandaloneSetup.java:71)
> at
> org.eclipse.ocl.examples.pivot.PivotStandaloneSetup.createInjectorAndDoEMFRegistration(PivotStandaloneSetup.java:124)
> at
> org.eclipse.ocl.examples.pivot.PivotStandaloneSetup.doSetup(PivotStandaloneSetup.java:59)
> at
> org.eclipse.ocl.examples.xtext.base.BaseStandaloneSetup.init(BaseStandaloneSetup.java:44)
> at
> org.eclipse.ocl.examples.xtext.base.BaseStandaloneSetup.createInjectorAndDoEMFRegistration(BaseStandaloneSetup.java:68)
> at
> org.eclipse.ocl.examples.xtext.base.BaseStandaloneSetup.doSetup(BaseStandaloneSetup.java:35)
> at
> org.eclipse.ocl.examples.xtext.essentialocl.EssentialOCLStandaloneSetup.init(EssentialOCLStandaloneSetup.java:48)
> at
> org.eclipse.ocl.examples.xtext.essentialocl.EssentialOCLStandaloneSetup.createInjectorAndDoEMFRegistration(EssentialOCLStandaloneSetup.java:77)
> at
> org.eclipse.ocl.examples.xtext.essentialocl.EssentialOCLStandaloneSetup.doSetup(EssentialOCLStandaloneSetup.java:39)
> at
> org.eclipse.ocl.examples.xtext.oclinecore.OCLinEcoreStandaloneSetupGenerated.createInjectorAndDoEMFRegistration(OCLinEcoreStandaloneSetupGenerated.java:30)
> at
> org.eclipse.ocl.examples.xtext.oclinecore.OCLinEcoreStandaloneSetup.doSetup(OCLinEcoreStandaloneSetup.java:30)
>
> The PivotStandaloneSetup class seems to call
> UMLASResourceFactory.INSTANCE.getClass(); in the Luna version.
> Previously the containing plugin depended on uml2.uml and
> uml2.uml.resources.
>
> Is there anything missing in my initialization code or is this a bug?
>
> Thank you!
Previous Topic:OCL counting child elements in a profile
Next Topic:Best way for evaluating an operation with parameters
Goto Forum:
  


Current Time: Tue Sep 24 03:23:39 GMT 2024

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

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

Back to the top