0 Replies Latest reply on Jul 22, 2009 11:13 AM by olegkon

    Deploying Flex/Java/JMS app on JBoss5

      Hi,

      I am trying to deploy a fairly simple web app which includes Java, Flex and BlazeDS on JBoss 5.1.0. So far it runs fine on Tomcat6 [in addition to BlazeDS turnkey testdrive], but I need to port it to JBoss5.
      It is a Flex/JMS chat sample which used to work with ActiveMQ:
      http://www.agimatec.de/blog/2008/08/extended-blazeds-and-jms-example/

      Deploying as an exploded archive.

      Getting several exceptions starting with:
      10:00:40,727 ERROR [StandardContext] Error starting static Resources
      java.lang.IllegalArgumentException: Document base C:\jboss-5.1.0.GA\server\default\deploy\BlazeTest\WEB-INF\web.xml does not exist or is not a readable directory
      at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:148)
      at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4021)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4188)
      at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
      at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
      at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
      at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
      at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
      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:597)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)

      That web.xml exists and is a normal deployment descriptor, here:
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
      <web-app>
      <display-name>BlazeTest</display-name>
      BlazeTest with BlazeDS Application

      <!-- Http Flex Session attribute and binding listener support -->

      <listener-class>flex.messaging.HttpFlexSession</listener-class>


      <!-- MessageBroker Servlet -->

      <servlet-name>MessageBrokerServlet</servlet-name>
      <display-name>MessageBrokerServlet</display-name>
      <servlet-class>flex.messaging.MessageBrokerServlet</servlet-class>
      <init-param>
      <param-name>services.configuration.file</param-name>
      <param-value>/WEB-INF/flex/services-config.xml</param-value>
      </init-param>
      <load-on-startup>1</load-on-startup>


      <servlet-mapping>
      <servlet-name>MessageBrokerServlet</servlet-name>
      <url-pattern>/msgbroker/*</url-pattern>
      </servlet-mapping>

      <welcome-file-list>
      <welcome-file>index.html</welcome-file>
      <welcome-file>index.htm</welcome-file>
      <welcome-file>index.jsp</welcome-file>
      </welcome-file-list>
      </web-app>

      Also, it has a context XML file which on Tomcat was on:
      conf/Catalina/localhost dir, so on JBoss I put it in server/default/conf dir.
      Is it correct place ?

      Is that context acceptable to JBoss5 or its JMS require some changes?

      <?xml version="1.0" encoding="UTF-8"?>





      I am fairly new to JBoss5 & BlazeDS.

      Just dropped blazeds.war to server/default/deploy without any config changes.

      Please help !

      TIA,
      Oleg.