1 Reply Latest reply on Mar 3, 2005 11:28 PM by jieshengz

    NullPointerException from BaseLocalProxyFactory

    jieshengz Newbie

      I am calling a stateless EJB from web container. The jboss I used is 3.2.6. Sometime I got this exception


      java.lang.NullPointerException
      at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:402)
      at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:83)
      at $Proxy46.getServiceUser(Unknown Source)
      ....


      I had a look at the source code at line 402 the BaseLocalProxyFactory
      line 401: ClassLoader oldCl = TCLAction.UTIL.getContextClassLoader();
      line 402: boolean setTcl = !oldCl.equals(container.getClassLoader());
      line 403: if(setTcl)
      line 404: {
      line 405:TCLAction.UTIL.setContextClassLoader(container.getClassLoader());
      

      The most likely cause cold be that the oldTCl is a null pointer. Is this a bug in jboss or a misuse of EJB at my side?
      Any help is really appreciated,