-->
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.  [ 2 posts ] 
Author Message
 Post subject: classloader problem when spring + hibernate inside axis2 aar
PostPosted: Tue May 29, 2007 5:32 am 
Newbie

Joined: Tue May 29, 2007 4:40 am
Posts: 1
Hi!

Is there a way to set the classloader which Hibernate uses? As far as I know Hibernate tries to locate mapping resources, entity classes etc with thread context classloader? The problem arises when I'm trying to use spring 2.0.5 + hibernate 3.2.4.SP1 inside axis2 aar-package (and deploying to JBoss 4.0.5 ) which uses classloader isolation that prevents from finding classes outside aar. Now it seems that when hibernate looks for resources it tries to find them from axis2's classpath and not inside the aar-package for which there exists a separate axis2 classloader. So I would like to know if it is possible to change the hibernate classloader to that of axis2's aar one?

The only reference for setting the classloader in hibernate, when reading resources, that I have found is in org.hibernate.cfg.Configuration's addResource-method. But I don't see how I could use that when loading hibernate configurations via spring..?

Thanks in advance!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 06, 2007 3:47 pm 
Newbie

Joined: Wed Jun 06, 2007 3:23 pm
Posts: 1
What is your exception exactly ? Do you use Spring's TransactionProxyFactoryBean ?

I don't think this is a problem within Hibernate. I also met some class loader problems when trying to integrate Spring/Hibernate inside Axis2(it was real pain to make everything work together!). I am convinced that Spring is the cause. See my post at http://forum.springframework.org/showthread.php?t=39652. See also http://ws.apache.org/axis2/1_1/spring.html. As you use Spring 2, you can set a classloader on the TransactionProxyFactoryBean... Hope this helps!


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

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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.