1 Reply Latest reply on Apr 28, 2004 4:05 AM by Darran Lofthouse

    Classloader probs on redeploy

    asifna Newbie

      I have an ear file that consists of a war and jar file. When I hot deploy the ear file, it seems the UnifiedClassLoader loses the reference to the new deployment and thus throws a class cast exception. For example:

      With a clean startup, everything is fine, with the classloaders being the same:

      Class Assessment from iterator.next()
      21:42:50,844 INFO [STDOUT] org.jboss.mx.loading.UnifiedClassLoader3@103074e{ url=file:/D:/jboss-3.2.4RC1/server/default/tmp/deploy/tmp34011mtremote.ear ,addedOrder=34}
      Class Assessment from Assessment.class
      21:42:54,539 INFO [STDOUT] org.jboss.mx.loading.UnifiedClassLoader3@103074e{ url=file:/D:/jboss-3.2.4RC1/server/default/tmp/deploy/tmp34011mtremote.ear ,addedOrder=34}

      After a redeploy of the ear file, they are different:

      Class Assessment from iterator.next()
      21:43:51,171 INFO [STDOUT] org.jboss.mx.loading.UnifiedClassLoader3@103074e{ url=null ,addedOrder=34}

      Class Assessment from Assessment.class
      21:43:52,282 INFO [STDOUT] org.jboss.mx.loading.UnifiedClassLoader3@79f5eb{ url=file:/D:/jboss-3.2.4RC1/server/default/tmp/deploy/tmp34012mtremote.ear ,addedOrder=35}

      This was all working fine, and all off a sudden its not. I could understand if I'd made any config changes, but all I have done is hacked more code. There is only ony copy of the classes in the classpath. Can anyone help?