Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Exception in [org.eclipse.emf.compare.examples.standalone]
Exception in [org.eclipse.emf.compare.examples.standalone] [message #135420] Mon, 27 April 2009 22:10 Go to next message
Eclipse UserFriend
Originally posted by: renezilz.web.de

Hello!
I tried the exanple of the standalone version of emf compare which you
can find
under:http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.e mf/org.eclipse.emf.compare/examples/org.eclipse.emf.compare. examples.standalone/?root=Modeling_Project
At first he did not know the type ComparisonResourceSnapshot. Because of
this I replaced the type through ModelInputSnapshot. Now the
example shows no errors but if I try to run the application I get
following exception:
Exception in thread "main" java.lang.NoClassDefFoundError:
org/eclipse/uml2/common/util/CacheAdapter
at
org.eclipse.uml2.uml.internal.impl.ElementImpl.getCacheAdapt er(ElementImpl.java:714)
at
org.eclipse.uml2.uml.internal.impl.ElementImpl.eNotification Required(ElementImpl.java:852)
at
org.eclipse.uml2.uml.internal.impl.NamedElementImpl.setName( NamedElementImpl.java:263)
at org.eclipse.uml2.uml.internal.impl.ModelImpl.eSet(ModelImpl. java:266)
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjec tImpl.java:1071)
at
org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHel perImpl.java:1154)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2643)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.setAttribValue(XML Handler.java:2702)
at
org.eclipse.emf.ecore.xmi.impl.SAXXMIHandler.handleObjectAtt ribs(SAXXMIHandler.java:85)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFa ctory(XMLHandler.java:2178)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType (XMLHandler.java:1316)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XM LHandler.java:1454)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XML Handler.java:1019)
at
org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMI Handler.java:83)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:1001)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:712)
at
org.eclipse.emf.ecore.xmi.impl.XMIHandler.startElement(XMIHa ndler.java:167)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .startElement(AbstractSAXParser.java:501)
at
com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator. startElement(XMLDTDValidator.java:767)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.j ava:1359)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$ContentDriver.scanRootElementHook(XMLDocumentScannerImpl. java:1316)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl$FragmentContentDriver.next(XMLDocumentFragmentSca nnerImpl.java:3095)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$PrologDriver.next(XMLDocumentScannerImpl.java:921)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl.next(XMLDocumentScannerImpl.java:648)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java: 510)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:807)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:737)
at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(X MLParser.java:107)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(AbstractSAXParser.java:1205)
at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(SAXParserImpl.java:522)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:181)
at
org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1445)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1241)
at org.eclipse.emf.compare.util.ModelUtils.load(ModelUtils.java :320)
at org.eclipse.emf.compare.util.ModelUtils.load(ModelUtils.java :218)
at ExampleLauncher.main(ExampleLauncher.java:67)
Caused by: java.lang.ClassNotFoundException:
org.eclipse.uml2.common.util.CacheAdapter
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301 )
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320 )
... 38 more



