Topic
7 replies Latest Post - ‏2012-02-07T18:39:16Z by SystemAdmin
SystemAdmin
SystemAdmin
2233 Posts
ACCEPTED ANSWER

Pinned topic Cannot get CXF-based WAR file to run in WAS CE 3.0

‏2012-01-26T03:29:21Z |
Hello,

We have run into a wall attempting to run a web service WAR on WAS CE 3.0 and have run out of options trying to understand why the consistent failure to start up. We have another thread - http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14733234 and we have made it past all the deployment issues, yet the WAR will not start up without a huge load of Spring related errors. We are attempting to use WAS CE 3.0, the CXF jar files from the 2.5.1 release. The app deploys and runs perfectly in Tomcat 7. The app contains classes with both JAX-WS and JAX-RS annotations and has the CXF servlet configured correctly in the web.xml as well as a cxf-beans.xml file that defines the service classes according to the CXF docs. (as noted, runs perfect on plain Tomcat 7).

Attempts to deploy into WAS CE 3.0 required bypass of the built-in Axis2 stack using the JVM startup argument (noted in the thread above) and then disabling the Wink modules in the config.xml.

Not sure if the problem is a classloader issue yet or not or if there is some Spring-related component built into the stack that is colliding and preventing a successful start-up.

Any insight or suggestion would be appreciated. Thanks.
Updated on 2012-02-07T18:39:16Z at 2012-02-07T18:39:16Z by SystemAdmin
  • Ivan.Xu
    Ivan.Xu
    14 Posts
    ACCEPTED ANSWER

    Re: Cannot get CXF-based WAR file to run in WAS CE 3.0

    ‏2012-01-28T06:44:29Z  in response to SystemAdmin
    Have posted a message to the thread "Deployment problem - JAX-WS WAR file on WAS CE 3.0".
    • SystemAdmin
      SystemAdmin
      2233 Posts
      ACCEPTED ANSWER

      Re: Cannot get CXF-based WAR file to run in WAS CE 3.0

      ‏2012-01-28T15:05:35Z  in response to Ivan.Xu
      Hi Ivan

      Thanks for the reply. We can try that of course but when we take the exact same war file and drop it in the Tomcat 7 (7.0.22) webapps folder, it deploys, starts up, and runs just fine. Perhaps the difference in Tomcat versions used by CE 3.0 which I think is 7.0.19...?

      Another colleague took our same war and got it running on Glassfish 311, JBoss 7, and WAS8.5 Liberty beta. No issues or changes needed in any of them. With CE 3.0. AND regular Geronimo 3.0 beta....it fails the same way.

      Mark
    • SystemAdmin
      SystemAdmin
      2233 Posts
      ACCEPTED ANSWER

      Re: Cannot get CXF-based WAR file to run in WAS CE 3.0

      ‏2012-01-28T17:28:50Z  in response to Ivan.Xu
      Hi Ivan

      Thanks for the reply. We can try that of course but when we take the exact same war file and drop it in the Tomcat 7 (7.0.22) webapps folder, it deploys, starts up, and runs just fine. Perhaps the difference in Tomcat versions used by CE 3.0 which I think is 7.0.19...?

      Another colleague took our same war and got it running on Glassfish 311, JBoss 7, and WAS8.5 Liberty beta. No issues or changes needed in any of them. With CE 3.0. AND regular Geronimo 3.0 beta....it fails the same way.

      Mark

      BTW - Did not see your post on the web but did get the following email notification:

      Author:
      Ivan.Xu

      Message:
      I used the example JavaFirstSpringSupport.war with the CXF build, and could reproduce this error. After debuging a bit, it looks to me that it may be a defect in Tomcat, and have sent an email to Tomcat community to double check it. Before that, you could try the solution below :
      a. Move the cxf-servlet.xml to WEB-INF/classes directory, and add the configuration below in the web.xml, depending on which is used to initliaze the cxf engine, you need to add it to the correct place. The sample I tried is to use servlet, the stack showed in your log is to use a listener.
      <init-param>
      <param-name>config-location</param-name>
      <param-value>classpath:cxf-servlet.xml</param-value>
      </init-param>
      b. create a geronimo-web.xml, and add a filter below, this will force to use the xmlschema versions shipped in the application. As the one in server is older than the one in CXF 2.5.*.
      <dep:hidden-classes>
      <dep:filter>org.apache.ws.commons.schema*</dep:filter>
      </dep:hidden-classes>
      Hope it helps.
  • Ivan.Xu
    Ivan.Xu
    14 Posts
    ACCEPTED ANSWER

    Re: Cannot get CXF-based WAR file to run in WAS CE 3.0

    ‏2012-01-29T05:01:47Z  in response to SystemAdmin
    The reason that Tomcat works well is different execution path in WAS CE, I am still waiting for the reponse from Tomcat community to double check this.
    And yes, WAS CE does need to improve the compatibility for those common projects, and sorry for the inconvenience. If any problem, please feel free to drop messages on this forum.
    • RebeccaRobbin
      RebeccaRobbin
      2 Posts
      ACCEPTED ANSWER

      Re: Cannot get CXF-based WAR file to run in WAS CE 3.0

      ‏2012-02-07T18:20:54Z  in response to Ivan.Xu
      Did you get a reply from Tomcat community? I am still waiting for the updates from you. :)
      • RebeccaRobbin
        RebeccaRobbin
        2 Posts
        ACCEPTED ANSWER

        Re: Cannot get CXF-based WAR file to run in WAS CE 3.0

        ‏2012-02-07T18:36:50Z  in response to RebeccaRobbin
        I just realized the last thread was posted a year ago. Hmm. Maybe there is _no updates on this.
      • SystemAdmin
        SystemAdmin
        2233 Posts
        ACCEPTED ANSWER

        Re: Cannot get CXF-based WAR file to run in WAS CE 3.0

        ‏2012-02-07T18:39:16Z  in response to RebeccaRobbin
        To be honest, the fact that we got it running flawlessly on Tomcat 7.0.22 by simply dropping the WAR into the /webapps folder, it deployed, it started up, and the CXF page listing the WSDL links for JAX-WS SOAP Services and the WADL link for JAX-RS web services forced us, at the moment, to abandon trying to use of WAS CE 3.0 (we even tried Geronimo 3.0 only to hit the exact same failures)... we did not have time to keep trying and had to move on.