0 Replies Latest reply on Feb 7, 2008 4:07 AM by bapetc

    update from 3.2.8.SP1 to 4.2.2.GA ClassCastException  Portab

    bapetc

      Hi,

      I've a working ear and war file deployed on Jboss 3.2.8.SP1.
      When I deploy this application on Jboss 4.2.2.GA, I get a ClassCastException on PortableRemoteObject.narrow()

      Caused by: java.lang.ClassCastException
      at com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:229)
      at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
      at com.acunia.fleet.asp.util.ServiceLocator.getRemoteHome(ServiceLocator.java:96)

      I found this info on the jboss forum:
      There are some places where it reports this when it really means ClassNotFoundException, e.g. the CORBA PortableRemoteObject.narrow()
      Assuming it is the same class name, this problem relates to classes getting loaded from different classloaders.

      So I've checked if my home class (EJB2) is loaded only once via displayClassInfo().

      The result:
      com.......CustomerProvisioningHome Information:
      ....
      ....
      ....
      ### Instance0 found in UCL: org.jboss.mx.loading.UnifiedClassLoader3@dfa65c{ url=file:/home/jboss/jboss-4.2.2.GA/server/fleet-server/tmp/deploy/tmp2038fleet-asp.ear ,addedOrder=69}

      The remote home class is loaded only once.
      Does anyone know what the problem is?

      Thanks in advance!