0 Replies Latest reply on Feb 17, 2012 6:12 AM by João Paulo Limberger

    Classloader - ClassCastException - Jboss AS 5.1.2 EAP - Hibernate

    João Paulo Limberger Newbie

      Hi!

       

      We have 2 web applications in to WARs, jboss seam, hiberante + jpa.  Both app are sharing some Entities. When i execute a  hibernateQuery.scroll() in WEB1 context, the objects returnet in the ScrollableResults where loaded by the WEB2 classloader and when we try to use them we get a ClassCastException.

       

      Is possible to isolate the classload of the Entities?

       

      We try the jboss-web.xml

       

       

       

          <class-loading java2ClassLoadingCompliance="false">

              <loader-repository>

                  br.com.bb:loader=web1-1.0.1.war

                  <loader-repository-config>java2ParentDelegation=false</loader-repository-config>

              </loader-repository>

          </class-loading>

       

      But dont work!

       


      Thanks,

      jp