Can anybody help me? What am I doing wrong?
Re: Exception in [org.eclipse.emf.compare.examples.standalone] [message #135433 is a reply to message #135420] Tue, 28 April 2009 08:59 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------030506080405070407000407
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hi Rene,

See comments inlined below.

Rene Zilz a
Re: Exception in [org.eclipse.emf.compare.examples.standalone] [message #135576 is a reply to message #135433] Wed, 29 April 2009 16:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: renezilz.web.de

Hello laurent!
Thank you very much for this. The merging runs without any problems. :)

Now I tried to start the comparision editor for the emfdiff result.
I added following lines to the ExampleLauncher:
ModelCompareEditorInput input=new ModelCompareEditorInput(snapshot);
CompareUI.openCompareEditor(input);

After I added this and trying to start the application, I got a lot of
NoClassDefFoundError. For example first was missing
org.eclipse.ui.IEditorInput,
then
org.eclipse.core.runtime.IAdaptable
org/osgi/framework/BundleActivator
org/eclipse/core/runtime/preferences/IScopeContext
and so on..


Because of this I think I'm doing something wrong.
Can anybody help me?

Best regards
rene


laurent Goubet wrote:
> Hi Rene,
>
> See comments inlined below.
>
> Rene Zilz a écrit :
>> Hello!
>> I tried the exanple of the standalone version of emf compare which you
>> can find
>> under:http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.e mf/org.eclipse.emf.compare/examples/org.eclipse.emf.compare. examples.standalone/?root=Modeling_Project
>>
>
> EMF Compare is standalone, this isn't the "standalone version", merely
> an example of a the way to use it as a standalone application :).
>
>> At first he did not know the type ComparisonResourceSnapshot. Because
>> of this I replaced the type through ModelInputSnapshot. Now the
>
> This means you have downloaded the latest version of the example, but
> are using an old version of EMF Compare itself. This API has changed a
> couple of months ago and "ModelInputSnapshot" no longer exists.
>
>> example shows no errors but if I try to run the application I get
>> following exception:
>> Exception in thread "main" java.lang.NoClassDefFoundError:
>> org/eclipse/uml2/common/util/CacheAdapter
>
> You are using EMF Compare ot compare uml models but you didn't add the
> library org.eclipse.uml2.common to your classpath.
>
>> at
>> org.eclipse.uml2.uml.internal.impl.ElementImpl.getCacheAdapt er(ElementImpl.java:714)
>>
>> at
>> org.eclipse.uml2.uml.internal.impl.ElementImpl.eNotification Required(ElementImpl.java:852)
>>
>> at
>> org.eclipse.uml2.uml.internal.impl.NamedElementImpl.setName( NamedElementImpl.java:263)
>>
>> at
>> org.eclipse.uml2.uml.internal.impl.ModelImpl.eSet(ModelImpl. java:266)
>> at
>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjec tImpl.java:1071)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHel perImpl.java:1154)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2643)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setAttribValue(XML Handler.java:2702)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.SAXXMIHandler.handleObjectAtt ribs(SAXXMIHandler.java:85)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFa ctory(XMLHandler.java:2178)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType (XMLHandler.java:1316)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XM LHandler.java:1454)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XML Handler.java:1019)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMI Handler.java:83)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:1001)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:712)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMIHandler.startElement(XMIHa ndler.java:167)
>>
>> at
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .startElement(AbstractSAXParser.java:501)
>>
>> at
>> com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator. startElement(XMLDTDValidator.java:767)
>>
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.j ava:1359)
>>
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$ContentDriver.scanRootElementHook(XMLDocumentScannerImpl. java:1316)
>>
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl$FragmentContentDriver.next(XMLDocumentFragmentSca nnerImpl.java:3095)
>>
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$PrologDriver.next(XMLDocumentScannerImpl.java:921)
>>
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl.next(XMLDocumentScannerImpl.java:648)
>>
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java: 510)
>>
>> at
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:807)
>>
>> at
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:737)
>>
>> at
>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(X MLParser.java:107)
>>
>> at
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(AbstractSAXParser.java:1205)
>>
>> at
>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(SAXParserImpl.java:522)
>>
>> at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:181)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1445)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1241)
>>
>> at org.eclipse.emf.compare.util.ModelUtils.load(ModelUtils.java :320)
>> at org.eclipse.emf.compare.util.ModelUtils.load(ModelUtils.java :218)
>> at ExampleLauncher.main(ExampleLauncher.java:67)
>> Caused by: java.lang.ClassNotFoundException:
>> org.eclipse.uml2.common.util.CacheAdapter
>> at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301 )
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
>> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320 )
>> ... 38 more
>>
>>
>>
>> Can anybody help me? What am I doing wrong?
>
> I think the above should answer this, do not hesitate to come back to us
> if it didn't :).
>
> Laurent Goubet
> Obeo
>
Re: Exception in [org.eclipse.emf.compare.examples.standalone] [message #135639 is a reply to message #135576] Thu, 30 April 2009 07:58 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------030602040502070804000906
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hi Rene,

That doesn't really surprise me, EMF Compare can be run standalone, yet
its UI cannot. Our UI is tightly integrated with the Eclipse UI and thus
heavily depends on it. We have neither RCP nor standalone UI for EMF
Compare and if you seek on displaying the compare editor you will have
to do it from within an Eclipse instance (the code you've copy pasted is
what's needed for that).

Laurent Goubet
Obeo

Rene Zilz a
Re: Exception in [org.eclipse.emf.compare.examples.standalone] [message #135666 is a reply to message #135639] Thu, 30 April 2009 09:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: renezilz.web.de

Hello laurent!
yes I use Eclipse and also try to start the comparisionEditor in
Eclipse. But I get the errors all the same.


laurent Goubet wrote:
> Hi Rene,
>
> That doesn't really surprise me, EMF Compare can be run standalone, yet
> its UI cannot. Our UI is tightly integrated with the Eclipse UI and thus
> heavily depends on it. We have neither RCP nor standalone UI for EMF
> Compare and if you seek on displaying the compare editor you will have
> to do it from within an Eclipse instance (the code you've copy pasted is
> what's needed for that).
>
> Laurent Goubet
> Obeo
>
> Rene Zilz a écrit :
>> Hello laurent!
>> Thank you very much for this. The merging runs without any problems. :)
>>
>> Now I tried to start the comparision editor for the emfdiff result.
>> I added following lines to the ExampleLauncher:
>> ModelCompareEditorInput input=new ModelCompareEditorInput(snapshot);
>> CompareUI.openCompareEditor(input);
>>
>> After I added this and trying to start the application, I got a lot of
>> NoClassDefFoundError. For example first was missing
>> org.eclipse.ui.IEditorInput,
>> then
>> org.eclipse.core.runtime.IAdaptable
>> org/osgi/framework/BundleActivator
>> org/eclipse/core/runtime/preferences/IScopeContext
>> and so on..
>>
>>
>> Because of this I think I'm doing something wrong.
>> Can anybody help me?
>>
>> Best regards
>> rene
>>
>>
>> laurent Goubet wrote:
>>> Hi Rene,
>>>
>>> See comments inlined below.
>>>
>>> Rene Zilz a écrit :
>>>> Hello!
>>>> I tried the exanple of the standalone version of emf compare which
>>>> you can find
>>>> under:http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.e mf/org.eclipse.emf.compare/examples/org.eclipse.emf.compare. examples.standalone/?root=Modeling_Project
>>>>
>>>
>>> EMF Compare is standalone, this isn't the "standalone version",
>>> merely an example of a the way to use it as a standalone application :).
>>>
>>>> At first he did not know the type ComparisonResourceSnapshot.
>>>> Because of this I replaced the type through ModelInputSnapshot.
>>>> Now the
>>>
>>> This means you have downloaded the latest version of the example, but
>>> are using an old version of EMF Compare itself. This API has changed
>>> a couple of months ago and "ModelInputSnapshot" no longer exists.
>>>
>>>> example shows no errors but if I try to run the application I get
>>>> following exception:
>>>> Exception in thread "main" java.lang.NoClassDefFoundError:
>>>> org/eclipse/uml2/common/util/CacheAdapter
>>>
>>> You are using EMF Compare ot compare uml models but you didn't add
>>> the library org.eclipse.uml2.common to your classpath.
>>>
>>>> at
>>>> org.eclipse.uml2.uml.internal.impl.ElementImpl.getCacheAdapt er(ElementImpl.java:714)
>>>>
>>>> at
>>>> org.eclipse.uml2.uml.internal.impl.ElementImpl.eNotification Required(ElementImpl.java:852)
>>>>
>>>> at
>>>> org.eclipse.uml2.uml.internal.impl.NamedElementImpl.setName( NamedElementImpl.java:263)
>>>>
>>>> at
>>>> org.eclipse.uml2.uml.internal.impl.ModelImpl.eSet(ModelImpl. java:266)
>>>> at
>>>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjec tImpl.java:1071)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHel perImpl.java:1154)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2643)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setAttribValue(XML Handler.java:2702)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.SAXXMIHandler.handleObjectAtt ribs(SAXXMIHandler.java:85)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFa ctory(XMLHandler.java:2178)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType (XMLHandler.java:1316)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XM LHandler.java:1454)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XML Handler.java:1019)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMI Handler.java:83)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:1001)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:712)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMIHandler.startElement(XMIHa ndler.java:167)
>>>>
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .startElement(AbstractSAXParser.java:501)
>>>>
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator. startElement(XMLDTDValidator.java:767)
>>>>
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.j ava:1359)
>>>>
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$ContentDriver.scanRootElementHook(XMLDocumentScannerImpl. java:1316)
>>>>
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl$FragmentContentDriver.next(XMLDocumentFragmentSca nnerImpl.java:3095)
>>>>
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$PrologDriver.next(XMLDocumentScannerImpl.java:921)
>>>>
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl.next(XMLDocumentScannerImpl.java:648)
>>>>
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java: 510)
>>>>
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:807)
>>>>
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:737)
>>>>
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(X MLParser.java:107)
>>>>
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(AbstractSAXParser.java:1205)
>>>>
>>>> at
>>>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(SAXParserImpl.java:522)
>>>>
>>>> at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:181)
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1445)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1241)
>>>>
>>>> at
>>>> org.eclipse.emf.compare.util.ModelUtils.load(ModelUtils.java :320)
>>>> at
>>>> org.eclipse.emf.compare.util.ModelUtils.load(ModelUtils.java :218)
>>>> at ExampleLauncher.main(ExampleLauncher.java:67)
>>>> Caused by: java.lang.ClassNotFoundException:
>>>> org.eclipse.uml2.common.util.CacheAdapter
>>>> at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>>>> at java.security.AccessController.doPrivileged(Native Method)
>>>> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>>>> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301 )
>>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
>>>> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320 )
>>>> ... 38 more
>>>>
>>>>
>>>>
>>>> Can anybody help me? What am I doing wrong?
>>>
>>> I think the above should answer this, do not hesitate to come back to
>>> us if it didn't :).
>>>
>>> Laurent Goubet
>>> Obeo
>>>
>
Re: Exception in [org.eclipse.emf.compare.examples.standalone] [message #135679 is a reply to message #135666] Thu, 30 April 2009 10:00 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.
--------------030601060008040706080305
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Rene,

The problem you had at first tend to prove you are running a "java
application" and not an "Eclipse application". If what you are tryng to
do is simply compare two files and have the comparison result displayed
in Eclipse, you can simply select your two files, right-click them and
select compare with => each other. The EMF Compare FAQ at
http://wiki.eclipse.org/EMF_Compare_FAQ show how to add your extension
to the list of files EMF Compare should take into account.

If you need to programmatically call EMF Compare without displaying its
UI, you can create a Java program such as shown in the standalone
example. On the other hand if you need to programmatically compare two
files and display the result in the Eclipse comparison UI, you need to
create a plugin and have the comparison code within, then have a way to
call the code of your plugin from a runtime Eclipse workbench
(right-click action on the files for example).

If you have never developped Eclipse plugins, I think the
org.eclipse.newcomer newsgroup is your best bet for pointers on
documentation or tutorials.

Regards

Laurent Goubet
Obeo

Rene Zilz a
Re: Exception in [org.eclipse.emf.compare.examples.standalone] [message #620879 is a reply to message #135420] Tue, 28 April 2009 08:59 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.
--------------030506080405070407000407
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hi Rene,

See comments inlined below.

Rene Zilz a
Re: Exception in [org.eclipse.emf.compare.examples.standalone] [message #620890 is a reply to message #135433] Wed, 29 April 2009 16:55 Go to previous message
Eclipse UserFriend
Originally posted by: renezilz.web.de

Hello laurent!
Thank you very much for this. The merging runs without any problems. :)

Now I tried to start the comparision editor for the emfdiff result.
I added following lines to the ExampleLauncher:
ModelCompareEditorInput input=new ModelCompareEditorInput(snapshot);
CompareUI.openCompareEditor(input);

After I added this and trying to start the application, I got a lot of
NoClassDefFoundError. For example first was missing
org.eclipse.ui.IEditorInput,
then
org.eclipse.core.runtime.IAdaptable
org/osgi/framework/BundleActivator
org/eclipse/core/runtime/preferences/IScopeContext
and so on..


Because of this I think I'm doing something wrong.
Can anybody help me?

Best regards
rene


laurent Goubet wrote:
> Hi Rene,
>
> See comments inlined below.
>
> Rene Zilz a écrit :
>> Hello!
>> I tried the exanple of the standalone version of emf compare which you
>> can find
>> under:http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.e mf/org.eclipse.emf.compare/examples/org.eclipse.emf.compare. examples.standalone/?root=Modeling_Project
>>
>
> EMF Compare is standalone, this isn't the "standalone version", merely
> an example of a the way to use it as a standalone application :).
>
>> At first he did not know the type ComparisonResourceSnapshot. Because
>> of this I replaced the type through ModelInputSnapshot. Now the
>
> This means you have downloaded the latest version of the example, but
> are using an old version of EMF Compare itself. This API has changed a
> couple of months ago and "ModelInputSnapshot" no longer exists.
>
>> example shows no errors but if I try to run the application I get
>> following exception:
>> Exception in thread "main" java.lang.NoClassDefFoundError:
>> org/eclipse/uml2/common/util/CacheAdapter
>
> You are using EMF Compare ot compare uml models but you didn't add the
> library org.eclipse.uml2.common to your classpath.
>
>> at
>> org.eclipse.uml2.uml.internal.impl.ElementImpl.getCacheAdapt er(ElementImpl.java:714)
>>
>> at
>> org.eclipse.uml2.uml.internal.impl.ElementImpl.eNotification Required(ElementImpl.java:852)
>>
>> at
>> org.eclipse.uml2.uml.internal.impl.NamedElementImpl.setName( NamedElementImpl.java:263)
>>
>> at
>> org.eclipse.uml2.uml.internal.impl.ModelImpl.eSet(ModelImpl. java:266)
>> at
>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjec tImpl.java:1071)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHel perImpl.java:1154)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2643)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setAttribValue(XML Handler.java:2702)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.SAXXMIHandler.handleObjectAtt ribs(SAXXMIHandler.java:85)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFa ctory(XMLHandler.java:2178)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType (XMLHandler.java:1316)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XM LHandler.java:1454)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XML Handler.java:1019)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMI Handler.java:83)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:1001)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:712)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMIHandler.startElement(XMIHa ndler.java:167)
>>
>> at
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .startElement(AbstractSAXParser.java:501)
>>
>> at
>> com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator. startElement(XMLDTDValidator.java:767)
>>
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.j ava:1359)
>>
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$ContentDriver.scanRootElementHook(XMLDocumentScannerImpl. java:1316)
>>
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl$FragmentContentDriver.next(XMLDocumentFragmentSca nnerImpl.java:3095)
>>
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$PrologDriver.next(XMLDocumentScannerImpl.java:921)
>>
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl.next(XMLDocumentScannerImpl.java:648)
>>
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java: 510)
>>
>> at
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:807)
>>
>> at
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:737)
>>
>> at
>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(X MLParser.java:107)
>>
>> at
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(AbstractSAXParser.java:1205)
>>
>> at
>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(SAXParserImpl.java:522)
>>
>> at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:181)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1445)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1241)
>>
>> at org.eclipse.emf.compare.util.ModelUtils.load(ModelUtils.java :320)
>> at org.eclipse.emf.compare.util.ModelUtils.load(ModelUtils.java :218)
>> at ExampleLauncher.main(ExampleLauncher.java:67)
>> Caused by: java.lang.ClassNotFoundException:
>> org.eclipse.uml2.common.util.CacheAdapter
>> at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301 )
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
>> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320 )
>> ... 38 more
>>
>>
>>
>> Can anybody help me? What am I doing wrong?
>
> I think the above should answer this, do not hesitate to come back to us
> if it didn't :).
>
> Laurent Goubet
> Obeo
>
Re: Exception in [org.eclipse.emf.compare.examples.standalone] [message #620895 is a reply to message #135576] Thu, 30 April 2009 07:58 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.
--------------030602040502070804000906
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hi Rene,

That doesn't really surprise me, EMF Compare can be run standalone, yet
its UI cannot. Our UI is tightly integrated with the Eclipse UI and thus
heavily depends on it. We have neither RCP nor standalone UI for EMF
Compare and if you seek on displaying the compare editor you will have
to do it from within an Eclipse instance (the code you've copy pasted is
what's needed for that).

Laurent Goubet
Obeo

Rene Zilz a
Re: Exception in [org.eclipse.emf.compare.examples.standalone] [message #620897 is a reply to message #135639] Thu, 30 April 2009 09:31 Go to previous message
Eclipse UserFriend
Originally posted by: renezilz.web.de

Hello laurent!
yes I use Eclipse and also try to start the comparisionEditor in
Eclipse. But I get the errors all the same.


laurent Goubet wrote:
> Hi Rene,
>
> That doesn't really surprise me, EMF Compare can be run standalone, yet
> its UI cannot. Our UI is tightly integrated with the Eclipse UI and thus
> heavily depends on it. We have neither RCP nor standalone UI for EMF
> Compare and if you seek on displaying the compare editor you will have
> to do it from within an Eclipse instance (the code you've copy pasted is
> what's needed for that).
>
> Laurent Goubet
> Obeo
>
> Rene Zilz a écrit :
>> Hello laurent!
>> Thank you very much for this. The merging runs without any problems. :)
>>
>> Now I tried to start the comparision editor for the emfdiff result.
>> I added following lines to the ExampleLauncher:
>> ModelCompareEditorInput input=new ModelCompareEditorInput(snapshot);
>> CompareUI.openCompareEditor(input);
>>
>> After I added this and trying to start the application, I got a lot of
>> NoClassDefFoundError. For example first was missing
>> org.eclipse.ui.IEditorInput,
>> then
>> org.eclipse.core.runtime.IAdaptable
>> org/osgi/framework/BundleActivator
>> org/eclipse/core/runtime/preferences/IScopeContext
>> and so on..
>>
>>
>> Because of this I think I'm doing something wrong.
>> Can anybody help me?
>>
>> Best regards
>> rene
>>
>>
>> laurent Goubet wrote:
>>> Hi Rene,
>>>
>>> See comments inlined below.
>>>
>>> Rene Zilz a écrit :
>>>> Hello!
>>>> I tried the exanple of the standalone version of emf compare which
>>>> you can find
>>>> under:http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.e mf/org.eclipse.emf.compare/examples/org.eclipse.emf.compare. examples.standalone/?root=Modeling_Project
>>>>
>>>
>>> EMF Compare is standalone, this isn't the "standalone version",
>>> merely an example of a the way to use it as a standalone application :).
>>>
>>>> At first he did not know the type ComparisonResourceSnapshot.
>>>> Because of this I replaced the type through ModelInputSnapshot.
>>>> Now the
>>>
>>> This means you have downloaded the latest version of the example, but
>>> are using an old version of EMF Compare itself. This API has changed
>>> a couple of months ago and "ModelInputSnapshot" no longer exists.
>>>
>>>> example shows no errors but if I try to run the application I get
>>>> following exception:
>>>> Exception in thread "main" java.lang.NoClassDefFoundError:
>>>> org/eclipse/uml2/common/util/CacheAdapter
>>>
>>> You are using EMF Compare ot compare uml models but you didn't add
>>> the library org.eclipse.uml2.common to your classpath.
>>>
>>>> at
>>>> org.eclipse.uml2.uml.internal.impl.ElementImpl.getCacheAdapt er(ElementImpl.java:714)
>>>>
>>>> at
>>>> org.eclipse.uml2.uml.internal.impl.ElementImpl.eNotification Required(ElementImpl.java:852)
>>>>
>>>> at
>>>> org.eclipse.uml2.uml.internal.impl.NamedElementImpl.setName( NamedElementImpl.java:263)
>>>>
>>>> at
>>>> org.eclipse.uml2.uml.internal.impl.ModelImpl.eSet(ModelImpl. java:266)
>>>> at
>>>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjec tImpl.java:1071)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHel perImpl.java:1154)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XM LHandler.java:2643)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setAttribValue(XML Handler.java:2702)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.SAXXMIHandler.handleObjectAtt ribs(SAXXMIHandler.java:85)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFa ctory(XMLHandler.java:2178)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType (XMLHandler.java:1316)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XM LHandler.java:1454)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XML Handler.java:1019)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMI Handler.java:83)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:1001)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:712)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMIHandler.startElement(XMIHa ndler.java:167)
>>>>
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .startElement(AbstractSAXParser.java:501)
>>>>
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator. startElement(XMLDTDValidator.java:767)
>>>>
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.j ava:1359)
>>>>
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$ContentDriver.scanRootElementHook(XMLDocumentScannerImpl. java:1316)
>>>>
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl$FragmentContentDriver.next(XMLDocumentFragmentSca nnerImpl.java:3095)
>>>>
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$PrologDriver.next(XMLDocumentScannerImpl.java:921)
>>>>
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl.next(XMLDocumentScannerImpl.java:648)
>>>>
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java: 510)
>>>>
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:807)
>>>>
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:737)
>>>>
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(X MLParser.java:107)
>>>>
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(AbstractSAXParser.java:1205)
>>>>
>>>> at
>>>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(SAXParserImpl.java:522)
>>>>
>>>> at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:181)
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1445)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1241)
>>>>
>>>> at
>>>> org.eclipse.emf.compare.util.ModelUtils.load(ModelUtils.java :320)
>>>> at
>>>> org.eclipse.emf.compare.util.ModelUtils.load(ModelUtils.java :218)
>>>> at ExampleLauncher.main(ExampleLauncher.java:67)
>>>> Caused by: java.lang.ClassNotFoundException:
>>>> org.eclipse.uml2.common.util.CacheAdapter
>>>> at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>>>> at java.security.AccessController.doPrivileged(Native Method)
>>>> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>>>> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301 )
>>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
>>>> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320 )
>>>> ... 38 more
>>>>
>>>>
>>>>
>>>> Can anybody help me? What am I doing wrong?
>>>
>>> I think the above should answer this, do not hesitate to come back to
>>> us if it didn't :).
>>>
>>> Laurent Goubet
>>> Obeo
>>>
>
Re: Exception in [org.eclipse.emf.compare.examples.standalone] [message #620898 is a reply to message #135666] Thu, 30 April 2009 10:00 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.
--------------030601060008040706080305
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Rene,

The problem you had at first tend to prove you are running a "java
application" and not an "Eclipse application". If what you are tryng to
do is simply compare two files and have the comparison result displayed
in Eclipse, you can simply select your two files, right-click them and
select compare with => each other. The EMF Compare FAQ at
http://wiki.eclipse.org/EMF_Compare_FAQ show how to add your extension
to the list of files EMF Compare should take into account.

If you need to programmatically call EMF Compare without displaying its
UI, you can create a Java program such as shown in the standalone
example. On the other hand if you need to programmatically compare two
files and display the result in the Eclipse comparison UI, you need to
create a plugin and have the comparison code within, then have a way to
call the code of your plugin from a runtime Eclipse workbench
(right-click action on the files for example).

If you have never developped Eclipse plugins, I think the
org.eclipse.newcomer newsgroup is your best bet for pointers on
documentation or tutorials.

Regards

Laurent Goubet
Obeo

Rene Zilz a
Previous Topic:[EWM] parallel and remote workflows
Next Topic:[Proposal] Edapt - Framework for Ecore model adaptation and instance migration
Goto Forum:
  


Current Time: Fri Apr 19 09:32:48 GMT 2024

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

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

Back to the top