1 Reply Latest reply on Jul 9, 2014 5:33 AM by dudi.fedida

    Getting NullPointerException in create() method

    veenaonnet

      Hi,

       

      I am using javassist-3.15.0-GA.jar which is a part of jboss 7.2 modules.

      When executed a code to create proxy of class from multiple threads simultaneously, sometimes, I am getting NPE.

      java.lang.NullPointerException

              at javassist.util.proxy.ProxyFactory.create(ProxyFactory.java:651)

              at javassist.util.proxy.ProxyFactory.create(ProxyFactory.java:635)

       

      To find out the reason, I divided create call into createClass and newInstance. In this case sometimes createClass returns NULL.

      I confirmed that the set superclass in not null. No constructor is defined for it. newInstance() is called with no arguments.

       

      Please let me know what could be the reason for it?

       

      Regards,

      Veena