Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO]: NoClassDefFoundError: com/emfdbexample/orgstructure/model/modelPackage (wrong name: com/emfdb
[CDO]: NoClassDefFoundError: com/emfdbexample/orgstructure/model/modelPackage (wrong name: com/emfdb [message #813853] Mon, 05 March 2012 19:38 Go to next message
Kris Missing name is currently offline Kris Missing nameFriend
Messages: 47
Registered: July 2009
Member
Hi,

I am trying to learn using CDO by creating a litte example based on the
org.eclipse.emf.cdo.examples.company/com.eclipse.emf.cdo.examples.hibernate.server
- example projects.

When I run the QuickStartTest that I have adapted to my example project
it fails with the following trace:

-----------
org.eclipse.emf.cdo.util.CommitException:
org.eclipse.net4j.signal.RemoteException:
java.lang.NoClassDefFoundError: com/emfdbexample/orgstructure/model
/modelPackage (wrong name: com/emfdbexample/orgstructure/model/ModelPackage)
at
org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:1083)
....
-----------

The test case passes when I adjust in the properties of the genmodel the
All->prefix value from "Model" to "model" and regenerate the model code
(and correct the import problem due to the changed prefix).

What makes me wonder, is that the company example project also has
All->prefix value set to a value starting with a capital letter
"Company" and it works.

Is there a configuration that prevents the ClassNotFoundException in the
company-example projects?

Furthermore, could somebody give a hint, what configuration generates
the hibernate mapping file "generated_hbm.xml" in
com.eclipse.emf.cdo.examples.hibernate.server > META-INF.

Thanks
Kris
Re: [CDO]: NoClassDefFoundError: com/emfdbexample/orgstructure/model/modelPackage (wrong name: com/e [message #814185 is a reply to message #813853] Tue, 06 March 2012 06:09 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi Kris,

Disclaimer: I'm neither a Hibernate nor a HibernateStore expert. I've cc'ed Martin.

More comments below...


Am 05.03.2012 20:38, schrieb KW:
> Hi,
>
> I am trying to learn using CDO by creating a litte example based on the
> org.eclipse.emf.cdo.examples.company/com.eclipse.emf.cdo.examples.hibernate.server - example projects.
>
> When I run the QuickStartTest that I have adapted to my example project
When I run it without modifications it passes successfully. Have you also tried that?

> it fails with the following trace:
>
> -----------
> org.eclipse.emf.cdo.util.CommitException: org.eclipse.net4j.signal.RemoteException: java.lang.NoClassDefFoundError:
> com/emfdbexample/orgstructure/model /modelPackage
Is there really a space after the second last segment?

> (wrong name: com/emfdbexample/orgstructure/model/ModelPackage)
I'm confused. What's wrong and what's right in your opinion?

> at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:1083)
> ...
> -----------
>
> The test case passes when I adjust in the properties of the genmodel the All->prefix value from "Model" to "model" and
> regenerate the model code (and correct the import problem due to the changed prefix).
>
> What makes me wonder, is that the company example project also has All->prefix value set to a value starting with a
> capital letter "Company" and it works.
>
> Is there a configuration that prevents the ClassNotFoundException in the company-example projects?
It strikes me that this is related to your modifications, which I can't judge. Please note that the plugin.xml of your
(example) model is not regenerated once it exists. Make sure the nsURI and Model Package classname match properly.

>
> Furthermore, could somebody give a hint, what configuration generates the hibernate mapping file "generated_hbm.xml"
> in com.eclipse.emf.cdo.examples.hibernate.server > META-INF.
Perhaps this page helps:
http://wiki.eclipse.org/CDO_Hibernate_Store_Model_Relational_Mapping#Generating_the_mapping.2C_manually_changing_it_and_then_use_the_manual_mapping

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: [CDO]: NoClassDefFoundError: com/emfdbexample/orgstructure/model/modelPackage (wrong name: com/e [message #814742 is a reply to message #814185] Tue, 06 March 2012 20:54 Go to previous message
Kris Missing name is currently offline Kris Missing nameFriend
Messages: 47
Registered: July 2009
Member
Hi Eike,

thanks for your advice. Gefahr erkannt, Gefahr gebannt :)

it was the extension point that was outdated (modelPackage instead of
ModelPackage) in the plugin.xml of the model proeject:

<extension point="org.eclipse.emf.ecore.generated_package">
<package
uri="http://orgstructure/1.0"
class="com.emfdbexample.orgstructure.model.modelPackage"
genModel="model/orgstructure.genmodel"/>
</extension>

Regards
Kris

Am 3/6/12 7:09 AM, schrieb Eike Stepper:
> Hi Kris,
>
> Disclaimer: I'm neither a Hibernate nor a HibernateStore expert. I've
> cc'ed Martin.
>
> More comments below...
>
>
> Am 05.03.2012 20:38, schrieb KW:
>> Hi,
>>
>> I am trying to learn using CDO by creating a litte example based on
>> the
>> org.eclipse.emf.cdo.examples.company/com.eclipse.emf.cdo.examples.hibernate.server
>> - example projects.
>>
>> When I run the QuickStartTest that I have adapted to my example project
> When I run it without modifications it passes successfully. Have you
> also tried that?
>
>> it fails with the following trace:
>>
>> -----------
>> org.eclipse.emf.cdo.util.CommitException:
>> org.eclipse.net4j.signal.RemoteException:
>> java.lang.NoClassDefFoundError: com/emfdbexample/orgstructure/model
>> /modelPackage
> Is there really a space after the second last segment?
>
>> (wrong name: com/emfdbexample/orgstructure/model/ModelPackage)
> I'm confused. What's wrong and what's right in your opinion?
>
>> at
>> org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:1083)
>>
>> ...
>> -----------
>>
>> The test case passes when I adjust in the properties of the genmodel
>> the All->prefix value from "Model" to "model" and regenerate the model
>> code (and correct the import problem due to the changed prefix).
>>
>> What makes me wonder, is that the company example project also has
>> All->prefix value set to a value starting with a capital letter
>> "Company" and it works.
>>
>> Is there a configuration that prevents the ClassNotFoundException in
>> the company-example projects?
> It strikes me that this is related to your modifications, which I can't
> judge. Please note that the plugin.xml of your (example) model is not
> regenerated once it exists. Make sure the nsURI and Model Package
> classname match properly.
>
>>
>> Furthermore, could somebody give a hint, what configuration generates
>> the hibernate mapping file "generated_hbm.xml" in
>> com.eclipse.emf.cdo.examples.hibernate.server > META-INF.
> Perhaps this page helps:
> http://wiki.eclipse.org/CDO_Hibernate_Store_Model_Relational_Mapping#
Generating_the_mapping.2C_manually_changing_it_and_then_use_the_manual_mapping

>
>
> Cheers
> /Eike
>
> ----
> http://www.esc-net.de
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
Previous Topic:org.eclipse.emf.ocl
Next Topic:[TENEO] Objects without container and in different resources are both saved
Goto Forum:
  


Current Time: Fri Apr 26 15:06:50 GMT 2024

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

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

Back to the top