4 Replies Latest reply on Mar 4, 2013 5:04 PM by Qiang Fan

    load-demo on AS7

    Qiang Fan Newbie

      Hi,

       

      I am trying to run the load-demo on AS7. after deploying the load-demo.war in the AS7 and run the client, i got the following errors in the server.log

       

      I have downloaded the latest source code of the mod_cluster maven project.

       

      i can see it is the LoadServlet.java in the package org.jboss.modcluster.demo.servlet;

      import org.apache.catalina.Engine;

      import org.apache.catalina.Service;

      import org.apache.catalina.connector.Connector;

       

      It uses some catalina libraries that I do find them in ./modules/org/jboss/as/web/main/jbossweb-7.0.17.Final-redhat-1.jar in the AS7. but it seems to missing "org/apache/catalina/ServerFactory"

       

       

      Just wondering if anyone has seen the same issue and it is solved or have a workaround on AS7.

       

      Thanks,

       

      //Qiang Fan

       

       

      Feb 27 16:39:09,975 traffic_instance1_PL-3 jboss: ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/load-demo].[record]] (ajp-/192.168.200.3:30301-1) Allocate exception for servlet record: java.lang.NoClassDefFoundError: org/apache/catalina/ServerFactory
              at org.jboss.modcluster.demo.servlet.RecordServlet.init(Unknown Source) [classes:]
              at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1202) [jbossweb-7.0.17.Final-redhat-1.jar:]
              at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:952) [jbossweb-7.0.17.Final-redhat-1.jar:]
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:188) [jbossweb-7.0.17.Final-redhat-1.jar:]
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.17.Final-redhat-1.jar:]
              at org.jboss.modcluster.container.jbossweb.JBossWebContext$RequestListenerValve.event(JBossWebContext.java:67)
              at org.jboss.modcluster.container.jbossweb.JBossWebContext$RequestListenerValve.invoke(JBossWebContext.java:48)
              at org.jboss.as.web.session.ClusteredSessionValve.handleRequest(ClusteredSessionValve.java:134) [jboss-as-web-7.1.3.Final-redhat-4.jar:                                                      7.1.3.Final-redhat-4]
              at org.jboss.as.web.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:99) [jboss-as-web-7.1.3.Final-redhat-4.jar:7.1.3.Fi                                                      nal-redhat-4]
              at org.jboss.as.web.session.JvmRouteValve.invoke(JvmRouteValve.java:92) [jboss-as-web-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
              at org.jboss.as.web.session.LockingValve.invoke(LockingValve.java:64) [jboss-as-web-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
              at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.1.3.Final                                                      -redhat-4.jar:7.1.3.Final-redhat-4]
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.17.Final-redhat-1.jar:]
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.17.Final-redhat-1.jar:]
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.17.Final-redhat-1.jar:]
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:372) [jbossweb-7.0.17.Final-redhat-1.jar:]
              at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:505) [jbossweb-7.0.17.Final-redhat-1.jar:]
              at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:453) [jbossweb-7.0.17.Final-redhat-1.jar:]
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:931) [jbossweb-7.0.17.Final-redhat-1.jar:]
              at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_09]

        • 1. Re: load-demo on AS7
          Paul Ferraro Master

          What version of mod_cluster are you using?  ServerFactory is not referenced in the demo's RecordServlet in the latest version (1.2.3.Final) of mod_cluster.

          There are other issues however.  I just opened:

          https://issues.jboss.org/browse/MODCLUSTER-330

          • 2. Re: load-demo on AS7
            Qiang Fan Newbie

            Hi Paul,

             

            For the mod_cluster(httpd) part, I am using pre-built binary download 1.2.0 Final for linux2-x64.

             

            For the load-demo client/server, I built it myself from the downloaded zip file from https://github.com/modcluster/mod_cluster today. I assume this is the latest code.

             

            The only thing is that when I posted the previous error message, I deployed with an older version of the load-demo.war from EAP5.1.x. But the client was the latest. so my previous error message was not really valid anymore. Sorry for the confusion.

             

            I just re-deployed the load-demo.war I built myself and run it with the latest client. It gives me some JMX error now.

             

            Now I can see you have replied another post which has the exact the same error as mine. I assume the problem is still not solved yet?

             

            https://community.jboss.org/thread/195288

             

            Feb 27 20:52:48,537 traffic_instance1_PL-3 jboss: ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/load-demo].[record]] (                     ajp-/192.168.200.3:30301-3) Allocate exception for servlet record: javax.management.InstanceNotFoundException: Catalina:type=Engine
                    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1095) [rt.jar:1.7.0_09]
                    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getClassLoaderFor(DefaultMBeanServerInterceptor.java:1444) [rt.jar:1.7.0_09]
                    at com.sun.jmx.mbeanserver.JmxMBeanServer.getClassLoaderFor(JmxMBeanServer.java:1308) [rt.jar:1.7.0_09]
                    at org.jboss.as.jmx.PluggableMBeanServerImpl$TcclMBeanServer.pushClassLoader(PluggableMBeanServerImpl.java:588)
                    at org.jboss.as.jmx.PluggableMBeanServerImpl$TcclMBeanServer.getAttribute(PluggableMBeanServerImpl.java:417)
                    at org.jboss.as.jmx.PluggableMBeanServerImpl.getAttribute(PluggableMBeanServerImpl.java:154)
                    at org.jboss.modcluster.demo.servlet.LoadServlet.init(LoadServlet.java:130) [classes:]
                    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1202) [jbossweb-7.0.17.Final-redhat-1.jar:]
                    at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:952) [jbossweb-7.0.17.Final-redhat-1.jar:]
                    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:188) [jbossweb-7.0.17.Final-redhat-1.jar:]
                    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.17.Final-redhat-1.jar:]
                    at org.jboss.modcluster.container.jbossweb.JBossWebContext$RequestListenerValve.event(JBossWebContext.java:67)
                    at org.jboss.modcluster.container.jbossweb.JBossWebContext$RequestListenerValve.invoke(JBossWebContext.java:48)
                    at org.jboss.as.web.session.ClusteredSessionValve.handleRequest(ClusteredSessionValve.java:134) [jboss-as-web-7.1.3.Final-redhat-4.jar:7.1.                     3.Final-redhat-4]
                    at org.jboss.as.web.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:99) [jboss-as-web-7.1.3.Final-redhat-4.jar:7.1.3.Final-                     redhat-4]
                    at org.jboss.as.web.session.JvmRouteValve.invoke(JvmRouteValve.java:92) [jboss-as-web-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
                    at org.jboss.as.web.session.LockingValve.invoke(LockingValve.java:64) [jboss-as-web-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
                    at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.1.3.Final-red                     hat-4.jar:7.1.3.Final-redhat-4]
                    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.17.Final-redhat-1.jar:]
                    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.17.Final-redhat-1.jar:]
                    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.17.Final-redhat-1.jar:]
                    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:372) [jbossweb-7.0.17.Final-redhat-1.jar:]
                    at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:505) [jbossweb-7.0.17.Final-redhat-1.jar:]
                    at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:453) [jbossweb-7.0.17.Final-redhat-1.jar:]
                    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:931) [jbossweb-7.0.17.Final-redhat-1.jar:]
                    at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_09]

             

             

             

             

             

            Thanks,

             

             

            //Qiang

             

             

            • 3. Re: load-demo on AS7
              Paul Ferraro Master

              I've submitted a fix for this:

              https://github.com/modcluster/mod_cluster/pull/9

               

              To get the demo webapp to locate the jvm route of your node, you'll need to do one of the following:

              * Make sure jboss web registers mbeans by starting your server with the system property: -Dorg.apache.tomcat.util.ENABLE_MODELER=true

              * Define your jvm route using a system property: -Djboss.mod_cluster.jvmRoute=...

              • 4. Re: load-demo on AS7
                Qiang Fan Newbie

                Hi Paul,

                 

                I tried your changs. and recompliled war file. It works now. Thanks a lot!

                 

                //Qiang