6 Replies Latest reply on Nov 5, 2008 5:31 AM by nitha

    Reloading the application context

    nitha

      what are the causes that makes an application to reload?
      I am using jboss-4.0.1sp1 version to deploy my application. But the application gets reloaded very often and it throws Null Pointer exception.

      Can anyone help me in this...... what causes my application to reload the context

        • 1. Re: Reloading the application context
          jaikiran

          There's a hot deployment scanner which looks for the last modified time of the deployment archive or the top level deployment descriptor to decide whether the application needs to be redeployed. Are you doing any changes to the files deployed in the deploy folder of JBoss?

          P.S: You have an option of disabling hot deployment scanner by setting the ScanEnabled to false for the DeploymentScanner MBean in %JBOSS_HOME%/server/< serverName>/conf/jboss-service.xml file:

          <!-- A flag to disable the scans -->
           <attribute name="ScanEnabled">false</attribute>


          • 2. Re: Reloading the application context
            nitha

            Thanks .
            Through our application, we are uploading files and is saved in the deploy folder.
            Is this causing the application to reload.

            • 3. Re: Reloading the application context
              jaikiran

              That wont cause your existing application to be redeployed. But yes, if you put something in the deploy folder, the server will try to deploy these new files (which might even turn out to be invalid deployments). Any specific reason why you are putting the files in the deploy folder? And what types of files are these.

              • 4. Re: Reloading the application context
                nitha

                We are uploading ppts, pdfs , images and video files. we have created separate folders for each under the 'deploy' folder.

                • 5. Re: Reloading the application context
                  jaikiran

                   

                  "nitha" wrote:
                  We are uploading ppts, pdfs , images and video files. we have created separate folders for each under the 'deploy' folder.


                  Instead of putting them in deploy folder, a better way to do this is explained here http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4042437

                  • 6. Re: Reloading the application context
                    nitha

                    Hi ,

                    We ae facing the same problem. Our production server crashed 4 times with in a week. when we checked the logs..... its trying to reload the context and throws some exception and hangs.......

                    ERROR [org.apache.commons.modeler.BaseModelMBean] Exception invoking method reload
                    java.lang.NullPointerException
                     at org.jboss.web.tomcat.tc5.WebCtxLoader.start(WebCtxLoader.java:109)
                     at org.apache.catalina.core.StandardContext.start(StandardContext.java:4231)
                     at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3043)
                     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:150)
                     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                     at org.jboss.jmx.adaptor.control.Server.invokeOpByName(Server.java:236)
                     at org.jboss.jmx.adaptor.control.Server.invokeOp(Server.java:202)
                     at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.invokeOp(HtmlAdaptorServlet.java:241)
                     at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.processRequest(HtmlAdaptorServlet.java:79)
                     at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.doPost(HtmlAdaptorServlet.java:61)
                     at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                     at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
                     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
                     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
                     at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)
                     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
                     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
                     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
                     at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
                     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
                     at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
                     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
                     at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
                     at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:66)
                     at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
                     at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:150)
                     at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
                     at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:54)
                     at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
                     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
                     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
                     at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
                     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
                     at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
                     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
                     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                     at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
                     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
                     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
                     at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
                     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
                     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
                     at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
                     at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
                     at java.lang.Thread.run(Thread.java:534)
                    2008-10-29 05:22:13,914 ERROR [org.jboss.web.localhost.Engine] StandardWrapperValve[HtmlAdaptor]: Servlet.service() for servlet HtmlAdaptor threw exception
                    RuntimeOperationsException: Exception invoking method reload Cause: java.lang.NullPointerException
                     at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:511)
                     at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150)
                     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
                     at org.jboss.jmx.adaptor.control.Server.invokeOpByName(Server.java:236)
                    
                    


                    Any thoughts regarding this...........