-->
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.  [ 16 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: Tue May 13, 2008 12:27 pm 
Beginner
Beginner

Joined: Fri May 21, 2004 5:22 am
Posts: 24
Hi there,

I also hit by the same problem.

I deployed a SAR into JBoss 4.2.2 using shipped hibernate version. The JNDI of the SessionFactory loaded and in my WAR (deployed same with SAR at JBOSS_HOME/server/default/deploy) is able to get SessionFactory and Session object.

When I try to do a

Code:
ClassA a = session.get(ClassA.class, id);


I would hit ClassCastException error. During debug session, I had saw the right side return the ClassA object but when it trying to assigned to left side, the error comes out.

The same class of ClassA existed both inside the SAR deployed as well as the WAR deployed.

What could be the reason?

Note: If I turn on the

Code:
Java2ClassLoadingCompliance
UseJbossWebLoader


switches in JBOSS_HOME\server\default\deploy\jboss-web.deployer\META-INF\jboss-service.xml then everything works fine. But I can't do that because they are other components requires library from tomcat container.

Please help. Thanks

Note: Cross reference post http://forum.hibernate.org/viewtopic.ph ... 12#2385112


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

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.