1 Reply Latest reply on Sep 20, 2011 4:41 AM by Martin Höller

    Old Javassist bugs reincarnate in Seam

    Martin Höller Newbie


      We are observing random NullPointerExceptions when our application is under heavy load. The NPE happens in the Javassist class RuntimeSupport$DefaultMethodHandler which is called from a proxy:

      Caused by: java.lang.NullPointerException
              at javassist.util.proxy.RuntimeSupport$DefaultMethodHandler.invoke(RuntimeSupport.java:37)
              at at.co.xss.fdb.ui.admin.StaffManager_$$_javassist_seam_32.setPerformRefresh(StaffManager_$$_javassist_seam_32.java)

      Research showed, that this NPE was related to a bug in Javassist (JASSIST-66) that was reported and fixed 3 years ago! (Note, that there may be other fixed bugs like JASSIST-97 that may also cause troubles.)

      Unfortunately Seam brings it's own copy of Javassist's ProxyFactory: org.jboss.seam.util.ProxyFactory. It seems bug-fixes from Javassist didn't make it into Seam's copy of the class :(

      You can verify that Seam's class is used in favour for Javassist's class by having a look at the name of the generated class. Classes generated by Javassist have names like some.package.MyClass_$$_javassist_xx, while classes generated by Seam's version of the ProxyFactory are named some.package.MyClass_$$_javassist_seam_xx. Note the additional seam in the name!

      A search showed, that some others are observing the same problems, but so far nobody seems to care about the problem. I'm going to create a Bugreport in Seam's JIRA and will link back to it here when done.

      - martin