1 Reply Latest reply on Sep 15, 2009 7:56 AM by jake_flex

    BlazeDS: ClassNotFoundException: flex.messaging.MessageBrokerServlet

    jake_flex Level 2

      I get the following exception in Tomcat logs when I try to deploy my BlazeDS app

       

      15.9.2009 17:21:59 org.apache.catalina.core.ApplicationContext log
      INFO: Marking servlet MessageBrokerServlet as unavailable
      15.9.2009 17:21:59 org.apache.catalina.core.ApplicationContext log
      SEVERE: Error loading WebappClassLoader
        delegate: false
        repositories:
          /WEB-INF/classes/
      ----------> Parent Classloader:
      org.apache.catalina.loader.StandardClassLoader@16b13c7
       flex.messaging.MessageBrokerServlet
      java.lang.ClassNotFoundException: flex.messaging.MessageBrokerServlet
           at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
           at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
           at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1083)
           at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
           at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4045)
           at org.apache.catalina.core.StandardContext.start(StandardContext.java:4351)
           at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
           at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
           at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
           at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
           at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714)
           at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
           at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1206)
           at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
           at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
           at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
           at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
           at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
           at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
           at java.lang.Thread.run(Thread.java:619)
      15.9.2009 17:21:59 org.apache.catalina.core.StandardContext loadOnStartup
      SEVERE: Servlet /blaze1 threw load() exception
      java.lang.ClassNotFoundException: flex.messaging.MessageBrokerServlet
           at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
           at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
           at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1083)
           at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
           at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4045)
           at org.apache.catalina.core.StandardContext.start(StandardContext.java:4351)
           at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
           at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
           at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
           at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
           at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714)
           at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
           at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1206)
           at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
           at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
           at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
           at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
           at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
           at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
           at java.lang.Thread.run(Thread.java:619)
      
      

      It seems like it's trying to load the MessageBroker from inside my war file(WEB-INF/classes). The blazeds war is deployed in Tomcat and is running, isn't that enough? I can run the samples fine, but my own app fails to load. The Tomcat installation is the turnkey model.

       

      I have attached the configuration files of the project.

       

      Thanks.

        • 1. Re: BlazeDS: ClassNotFoundException: flex.messaging.MessageBrokerServlet
          jake_flex Level 2

          OK. That was actually quite easy. I just added the flex-messaging* jars to WEB-INF/lib and it works.

           

          I also had to remove some stuff from the conf files.

           

          In the services-config.xml, I removed the line

          <service class="flex.samples.runtimeconfig.EmployeeRuntimeRemotingDestination" id="runtime-employee-ro" />

           

          and the per-client-qos-polling-amf channel definition.

           

          But the remote object calls still does not work. I'll start a new topic on that problem, so that this one does not go too much off topic.