lightbulb-o [Solved] Hibernate Generation Fails with Internal Error - java.lang.NoClassDefFoundError

5 years 9 months ago #2274 by tmay
Environment:
Version 3.0.1
Build: 201311041840
Metamodel: 9017
System: win32 (6.1)
Architecture: x86_64
Windows 7 - 64 bit
Latest versions of Modules

I have a single Java class with a couple of String attributes. Java class generates fine. From the class context menu I select Hibernate Designer -> Hibernate Generation. I receive the following error:

org.eclipse.e4.core.di.InjectionException: java.lang.NoClassDefFoundError: com/softeam/module/hibernate/jaxb/HibernateMapping
java.lang.NoClassDefFoundError: com/softeam/module/hibernate/jaxb/HibernateMapping

I have looked for Hibernate configuration information etc. and found nothing on the site. I also looked for configuration information on the Persistence Profile as well and found nothing.

FWIW, I'm pretty new to Java (mostly a C++ Qt background) but I'm having a real kick using the MDA features of Modelio. I'd really like to see the ORM transformations from Hibernate Designer. This tool is simply too fun to play with.

Please Log in or Create an account to join the conversation.

5 years 8 months ago #2276 by pan
Hi tmay,

We will do some tests with HibernateDesigner and take you informed about our investigations.

BR.

Please Log in or Create an account to join the conversation.

5 years 8 months ago #2282 by cde
Hi tmay,

Thanks for your feedback, this was an issue of the Hibernate Designer module.
It has been fixed, and you can get the new version of the module (3.0.05) by using the 'Check for new versions...' feature of the 'modules catalog'...

Steps:
1. Click on the 'Modules catalog' entry of the 'Configuration' menu.
2. Click on the 'Check for new versions...' buttons
3. Select the Hibernate Designer 3.0.05 module and click on the 'Add to catalog' button.






This will update Hibernate Designer in your modules catalog, then you just have to update it in your project using the 'Modules' tab of the project configurator:




Best regards,
cde.
Attachments:

Please Log in or Create an account to join the conversation.

5 years 8 months ago #2285 by tmay
Thank you so much. That worked like a charm.
Cheers

Please Log in or Create an account to join the conversation.

1 month 1 day ago #5700 by germyrinn
NoClassDefFoundError in Java comes when Java Virtual Machine is not able to find a particular class at runtime which was available at compile time. After you compile your code, you end up with .class files for each class in your program. These binary files are the bytecode that Java interprets to execute your program. The NoClassDefFoundError indicates that the classloader (in this case java.net.URLClassLoader), which is responsible for dynamically loading classes, cannot find the .class file for the class that you’re trying to use.

NoClassDefFoundError can occur for multiple reasons like

ClassNotFoundException – .class not found for that referenced class irrespective of whether it is available at compile time or not(i.e base/child class).
Class file located, but Exception raised while initializing static variables
Class file located, Exception raised while initializing static blocks

Please Log in or Create an account to join the conversation.

1 week 5 days ago #5709 by pan
Please note that the Hibernate Designer module is not compatible with Modelio 3.8. The latest version of the Hibernate Designer module (v3.5) is compatible with Modelio 3.5.

Please Log in or Create an account to join the conversation.

Moderators: tmaebr
Time to create page: 0.346 seconds
^ Back to Top