4 Replies Latest reply on Apr 24, 2002 4:35 PM by Justin Almquist

    Error calling create() on a Home intf. in a servlet

    justin Newbie

      Hello,
      I recently moved to JBoss RC1 from beta2. An error in the container has appeared that did not occur in beta2. Basically, I am getting a reference to the home interface of a session bean from a servlet, then getting a reference to the remote interface of that bean. The exception occurs once the Home interface has been returned, and create() is called to get the Remote interface.
      my code looks basically like this (abbreviated & renamed)

      Context ctx = new InitialContext();
      MyAppHome home = (MyAppHome)ctx.lookup(
      "MyAppBean");
      System.out.println("Got a MyAppHome: " + home);
      //Fails here
      MyApp app = home.create();
      System.out.println("got a remote interface: " + app);
      String result = app.doSomeWork(arg1, arg2);
      System.out.println("Got here. result is: " + result);

      the call to home.create() generates the following lengthy stack trace.
      Note the line about midway down:
      java.rmi.ServerException: Container exception. Notify the container developers :-)

      Should I post this to the bug tracker?

      This did not happen in 3.0beta2.
      Thank you very much for any thoughts & advice.
      Justin


      10:41:49,094 ERROR [LogInterceptor] CONTAINER EXCEPTION:
      java.lang.NullPointerException
      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invokeHome(StatelessSessionContainer.java:598)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:167)
      at org.jboss.ejb.plugins.TxInterceptorBMT.invokeHome(TxInterceptorBMT.java:54)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invokeHome(StatelessSessionInstanceInterceptor.java:57)
      at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:104)
      at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:109)
      at org.jboss.ejb.StatelessSessionContainer.invokeHome(StatelessSessionContainer.java:300)
      at org.jboss.ejb.Container.invoke(Container.java:727)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:492)
      at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:98)
      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:102)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:73)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:76)
      at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:185)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:96)
      at $Proxy118.create(Unknown Source)
      at com.wavespring.cs.servlet.LoginServlet.doPost(Unknown Source)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
      at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
      at java.lang.Thread.run(Thread.java:484)
      10:41:49,114 ERROR [STDERR] java.rmi.ServerException: Container exception. Notify the container developers :-); nested exception is:
      java.lang.NullPointerException
      10:41:49,114 ERROR [STDERR] java.lang.NullPointerException
      10:41:49,115 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invokeHome(StatelessSessionContainer.java:598)
      10:41:49,115 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:167)
      10:41:49,115 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorBMT.invokeHome(TxInterceptorBMT.java:54)
      10:41:49,116 ERROR [STDERR] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invokeHome(StatelessSessionInstanceInterceptor.java:57)
      10:41:49,116 ERROR [STDERR] at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:104)
      10:41:49,116 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:109)
      10:41:49,116 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer.invokeHome(StatelessSessionContainer.java:300)
      10:41:49,117 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Container.java:727)
      10:41:49,117 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:492)
      10:41:49,117 ERROR [STDERR] at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:98)
      10:41:49,118 ERROR [STDERR] at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:102)
      10:41:49,118 ERROR [STDERR] at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:73)
      10:41:49,118 ERROR [STDERR] at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:76)
      10:41:49,118 ERROR [STDERR] at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:185)
      10:41:49,119 ERROR [STDERR] at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:96)
      10:41:49,119 ERROR [STDERR] at $Proxy118.create(Unknown Source)
      10:41:49,119 ERROR [STDERR] at com.wavespring.cs.servlet.LoginServlet.doPost(Unknown Source)
      10:41:49,119 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      10:41:49,120 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      10:41:49,120 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      10:41:49,120 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      10:41:49,121 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
      10:41:49,121 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      10:41:49,121 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      10:41:49,121 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      10:41:49,122 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
      10:41:49,122 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      10:41:49,122 ERROR [STDERR] at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
      10:41:49,122 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      10:41:49,123 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      10:41:49,123 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      10:41:49,123 ERROR [STDERR] at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
      10:41:49,124 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      10:41:49,124 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      10:41:49,124 ERROR [STDERR] at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
      10:41:49,124 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      10:41:49,140 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
      10:41:49,140 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      10:41:49,141 ERROR [STDERR] at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
      10:41:49,141 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      10:41:49,141 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      10:41:49,141 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      10:41:49,142 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      10:41:49,142 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      10:41:49,142 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      10:41:49,142 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      10:41:49,143 ERROR [STDERR] at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
      10:41:49,143 ERROR [STDERR] at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
      10:41:49,143 ERROR [STDERR] at java.lang.Thread.run(Thread.java:484)
      10:41:50,439 INFO [Engine] jsp: init