Topic
1 reply Latest Post - ‏2013-04-02T13:05:43Z by cyu021
cyu021
cyu021
3 Posts
ACCEPTED ANSWER

Pinned topic unable to deploy

‏2013-04-01T08:29:06Z |
Hi all,

I built a web service with CXF in WAR that works for tomcat6. When I try to deploy the same WAR to WASCE3, I get the following error message:

2013-04-01 16:28:00,527 ERROR DeployTool Error:
org.apache.geronimo.common.DeploymentException: Unable to deploy FET_ECSP.war: Failed parsing descriptors for module: /usr/IBM/WebSphere/AppServerCommunityEdition/instances/instance1/var/temp/geronimo-deployer1663543040816487284.tmpdir/FET_ECSP.war
Cannot unmarshall the beans.xml file: jar:file:/usr/IBM/WebSphere/AppServerCommunityEdition/instances/instance1/var/temp/geronimo-deployer1663543040816487284.tmpdir/FET_ECSP.war!/WEB-INF/beans.xml: unexpected element (uri:"http://java.sun.com/xml/ns/javaee", local:"import"). Expected elements are <{http://java.sun.com/xml/ns/javaee}decorators>,<{http://java.sun.com/xml/ns/javaee}alternatives>,<{http://java.sun.com/xml/ns/javaee}interceptors>
unexpected element (uri:"http://java.sun.com/xml/ns/javaee", local:"import"). Expected elements are <{http://java.sun.com/xml/ns/javaee}decorators>,<{http://java.sun.com/xml/ns/javaee}alternatives>,<{http://java.sun.com/xml/ns/javaee}interceptors>

at org.apache.geronimo.deployment.cli.CommandDeploy.runCommand(CommandDeploy.java:43)
at org.apache.geronimo.deployment.cli.CommandDistribute.executeOnline(CommandDistribute.java:138)
at org.apache.geronimo.deployment.cli.CommandDistribute.execute(CommandDistribute.java:124)
at org.apache.geronimo.deployment.cli.DeployTool.execute(DeployTool.java:171)
at org.apache.geronimo.system.main.MainBridge.execute(MainBridge.java:64)
at org.apache.geronimo.main.Bootstrapper.execute(Bootstrapper.java:68)
at org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:65)
at org.apache.geronimo.cli.deployer.DeployerCLI.main(DeployerCLI.java:32)

I have no idea what to do next, any help is very much appreciated.
Updated on 2013-04-02T13:05:43Z at 2013-04-02T13:05:43Z by cyu021
  • cyu021
    cyu021
    3 Posts
    ACCEPTED ANSWER

    Re: unable to deploy

    ‏2013-04-02T13:05:43Z  in response to cyu021
    I tried a few more possibilities:
    1. use CXFServlet instead of Spring when generating Java code from WSDL
    2. replace CXF2.7.3 with CXF2.6.6 (2.7.3 generate exception)
    3. not loading a few modules when startup application server
    4. put a few classes into hidden-classes

    After step 1 ~ 3 are done, I can deploy my WAR to geronimo3 and runs smoothly
    However, the same WAR file can only run without xml schema validation (that is schema-validation-enabled set to false). If I set schema-validation-enabled to true, I get the following exception:

    Caused by: org.xml.sax.SAXParseException: UndeclaredPrefix: 無法解析 'prov:UpdateProvisionTaskEx' 為 QName: 未宣告前置碼 'prov'。
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:231) ~na:na
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:167) ~na:na
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:420) ~na:na
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:354) ~na:na
    at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:453) ~na:na
    at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3217) ~na:na
    at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.getAndCheckXsiType(XMLSchemaValidator.java:2499) ~na:na
    at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1986) ~na:na
    at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:741) ~na:na
    at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorHandlerImpl.startElement(ValidatorHandlerImpl.java:597) ~na:na
    at com.sun.xml.bind.v2.runtime.unmarshaller.ValidatingUnmarshaller.startElement(ValidatingUnmarshaller.java:101) ~jaxb-impl-2.2.6.jar:2.2.6
    at com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startElement(InterningXmlVisitor.java:75) ~jaxb-impl-2.2.6.jar:2.2.6
    at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleStartElement(StAXStreamConnector.java:247) ~jaxb-impl-2.2.6.jar:2.2.6
    at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:181) ~jaxb-impl-2.2.6.jar:2.2.6
    at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:366) ~jaxb-impl-2.2.6.jar:2.2.6
    ... 39 common frames omitted
    I replace jaxb lib with 2.7.3's jaxb and put latest jaxp lib into WEB-INF/lib.
    This is my hidden-classes setting:
    <dep:hidden-classes>
    <dep:filter>org.apache.cxf</dep:filter>
    <dep:filter>org.slf4j</dep:filter>
    <dep:filter>com.sun.xml.bind.v2</dep:filter>
    <dep:filter>com.sun.org.apache.xerces.internal</dep:filter>
    </dep:hidden-classes>

    hidden-classes filter doesn't seem to work on "com.sun.org.apache.xerces.internal", looks like the default lib is still being used at runtime instead of the jaxp I put under WEB-INF/lib (since debug message doesn't show the filename and version of the classes "na:na").

    What should I do next to get rid of this exception?