-->
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: Classloader issues
PostPosted: Tue Jul 02, 2013 1:43 pm 
Newbie

Joined: Wed Sep 10, 2008 2:02 pm
Posts: 14
Location: NJ
Hi. I have a problem whereby Hibernate creates an instance of the model object in response to the execution of a query, and, when my code gets that instance, it is not recognized by my class loader so I get a ClassCastException when I attempt to cast it to an instance of the model.

I have:

Code:
app.ear
    |___ userApp.war
    |___ adminApp.war
    |___ appEJB.jar
    |___ userAppEJB.jar
    |___ lib
           |___ persistence.jar
                    |___ META-INF/persistence.xml


I'm relying on the Hibernate jar files in the JBoss AS 7 standalone deployment.

appEJB.jar contains the model classes as well as the hbm.xml files that describe them to Hibernate. It also contains many different Stateless Session Beans whose job it is to retrieve instances of persistent classes to be returned to the web tier.

I am in the process of moving from JBoss 4.2.2 to AS 7, and this code worked well in 4.2.2. I understand that classloading changed quite a lot between then and now, but I'm not able to figure out what I need to do in order for Hibernate to see the same classes as my application.

Any help would be appreciated.


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.