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'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.