unable to deploy WAR file

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

unable to deploy WAR file

cyu021
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 (clone of geronimo), 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.
Reply | Threaded
Open this post in threaded view
|

Re: unable to deploy WAR file

Tim Howe
On 1 Apr 2013, cyu021 <[hidden email]> wrote:

> I built a web service with CXF in WAR that works for tomcat6. When I
> try to deploy the same WAR to WASCE3 (clone of geronimo), I get the
> following error message:
>
> Cannot unmarshall the beans.xml file

Can you attach your beans.xml file please?  Also, what version of
Geronimo is WASCE3 based on?  Do you happen to know if your WAR works in
stock Geronimo?

--
Tim Howe
http://quadium.net/~vsync/

The lack of interest, the disdain for history is what makes computing
not-quite-a-field.  [...]  They have no idea where [their culture came
from] and the Internet was done so well that most people think of it
as a natural resource like the Pacific Ocean, rather than something
that was man-made.  When was the last time a technology with a scale
like that was so error-free?  The Web, in comparison, is a joke.  The
Web was done by amateurs.
        -- Alan Kay
Reply | Threaded
Open this post in threaded view
|

Re: unable to deploy WAR file

cyu021
Here is the beans.xml
beans.xml
The WASCE version is 3.0.0.2, don't know where to check the embedded geronimo version.
Reply | Threaded
Open this post in threaded view
|

Re: unable to deploy WAR file

cyu021
same error occurs when I deploy the WAR file to geronimo3 (just downloaded it from apache web site)
Reply | Threaded
Open this post in threaded view
|

Re: unable to deploy WAR file

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) cxf-servlet.xml, web.xml
3. not loading a few modules when startup application server config.xml
4. put a few classes into hidden-classes geronimo-web.xml

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?
Reply | Threaded
Open this post in threaded view
|

Re: unable to deploy WAR file

Susanne Horst
In reply to this post by cyu021
Hi,

does anybody know why and if it takes so long to deploy a war file via the webinterface? Is it the software? Is it the Internet-service-provider? Is it the third-party-cable?

In my case it takes about 2 hours to deploy a 300 MB war file. 

Greetings,
Susanne
Reply | Threaded
Open this post in threaded view
|

speed of Web deployment (was: unable to deploy WAR file)

Tim Howe
On 3 Apr 2013, Susanne Horst <[hidden email]> wrote:

> does anybody know why and if it takes so long to deploy a war file via
> the webinterface? Is it the software? Is it the
> Internet-service-provider? Is it the third-party-cable?

Have you tested your Internet speed generally?  Have you tested the
speed between the client and the specific server (download *and
upload*)?  Have you tried copying the file to the server and deploying
via the command line and comparing the speed to that of the Web
interface?

--
Tim Howe
http://quadium.net/~vsync/

The lack of interest, the disdain for history is what makes computing
not-quite-a-field.  [...]  They have no idea where [their culture came
from] and the Internet was done so well that most people think of it
as a natural resource like the Pacific Ocean, rather than something
that was man-made.  When was the last time a technology with a scale
like that was so error-free?  The Web, in comparison, is a joke.  The
Web was done by amateurs.
        -- Alan Kay
Reply | Threaded
Open this post in threaded view
|

Re: unable to deploy WAR file

zilinchen
In reply to this post by cyu021
1, hidden-class not working with Geronimo 3.0 above,
instead, using something like
<import-package>!com.sun.org.apache.xerces.internal.*</import-package>

2, They already deploy performance issue fired, the estimates what I know is 50MB file, take about 20 minutes. please check link here
https://issues.apache.org/jira/browse/GERONIMO-6222

good luck