7 Replies Latest reply on Sep 26, 2003 5:33 PM by zqingru

    how to make jboss hot deployed for jboss-3.0.6-tomcat-4.1.18

    zqingru Newbie

      Hi,

      my team are currently working on a project which uses jboss-3.0.6-tomcat-4.1.18 with structs 1.1. Each time when a change is made either in JSP, or EJB backend, we have to restart JBoss server in order to see the changes updated.
      I am wondering if it is possible and how to make Jboss server hot deployed in such a environment?
      will jboss-3.2.1-tomcat-4.1.24 serve such purpose?
      Is there any documents for configuration?

      Thanks so much.

      qingru

        • 1. Re: how to make jboss hot deployed for jboss-3.0.6-tomcat-4.
          Raja Master

          Jboss by default supports hot deployment. Do you package ur stuff as an ear or do you have it as expanded file structure.
          If u are using an ear, just redeploying wud help.
          If u are using expanded archive, touch the web.xml to redeploy ur war file contents .

          -Raj

          • 2. Re: how to make jboss hot deployed for jboss-3.0.6-tomcat-4.
            zqingru Newbie

            Yes, we are pachaging our staff as a war file and a jar file, and we deploy them in the server/default/deploy directory.

            So you mean we need to touch the web.xml? Is it a unix command? Our system is Sun solaris. Can you give me the command? (Sorry, I am a junior level programmer).

            Thanks so much.

            -Qingru

            • 3. Re: how to make jboss hot deployed for jboss-3.0.6-tomcat-4.
              zqingru Newbie

              and web.xml under which directory? I found there are many web.xml in different directories. is the one under
              tomcat-4.1.x/conf/web.xml?

              thanks again.

              -Qingru

              • 4. Re: how to make jboss hot deployed for jboss-3.0.6-tomcat-4.
                Raja Master

                if u r packaging it as a ear file, no need to touch, once u drop ur file in the deploy directory it shud get redeployed.

                is that the way u are deploying?

                -Raj

                • 5. Re: how to make jboss hot deployed for jboss-3.0.6-tomcat-4.
                  zqingru Newbie

                  Thanks for your reply, raja05.

                  We are currently packaging a .war file and a .jar file to the hot deploy directory. Our environment is jboss3.0.6/tomcat4.1.18 & struts 1.1. I tried to touch all of web.xml when redeploy .war file, and I still got the errors in the log as below:

                  16:02:04,466 INFO [Engine] ContextConfig[/Navigo]: Added certificates -> request attribute Valve
                  16:02:06,527 INFO [EmbeddedCatalinaService41] Using Java2 parent classloader delegation: true
                  16:02:06,529 INFO [Engine] StandardManager[/Navigo]: Seeding random number generator class java.security.SecureRandom
                  16:02:06,531 INFO [Engine] StandardManager[/Navigo]: Seeding of random number generator has been completed
                  16:02:06,534 INFO [Engine] StandardWrapper[/Navigo:default]: Loading container servlet default
                  16:02:06,593 INFO [Engine] StandardWrapper[/Navigo:action]: Marking servlet action as unavailable
                  16:02:06,594 ERROR [Engine] StandardContext[/Navigo]: Servlet /Navigo threw load() exception
                  javax.servlet.ServletException: Error instantiating servlet class org.apache.struts.action.ActionServlet
                  at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:911)
                  at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:821)
                  at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3420)
                  at org.apache.catalina.core.StandardContext.start(StandardContext.java:3608)
                  at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
                  at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
                  at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
                  at org.jboss.web.catalina.EmbeddedCatalinaService41.createWebContext(EmbeddedCatalinaService41.java:432)
                  at org.jboss.web.catalina.EmbeddedCatalinaService41.performDeploy(EmbeddedCatalinaService41.java:306)
                  at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:300)
                  at org.jboss.deployment.MainDeployer.start(MainDeployer.java:814)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:627)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:591)
                  at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
                  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:517)
                  at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
                  at $Proxy3.deploy(Unknown Source)
                  at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:435)
                  at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:561)
                  at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:212)
                  at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:225)
                  at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:202)
                  16:02:06,603 ERROR [Engine] ----- Root Cause -----
                  java.lang.LinkageError: loader constraints violated when linking javax/servlet/http/HttpServletRequest class
                  at java.lang.Class.getDeclaredConstructors0(Native Method)
                  at java.lang.Class.privateGetDeclaredConstructors(Class.java:1590)
                  at java.lang.Class.getConstructor0(Class.java:1762)
                  at java.lang.Class.newInstance0(Class.java:276)
                  at java.lang.Class.newInstance(Class.java:259)
                  at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:902)
                  at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:821)
                  at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3420)
                  at org.apache.catalina.core.StandardContext.start(StandardContext.java:3608)
                  at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
                  at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
                  at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
                  at org.jboss.web.catalina.EmbeddedCatalinaService41.createWebContext(EmbeddedCatalinaService41.java:432)
                  at org.jboss.web.catalina.EmbeddedCatalinaService41.performDeploy(EmbeddedCatalinaService41.java:306)
                  at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:300)
                  at org.jboss.deployment.MainDeployer.start(MainDeployer.java:814)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:627)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:591)
                  at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
                  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:517)
                  at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
                  at $Proxy3.deploy(Unknown Source)
                  at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:435)
                  at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:561)
                  at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:212)
                  at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:225)
                  at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:202)
                  16:02:06,612 INFO [Engine] StandardWrapper[/Navigo:invoker]: Loading container servlet invoker
                  16:02:06,646 INFO [MainDeployer] Deployed package: file:/user/zqingru/jboss-3.0.6_tomcat-4.1.18/server/default/deploy/Navigo.war

                  • 6. Re: how to make jboss hot deployed for jboss-3.0.6-tomcat-4.
                    Raja Master

                    do u have the servlet.jar in ur war file distribution? u dont need to have it, JBoss lib already has the servlet.jar .
                    The error is because JBoss is loading 2 copies of the servlet.jar

                    -Raj

                    • 7. Re: how to make jboss hot deployed for jboss-3.0.6-tomcat-4.
                      zqingru Newbie

                      Thank you so much for your helpful hint, raja05.

                      I did put servlet.jar into the Navigo.War file. But just removing servlet.jar file won't solve the problem.

                      I actually found out that it is because we redeploy both Navigo.jar and Navigo.war. If we only redeploy Navigo.war, the redeployment will work.

                      Since we build EJB code into Navigo.jar, and JSP and struts in Navigo.war, only JSP files changes can show up without restarting JBoss server.

                      I am wondering why both Navigo.jar and Navigo.war can be deployed when restart the Jboss server, but not at the redeploy time.

                      Is that a way to put everything into one war file? or an ear file? I am a novice here, even don't know what an ear file is.

                      Our build script for Navigo.war and Navigo.jar files are written by a person who is currently on a maternity leave. So I can't get useful response from her.

                      raja05, if you can give me more inputs, I would be really appreciate.

                      Thanks and have a nice weekend,

                      -Qingru