2 Replies Latest reply on Apr 22, 2003 10:34 AM by James Ward

    Hot Deployment Issue

    kiyanwang Newbie

      JBoss 3.2.0 ( and also 3.0.5 )
      Jakarta Cactus 1.4.1

      I'll summarise the problem, apologies if this isnt the correct forum to post this particular query but I couldnt find one that seemed more appropriate.

      Ive developed a J2EE application which we deploy into JBoss as an ear file.
      This works fine.
      As part of the deployment process we run a set of regression tests using Junit /Cactus. This also works fine. In fact you can run the tests over and over again without any problem.

      However if I then redeploy the ear file ( without restarting Jboss, i.e. hot deploy ) and then run the same tests again they all fail. It seems that if I deploy a new ear file I have to restart the server or the tests simple dont work.

      The exception that is thrown by Jboss when I hot deploy and attempt to run the tests is copied below.
      Has anyone else had any problems with running Cactus based tests on Jboss and if so has anyone found away around this problem with hot deployment?



      11:07:29,219 ERROR [LogInterceptor] RuntimeException:
      java.lang.NullPointerException
      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invokeHome(StatelessSessionContainer.java:592)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:206)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invokeHome(StatelessSessionInstanceInterceptor.java:51)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:88)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:243)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:74)
      at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:92)
      at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
      at org.jboss.ejb.StatelessSessionContainer.internalInvokeHome(StatelessSessionContainer.java:310)
      at org.jboss.ejb.Container.invoke(Container.java:694)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:101)
      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:88)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
      at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:175)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:82)
      at $Proxy72.create(Unknown Source)
      at com.dss.sdc.ejb.usermanagement.tests.HWListUsersTest.testUsers(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.apache.cactus.AbstractTestCase.runServerTest(AbstractTestCase.java:332)
      at org.apache.cactus.AbstractTestCase.runBareServerTest(AbstractTestCase.java:235)
      at org.apache.cactus.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.java:149)
      at org.apache.cactus.server.AbstractWebTestController.dispatch87_handleRequest(AbstractWebTestController.java;org/apache/cactus/util/log/LogAs
      pect.aj(1k):125)
      at org.apache.cactus.server.AbstractWebTestController.around87_handleRequest(AbstractWebTestController.java;org/apache/cactus/util/log/LogAspe
      ct.aj(1k):1149)
      at org.apache.cactus.server.AbstractWebTestController.handleRequest(AbstractWebTestController.java;org/apache/cactus/util/log/LogAspect.aj(1k)
      :101)
      at org.apache.cactus.server.ServletTestRedirector.dispatch113_doPost(ServletTestRedirector.java;org/apache/cactus/util/log/LogAspect.aj(1k):12
      3)
      at org.apache.cactus.server.ServletTestRedirector.around113_doPost(ServletTestRedirector.java;org/apache/cactus/util/log/LogAspect.aj(1k):1149
      )
      at org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector.java;org/apache/cactus/util/log/LogAspect.aj(1k):109)
      at org.apache.cactus.server.ServletTestRedirector.dispatch112_doGet(ServletTestRedirector.java;org/apache/cactus/util/log/LogAspect.aj(1k):96)

      at org.apache.cactus.server.ServletTestRedirector.around112_doGet(ServletTestRedirector.java;org/apache/cactus/util/log/LogAspect.aj(1k):1149)

      at org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.java;org/apache/cactus/util/log/LogAspect.aj(1k):92)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
      at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:342)
      at com.dss.sdc.sentry.Compatability.doFilter(Unknown Source)
      at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:334)
      at com.dss.sdc.sentry.Sentry.doFilter(Unknown Source)
      at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:334)
      at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:286)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1714)
      at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:507)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1664)
      at org.mortbay.http.HttpServer.service(HttpServer.java:863)
      at org.jboss.jetty.Jetty.service(Jetty.java:460)
      at org.mortbay.http.HttpConnection.service(HttpConnection.java:775)
      at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939)
      at org.mortbay.http.HttpConnection.handle(HttpConnection.java:792)
      at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201)
      at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
      at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)