0 Replies Latest reply on Mar 22, 2005 9:37 AM by mesemus

    ClassCastException on redeployment in JBoss 4.0.1 sp1

    mesemus

      Hi folks,

      I've created an ear containing a jmx bean which gets invoked when the ear is deployed. Now, the bean tries to perform:

       InitialContext context = new InitialContext();
       String homeName = "something-in-another-ear";
       ListenerHome listenerHome = (ListenerHome)
       PortableRemoteObject.narrow(context.lookup(homeName),
       ListenerHome.class);
      


      When I try to redeploy this ear, I've got a ClassCastException:

      java.lang.ClassCastException
       at
      com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:293)
       at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
      

      Any idea what I do wrong/any workaround ?

      Thanks a lot,

      ms.