I spent time today to have an Hibernate example running as Eclipse Plug-ins. Here is a trick to avoid
NoClassDefFoundError when using Hibernate within Eclipse.
I have three Plug-ins :
com.mydomain.hibernate: Packaging of the hibernate Jar library in a Plug-in
These plugins have the following dependencies :
com.mydomain.hibernatedepends on nothing (it’s a “library” Plug-in)
com.anotherdomain.Bdepends on nothing
NoClassDefFoundError(org.hibernate.proxy.HibernateProxy) was fired when trying to map (in a database using hibernate of course)
a class of
ClassLoader mechanisms and the injection of new code from Hibernate in the
com.anotherdomain.B are responsible for this error .
Here is THE article that helped me to understand what was happening here and to solve my problem using