1 Reply Latest reply on Jul 12, 2004 6:47 AM by ittay

    NPE invoking a finder in ServletContextListener.contextDestr

    ittay Newbie

      our code hooks as a ServletContextListener, upon contextDestroyed
      call it tries to get some bean, by invoking a finder. this is the stack trace

      thanx,
      ittay

      (jboss 3.2.5)

      2004-07-12 11:06:14,137 FATAL [com.qlusters.qrm.server.misc.
      ServerLifecycleListener] (JBoss Shutdown Hook:Tomcat5) Recovery
      exception
      java.lang.NullPointerException
      at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.
      invokeHome(BaseLocalProxyFactory.java:281)
      at org.jboss.ejb.plugins.local.LocalHomeProxy.
      invoke(LocalHomeProxy.java:110)
      at $Proxy123.findByProperty(Unknown Source)
      at com.qlusters.qrm.server.common.objects.DbPrefs.
      setProperty(DbPrefs.java:105)
      at com.qlusters.qrm.server.common.objects.DbPrefs.
      setProperty(DbPrefs.java:96)
      at com.qlusters.qrm.server.common.objects.DbPrefs.
      setProperty(DbPrefs.java:85)
      at com.qlusters.qrm.server.common.objects.DbPrefs.
      setDateProperty(DbPrefs.java:134)
      at com.qlusters.qrm.server.recovery.Status.
      setShutdownDate(Status.java:124)
      at com.qlusters.qrm.server.recovery.Loader.unload(Loader.java:
      193)
      at com.qlusters.qrm.server.misc.ServerLifecycleListener.
      onStop(ServerLifecycleListener.java:119)
      at com.qlusters.qrm.web.init.WebLifecycleListener.
      contextDestroyed(WebLifecycleListener.java:38)
      at org.apache.catalina.core.StandardContext.
      listenerStop(StandardContext.java:3846)
      at org.apache.catalina.core.StandardContext.
      stop(StandardContext.java:4478)
      at org.apache.catalina.core.ContainerBase.
      removeChild(ContainerBase.java:952)
      at org.apache.catalina.core.StandardHostDeployer.
      remove(StandardHostDeployer.java:670)
      at org.apache.catalina.core.StandardHost.
      remove(StandardHost.java:946)
      at org.apache.catalina.startup.HostConfig.
      undeployApps(HostConfig.java:1013)
      at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:
      990)
      at org.apache.catalina.startup.HostConfig.
      lifecycleEvent(HostConfig.java:351)
      at org.apache.catalina.util.LifecycleSupport.
      fireLifecycleEvent(LifecycleSupport.java:119)
      at org.apache.catalina.core.ContainerBase.stop(ContainerBase.
      java:1123)
      at org.apache.catalina.core.ContainerBase.stop(ContainerBase.
      java:1135)
      at org.apache.catalina.core.StandardEngine.
      stop(StandardEngine.java:483)
      at org.jboss.web.tomcat.tc5.StandardService.
      stop(StandardService.java:545)
      at org.apache.catalina.core.StandardServer.
      stop(StandardServer.java:2347)
      at org.apache.catalina.startup.Catalina.stop(Catalina.java:605)
      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.commons.modeler.BaseModelMBean.
      invoke(BaseModelMBean.java:503)
      at org.jboss.mx.server.RawDynamicInvoker.
      invoke(RawDynamicInvoker.java:109)
      at org.jboss.mx.server.MBeanServerImpl.
      invoke(MBeanServerImpl.java:473)
      at org.jboss.web.tomcat.tc5.Tomcat5.stopService(Tomcat5.
      java:318)
      at org.jboss.system.ServiceMBeanSupport.
      jbossInternalStop(ServiceMBeanSupport.java:319)
      at org.jboss.system.ServiceMBeanSupport.
      jbossInternalLifecycle(ServiceMBeanSupport.java:223) at sun.
      reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.
      invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.server.ReflectedDispatcher.
      dispatch(ReflectedDispatcher.java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.
      invoke(AbstractMBeanInvoker.java:185)
      at org.jboss.mx.server.MBeanServerImpl.
      invoke(MBeanServerImpl.java:473)
      at org.jboss.system.ServiceController$ServiceProxy.
      invoke(ServiceController.java:837)
      at $Proxy17.stop(Unknown Source)
      at org.jboss.system.ServiceController.stop(ServiceController.
      java:449)
      at org.jboss.system.ServiceController.stop(ServiceController.
      java:440)
      at sun.reflect.GeneratedMethodAccessor194.invoke(Unknown
      Source)
      at sun.reflect.DelegatingMethodAccessorImpl.
      invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.server.ReflectedDispatcher.
      dispatch(ReflectedDispatcher.java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.
      invoke(AbstractMBeanInvoker.java:185)
      at org.jboss.mx.server.MBeanServerImpl.
      invoke(MBeanServerImpl.java:473)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.
      java:176)
      at $Proxy4.stop(Unknown Source)
      at org.jboss.deployment.SARDeployer.stop(SARDeployer.java:
      285)
      at org.jboss.deployment.MainDeployer.stop(MainDeployer.java:
      492)
      at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.
      java:475)
      at org.jboss.deployment.MainDeployer.shutdown(MainDeployer.
      java:362)
      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.server.ReflectedDispatcher.
      dispatch(ReflectedDispatcher.java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.
      invoke(AbstractMBeanInvoker.java:185)
      at org.jboss.mx.server.MBeanServerImpl.
      invoke(MBeanServerImpl.java:473)
      at org.jboss.system.server.ServerImpl$ShutdownHook.
      shutdownDeployments(ServerImpl.java:884)
      at org.jboss.system.server.ServerImpl$ShutdownHook.
      shutdown(ServerImpl.java:859)
      at org.jboss.system.server.ServerImpl$ShutdownHook.
      run(ServerImpl.java:846)