-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: different ClassLoaders between hibernate.jar and my class
PostPosted: Wed Mar 01, 2006 10:13 am 
Newbie

Joined: Fri May 27, 2005 6:16 am
Posts: 14
Hi,

I am writing two eclipse plugins. One of my plugins loads hibernate.jar and all of its dependencies. Another one adds some other functionality. In the second plugin I create a new onfiguration, but this always fails with a MappingException. The cause is that the classloader of the first plugin is not the same as the one of the second plugin.

The following code does not give the same results:
Thread.currentThread().getContextClassLoader().loadClass("eg.MyClass");
ReflectHelper.classForName("eg.MyClass");

eg.MyClass is loaded in the second class, but ReflectHelper in the first one. So reflectHelper always gives a MappingException.

Does anyone know how to solve this?

Regards,
Leen Toelen


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.