1 Reply Latest reply on Apr 30, 2002 10:13 AM by Alexander

    problem with home.create() on jboss-3.0.0RC1_tomcat-4.0.3

    Le Bris Estelle Newbie

      Hi,

      I have a problem with an home.create() on jboss-3.0.0RC1_tomcat-4.0.3 that
      I don't have on jboss-3.0.0RC1 (whith Jetty).

      The error generated by jboss-3.0.0RC1_tomcat-4.0.3 is:
      12:39:59,000 ERROR [STDERR] java.rmi.ServerException: null; nested exception is:
      java.lang.NullPointerException
      12:39:59,000 ERROR [STDERR] java.lang.NullPointerException
      12:39:59,001 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invokeHome(StatelessSessionContainer.java:598)
      12:39:59,001 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:167)
      12:39:59,001 ERROR [STDERR] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invokeHome(StatelessSessionInstanceInterceptor.java:57)
      12:39:59,001 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:98)
      12:39:59,001 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:167)
      12:39:59,001 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:52)
      12:39:59,001 ERROR [STDERR] at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:104)
      12:39:59,002 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:109)
      12:39:59,002 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer.invokeHome(StatelessSessionContainer.java:300)
      12:39:59,002 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Container.java:727)
      12:39:59,002 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:492)
      12:39:59,002 ERROR [STDERR] at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:98)
      12:39:59,002 ERROR [STDERR] at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:102)
      12:39:59,003 ERROR [STDERR] at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:73)
      12:39:59,003 ERROR [STDERR] at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:76)
      12:39:59,003 ERROR [STDERR] at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:185)
      12:39:59,003 ERROR [STDERR] at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:96)
      12:39:59,003 ERROR [STDERR] at $Proxy42.create(Unknown Source)
      12:39:59,003 ERROR [STDERR] at com.alkinos.authentication.client.Login.doPost(Login.java:48)
      12:39:59,003 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      12:39:59,004 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      12:39:59,004 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      12:39:59,004 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      12:39:59,004 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
      12:39:59,004 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      12:39:59,004 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      12:39:59,004 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      12:39:59,005 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
      12:39:59,005 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      12:39:59,005 ERROR [STDERR] at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
      12:39:59,005 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      12:39:59,005 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      12:39:59,005 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      12:39:59,005 ERROR [STDERR] at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
      12:39:59,006 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      12:39:59,006 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      12:39:59,007 ERROR [STDERR] at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
      12:39:59,007 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      12:39:59,007 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
      12:39:59,007 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      12:39:59,008 ERROR [STDERR] at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
      12:39:59,008 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      12:39:59,008 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      12:39:59,008 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      12:39:59,008 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      12:39:59,008 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      12:39:59,011 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      12:39:59,011 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      12:39:59,012 ERROR [STDERR] at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
      12:39:59,013 ERROR [STDERR] at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
      12:39:59,013 ERROR [STDERR] at java.lang.Thread.run(Thread.java:484)


      My client code is: (my EJB's name is "AuthenticationBean")
      // Get a naming context
      InitialContext jndiCtx = new InitialContext() ;
      // Get a reference to an Authentication Bean
      Object ref = jndiCtx.lookup("authentication/Authentication") ;
      // Get a reference from this to the Bean's Home interface
      AuthenticationHome home = (AuthenticationHome)
      PortableRemoteObject.narrow(ref, AuthenticationHome.class) ;
      System.out.println("Got Home, just before home.create()") ;
      Authentication auth = home.create() ;
      System.out.println("Just after home.create()") ;

      My AuthenticationHome is:
      public interface AuthenticationHome extends EJBHome {

      /**
      * Creates an instance of the `AuthenticationBean' class on the server, and
      * returns a remote reference to an Authentication interface on the client.
      */
      Authentication create() throws RemoteException, CreateException;

      }

      My AuthenticationBean is:
      public class AuthenticationBean implements SessionBean {
      // Business methods
      ......
      // Bean methods
      public void ejbCreate() { }
      public void ejbRemove() {}
      public void ejbActivate() { }
      public void ejbPassivate() { }
      public void setSessionContext(SessionContext sc) {}
      }

      Is it a bug of tomcat ?