Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
7 replies Latest Post - ‏2011-11-09T04:42:15Z by DanDLu
Vincent978
Vincent978
5 Posts
ACCEPTED ANSWER

Pinned topic WASCE 3.0 cannot deploy EAR

‏2011-09-29T21:30:44Z |
1. Where can I find downloads for WASCE 2.1.1.5 ?
The downloads page only show download for WASCE 3.0.

2. I had created an EAR file (Web Services Client with CXF) and it runs fine under WASCE 2.1.1.5 in Windows.
However when I try to deploy to WASCE 3.0, I get deployment error.

I've gone so far as installing WASCE 3.0 and the JDK 6.0 bundled with it. And re-created my application using WASCE 3.0 Eclipse Server Adapter but I get the same error:



2011-09-29 17:19:30,743 ERROR DeploymentPortlet The application was not deployed.
Fail to scan javax.ws.rs.core.Application sub classes in application
org.apache.geronimo.common.DeploymentException: Fail to scan javax.ws.rs.core.Application sub classes in application
at org.apache.geronimo.wink.deployment.WinkModuleBuilderExtension.initContext(WinkModuleBuilderExtension.java:178)
at org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.postInitContext(TomcatModuleBuilder.java:456)
at org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.initContext(AbstractWebModuleBuilder.java:435)
at org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.initContext(SwitchingModuleBuilder.java:168)
at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:685)
at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:255)
at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:140)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:131)
at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:883)
at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:245)
at org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:116)
at org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(DistributeCommand.java:61)
at java.lang.Thread.run(Thread.java:736)
Caused by: java.lang.ClassCastException: class javax.ws.rs.core.Application
at java.lang.Class.asSubclass(Class.java:1692)
at org.apache.geronimo.wink.deployment.WinkModuleBuilderExtension.initContext(WinkModuleBuilderExtension.java:174)
... 17 more


Thanks for any help.

Again, is there a place to download the WAS 2.1.1.5 version (Need one for a Linux platform) ?
Updated on 2011-11-09T04:42:15Z at 2011-11-09T04:42:15Z by DanDLu
  • Kevan
    Kevan
    121 Posts
    ACCEPTED ANSWER

    Re: WASCE 3.0 cannot deploy EAR

    ‏2011-09-30T11:26:57Z  in response to Vincent978
    From the WAS CE 3.0 download page, you can follow the "archives" link (near the bottom of the page). Here's the current url:

    https://www14.software.ibm.com/webapp/iwm/web/preLogin.do?lang=en_US&source=wsced_archive&S_PKG=dl

    Looks like the JAX-RS function in CXF is causing some interference in your application. A sample application that will recreate the problem would be useful to help diagnose.

    --kevan
    • Vincent978
      Vincent978
      5 Posts
      ACCEPTED ANSWER

      Re: WASCE 3.0 cannot deploy EAR

      ‏2011-09-30T12:40:56Z  in response to Kevan
      Thanks for the link !

      I'm using CXF 2.2.12 for JAX-WS, not using JAX-RS functionality but guess that doesn't matter.
      Do you know if the version of CXF matters ? Noticed that there's a CXF 2.4.1 now.
      • Kevan
        Kevan
        121 Posts
        ACCEPTED ANSWER

        Re: WASCE 3.0 cannot deploy EAR

        ‏2011-09-30T14:08:03Z  in response to Vincent978
        You're welcome.

        No idea, if the CXF version makes a difference.

        --kevan
  • dearnest
    dearnest
    4 Posts
    ACCEPTED ANSWER

    Re: WASCE 3.0 cannot deploy EAR

    ‏2011-11-01T14:10:25Z  in response to Vincent978
    I am having a similar problem as the original poster's. We have an EAR that deploys fine in 2.1.5; we are looking to upgrade to 3.0 but the EAR gets to a certain point in deployment and fails. Here is the stacktrace that the deployer gives:

    Deployment failed.
    Fail to scan javax.ws.rs.core.Application sub classes in application
    org.apache.geronimo.common.DeploymentException: Fail to scan javax.ws.rs.core.Application sub classes in application
    at org.apache.geronimo.wink.deployment.WinkModuleBuilderExtension.initContext(WinkModuleBuilderExtension.java:178)
    at org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.postInitContext(TomcatModuleBuilder.java:456)
    at org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.initContext(AbstractWebModuleBuilder.java:435)
    at org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.initContext(SwitchingModuleBuilder.java:168)
    at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:685)
    at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:255)
    at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:140)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
    at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:131)
    at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:883)
    at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:245)
    at org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:116)
    at org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(DistributeCommand.java:61)
    at java.lang.Thread.run(Thread.java:736)
    Caused by: java.lang.NullPointerException
    at org.apache.xbean.finder.BundleAssignableClassFinder.toASMStylePackageName(BundleAssignableClassFinder.java:257)
    at org.apache.xbean.finder.BundleAssignableClassFinder.isClassAcceptable(BundleAssignableClassFinder.java:111)
    at org.apache.xbean.osgi.bundle.util.BundleClassFinder.scanZip(BundleClassFinder.java:280)
    at org.apache.xbean.osgi.bundle.util.BundleClassFinder.scanBundleClassPath(BundleClassFinder.java:237)
    at org.apache.xbean.osgi.bundle.util.BundleClassFinder.find(BundleClassFinder.java:112)
    at org.apache.geronimo.wink.deployment.WinkModuleBuilderExtension.initContext(WinkModuleBuilderExtension.java:171)
    ... 17 more

    I am unfamiliar with this javax.ws.rs.core.Application class, but I do know that it is involved in web services.

    We have one web service in the application, but it is WSDL-based and uses the javax.xml.ws.Service classes. Just in case, I removed the web service (and references to it in the web.xml and geronimo-web.xml) from the build to see if the application would deploy without it but I still have the same issue. Did anyone else encounter a similar issue and how did you overcome it?

    • Dale
    • pientka
      pientka
      9 Posts
      ACCEPTED ANSWER

      Re: WASCE 3.0 cannot deploy EAR

      ‏2011-11-02T08:46:59Z  in response to dearnest
      If you aren't using jax rs 1.1 I would recommend deactivating
      <module load="false" name="org.apache.geronimo.configs/wink-deployer/3.0-w20110721/car"/>
      perhapse the incubating wink xar-rs-implementation ist conflicting with cxf (not part of was ce)/axis
      Frank
      • dearnest
        dearnest
        4 Posts
        ACCEPTED ANSWER

        Re: WASCE 3.0 cannot deploy EAR

        ‏2011-11-02T14:27:56Z  in response to pientka
        This worked like a charm. Thank you!

        • Dale
        • DanDLu
          DanDLu
          2 Posts
          ACCEPTED ANSWER

          Re: WASCE 3.0 cannot deploy EAR

          ‏2011-11-09T04:42:15Z  in response to dearnest
          You can add one import package in you deployment plan to avoid this error.for example:

          "<sys:import-package>javax.ws.rs.core</sys:import-package>"

          Here is one example of geronimo-web.xml

          <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1"
          xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.2"
          xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0"
          xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2">

          <sys:environment>
          <sys:moduleId>
          <sys:groupId>org.apache.test</sys:groupId>
          <sys:artifactId>helloworld</sys:artifactId>
          <sys:version>1.0</sys:version>
          <sys:type>car</sys:type>
          </sys:moduleId>
          <sys:dependencies/>
          <sys:import-package>javax.ws.rs.core</sys:import-package>
          <sys:non-overridable-classes/>
          </sys:environment>

          <context-root>/hello</context-root>

          </web-app>
          Viola Lu