2 Replies Latest reply on Mar 14, 2002 2:28 PM by Pekka Laukkanen

    ClassCastException bug?

    Pekka Laukkanen Newbie

      Hi!

      I've been struggling with one annoying problem. The problem is similiar to a problem which is already discussed here. But I post this anyway. So, my problem is hot deploys. I'm using log4j(1.1.3) and I've extended Category class. I call that class BaseCategory. Everything works just fine if deploy it to container but if I redeploy without booting the Jboss I get ugly ClassCastException. I've been tracking the bug down. My opinion is that this is an issue of class loaders and Jboss somehow does not release old classes when the bean is undeployed. But still I don't get it. Someone told me that this is a bug. Could someone confirm that and maybe tell whether the fix is on it way. This "feature" exists in 2.4.3, 2.4.4 and 3.0 alpha

      Here's the output

      Performer] TRANSACTION ROLLBACK EXCEPTION:null
      Embedded Exception
      org.apache.log4j.Category; nested exception is:
      javax.ejb.EJBException: null
      Embedded Exception
      org.apache.log4j.Category
      [Performer] java.lang.ClassCastException: org.apache.log4j.Category
      [Performer] at com.xfetch.performer2.tree.Performer.(Performer.java:47)
      [Performer] at com.xfetch.performer2.tree.Performer.(Performer.java:170)
      [Performer] at com.xfetch.enterprise.Performer.EnterprisePerformerBean.ejbCreate(EnterprisePerformerBean.java:36)
      [Performer] at java.lang.reflect.Method.invoke(Native Method)
      [Performer] at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.createSession(StatefulSessionFilePersistenceManager.java:172)
      [Performer] at org.jboss.ejb.StatefulSessionContainer.createHome(StatefulSessionContainer.java:391)
      [Performer] at java.lang.reflect.Method.invoke(Native Method)
      [Performer] at org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.invokeHome(StatefulSessionContainer.java:594)
      [Performer] at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:103)
      [Performer] at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invokeHome(StatefulSessionInstanceInterceptor.java:123)
      [Performer] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:135)
      [Performer] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:307)
      [Performer] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:86)
      [Performer] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:106)
      [Performer] at org.jboss.ejb.StatefulSessionContainer.invokeHome(StatefulSessionContainer.java:326)
      [Performer] at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContainerInvoker.java:372)
      [Performer] at java.lang.reflect.Method.invoke(Native Method)
      [Performer] at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
      [Performer] at sun.rmi.transport.Transport$1.run(Unknown Source)
      [Performer] at java.security.AccessController.doPrivileged(Native Method)
      [Performer] at sun.rmi.transport.Transport.serviceCall(Unknown Source)
      [Performer] at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
      [Performer] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
      [Performer] at java.lang.Thread.run(Unknown Source)


      Cheers, Pekka