4 Replies Latest reply on Jun 7, 2004 11:02 AM by rkadayam

    NPE when redeploying precompiled code

    Peter Backx Newbie

      I'm currently playing around with a basic EJB application and some AOP code on JBoss 4.0.0DR4. Everything works ok, except when I redeploy changed code: For some reason I always get NPE's when advice is invoked and the only solution is to restart the server. This happens even if I first completely remove all application and aspect code from the deploy dir.

      My guess is that there are some pointcut references still hidden somewhere in the server that are re-used when objects with the same name (?) are deployed. However these references still point to aspect code that has been removed. I'm not sure if this is expected behavior, probably not.

      Apart from restarting the server the other workaround I've found is to use load-time bytecode manipulation instead of precompiling. However when EnableTransformer is true JBoss gives an error on startup that it "failed to transform org.apache.axis.encoding.ser.ImageDataHandlerSerializer", which luckely has given me no problems yet (keep fingers crossed).