aspose file tools*
The moose likes Object Relational Mapping and the fly likes java.lang.RuntimeException: No ClassLoaders found for: net.sf.hibernate.collection.Se Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "java.lang.RuntimeException: No ClassLoaders found for: net.sf.hibernate.collection.Se" Watch "java.lang.RuntimeException: No ClassLoaders found for: net.sf.hibernate.collection.Se" New topic
Author

java.lang.RuntimeException: No ClassLoaders found for: net.sf.hibernate.collection.Se

Shishir Gaur
Greenhorn

Joined: Oct 12, 2011
Posts: 3
java.lang.RuntimeException: No ClassLoaders found for: net.sf.hibernate.collection.Set

Hi All,

I am migrating my project from hibernate2 to Hibernate3.6.
Please note that I have 2 JBoss servers that talk yo each other.
The project deployed on Server 1 (say 'A') is still on Hibernate2, while I have migrated the projetc on server 2(say 'B') to Hibernate3.6.
Now, an object constructed at 'A' is sent to 'B' and I am getting the above mentioned Exception a 'B'. Seems the Exception is coming while deserializing the Object at 'B' which was serialized at 'A'.

Can somebody help me out with :
1. Solution to the above problem
2. Is Hibernate 3 fully backward-compatible with Hibernate 2?

The stack Trace:
12:49:07,882 WARN [root] Clone and Redelivery property not set as expected.
12:49:08,890 ERROR [root] java.lang.RuntimeException: No ClassLoaders found for: net.sf.hibernate.collection.Set
at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:306)
at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:521)
at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:622)

Thanks,
Shishir

Pankaj Kr. Singh
Ranch Hand

Joined: Mar 31, 2011
Posts: 32

Hi,

Please check your .Jar files which is required for Hibernate.
Shishir Gaur
Greenhorn

Joined: Oct 12, 2011
Posts: 3
Hi pankaj,

Thanks for your reply.
Do you mean to say that in the second project ('B'), i should be having Hibernate2 along with Hibernate3 jar?
Pankaj Kr. Singh
Ranch Hand

Joined: Mar 31, 2011
Posts: 32

Hi,

There may be jar conflict or there may be no jar included.
So If you are migrating from HB 2 to HB3 so keep HB3 jars and try.
This may work out your problem
Shishir Gaur
Greenhorn

Joined: Oct 12, 2011
Posts: 3
Hi,

I Already tried keeping only 3 jar at ('B'), but I still need to have 2 Jar at ('A') as I need Backward compatibility between the two.
But, this is not working out.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: java.lang.RuntimeException: No ClassLoaders found for: net.sf.hibernate.collection.Se