1 Reply Latest reply on May 10, 2007 7:44 PM by mhassel

    Classcast exception when multiple deployments of same app

    mhassel

      We are trying to deploy the same ear (with different configuration files, datasources, etc) multiple times in JBoss.

      Every app works perfectly fine by itself, as soon as we deploy two of them, the first deployment stops working as soon as we try to acquire a session bean remote interface via the initial context with the following classcast exception:

      Caused by: java.lang.ClassCastException: $Proxy118 cannot be cast to com.absu.poweron.ejb.CircuitDataManager


      Our Jboss-app.xml is set to use isolated class loading:

      <jboss-app>
      <loader-repository> testing:loader=testing.ear </loader-repository>
      </jboss-app>


      and we tried to enable/disable the "CallByValue" flag in both the ear-deployer.xml and the jboss-app without success.

      Does anyone have any ideas???? Thanks!

        • 1. Re: Classcast exception when multiple deployments of same ap
          mhassel

          One additional piece of information (even though this should not be an issue?):


          The remote interfaces all have the same JNDI name across applications (of course interface a and b have different JNDI names, but interface a in ear X has the same name as interface a in ear Y):

          @Stateless
          @RemoteBinding jndiBinding="somename/ejb/RemoteDispatchDataManagerBean")
          public class Somebean implements SomeRemoteInterface {