users@glassfish.java.net

Re: Library Conflict

From: <glassfish_at_javadesktop.org>
Date: Fri, 26 Oct 2007 04:00:50 PDT

When I tried to invoke the application, the error I received was:

description: The server encountered an internal error () that prevented it from fulfilling this request.
exception javax.servlet.ServletException: PWC1244: Servlet execution threw an exception
root cause

java.lang.NoSuchMethodError: javax.xml.stream.XMLOutputFactory.newInstance(Ljava/lang/String;Ljava/lang/ClassLoader;)Ljavax/xml/stream/XMLOutputFactory;

I've attached the relevant extract from the server log as well.

I'd like all the classes bundled with my war to be used in preference to those loaded by the app server. Apache Muse builds .wars that bundle all the required libraries and modules.

The extract is:

[#|2007-10-18T13:11:30.865-0400|INFO|sun-appserver9.1|javax.enterprise.system.tools.deployment|_ThreadID=29;_ThreadName=Thread-42;|deployed with moduleid = server-build|#]



[#|2007-10-18T13:11:32.808-0400|INFO|sun-appserver9.1|org.apache.axis2.deployment.DeploymentEngine|_ThreadID=28;_ThreadName=httpWorkerThread-5858-1;|Deploying module : addressing-1.1|#]



[#|2007-10-18T13:11:32.818-0400|INFO|sun-appserver9.1|org.apache.axis2.deployment.DeploymentEngine|_ThreadID=28;_ThreadName=httpWorkerThread-5858-1;|Deploying module : muse-wsa-action-2.1.0|#]



[#|2007-10-18T13:11:33.199-0400|INFO|sun-appserver9.1|org.apache.axis2.deployment.DeploymentEngine|_ThreadID=28;_ThreadName=httpWorkerThread-5858-1;|Deploying Web service muse|#]



[#|2007-10-18T13:11:55.861-0400|FINE|sun-appserver9.1|org.apache.muse.core|_ThreadID=30;_ThreadName=httpSSLWorkerThread-8080-0;ClassName=org.apache.muse.core.SimpleResource;MethodName=initializeCapabilities;_RequestID=e4b286ed-0978-4119-82e1-731619257190;|[ID = 'CapabilityInitialized'] The resource at 'SimpleResource' has started initialization of capability 'http://ws.apache.org/muse/test/simple/second'.|#]



[#|2007-10-18T13:11:55.871-0400|FINE|sun-appserver9.1|org.apache.muse.core|_ThreadID=30;_ThreadName=httpSSLWorkerThread-8080-0;ClassName=org.apache.muse.core.SimpleResource;MethodName=initializeCapabilities;_RequestID=e4b286ed-0978-4119-82e1-731619257190;|[ID = 'CapabilityInitialized'] The resource at 'SimpleResource' has started initialization of capability 'http://ws.apache.org/muse/test/simple/first'.|#]



[#|2007-10-18T13:11:55.871-0400|FINE|sun-appserver9.1|org.apache.muse.core|_ThreadID=30;_ThreadName=httpSSLWorkerThread-8080-0;ClassName=org.apache.muse.core.SimpleResource;MethodName=initializeCapabilities;_RequestID=e4b286ed-0978-4119-82e1-731619257190;|[ID = 'CapabilityInitialized'] The resource at 'SimpleResource' has started initialization of capability 'http://schemas.xmlsoap.org/ws/2004/09/mex'.|#]



[#|2007-10-18T13:11:55.871-0400|FINE|sun-appserver9.1|org.apache.muse.core|_ThreadID=30;_ThreadName=httpSSLWorkerThread-8080-0;ClassName=org.apache.muse.core.SimpleResource;MethodName=initializeCapabilities;_RequestID=e4b286ed-0978-4119-82e1-731619257190;|[ID = 'CapabilityInitializationComplete'] The resource at 'SimpleResource' has completed initialization of capability 'http://ws.apache.org/muse/test/simple/second.|#]



[#|2007-10-18T13:11:55.871-0400|FINE|sun-appserver9.1|org.apache.muse.core|_ThreadID=30;_ThreadName=httpSSLWorkerThread-8080-0;ClassName=org.apache.muse.core.SimpleResource;MethodName=initializeCapabilities;_RequestID=e4b286ed-0978-4119-82e1-731619257190;|[ID = 'CapabilityInitializationComplete'] The resource at 'SimpleResource' has completed initialization of capability 'http://ws.apache.org/muse/test/simple/first.|#]



[#|2007-10-18T13:11:55.871-0400|FINE|sun-appserver9.1|org.apache.muse.core|_ThreadID=30;_ThreadName=httpSSLWorkerThread-8080-0;ClassName=org.apache.muse.core.SimpleResource;MethodName=initializeCapabilities;_RequestID=e4b286ed-0978-4119-82e1-731619257190;|[ID = 'CapabilityInitializationComplete'] The resource at 'SimpleResource' has completed initialization of capability 'http://schemas.xmlsoap.org/ws/2004/09/mex.|#]



[#|2007-10-18T13:11:55.871-0400|INFO|sun-appserver9.1|org.apache.muse.core|_ThreadID=30;_ThreadName=httpSSLWorkerThread-8080-0;|[ID = 'ResourceInitialized'] The resource at 'SimpleResource' has been initialized.|#]



[#|2007-10-18T13:11:55.871-0400|INFO|sun-appserver9.1|org.apache.muse.core|_ThreadID=30;_ThreadName=httpSSLWorkerThread-8080-0;|[ID = 'RouterIsInitialized'] The resource router has been initialized.|#]



[#|2007-10-18T13:11:55.931-0400|FINE|sun-appserver9.1|org.apache.muse.core|_ThreadID=30;_ThreadName=httpSSLWorkerThread-8080-0;ClassName=org.apache.muse.util.LoggingUtils;MethodName=logMessage;_RequestID=e4b286ed-0978-4119-82e1-731619257190;|[SERVER TRACE] SOAP envelope contents (incoming):

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
    <soap:Header>
        <wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing">http://127.0.0.1:8080/server-build/services/SimpleResource</wsa:To>
        <wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing">http://ws.apache.org/muse/test/simple/first/FirstOperation</wsa:Action>
        <wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing">uuid:c2ce2d78-ce14-8482-a5dd-6570570f059c</wsa:MessageID>
        <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing">
            <wsa:Address>http://www.w3.org/2005/08/addressing/role/anonymous</wsa:Address>
        </wsa:From>
        <muse-wsa:ResourceId
            xmlns:muse-wsa="http://ws.apache.org/muse/addressing"
            xmlns:NS1="http://www.w3.org/2005/08/addressing"
            NS1:IsReferenceParameter="true" xmlns:wsa="http://www.w3.org/2005/08/addressing">MuseResource-1</muse-wsa:ResourceId>
    </soap:Header>
    <soap:Body>
        <first:FirstOperation xmlns:first="http://ws.apache.org/muse/test/simple/first">Hello, World!</first:FirstOperation>
    </soap:Body>
</soap:Envelope>

|#]



[#|2007-10-18T13:11:55.971-0400|SEVERE|sun-appserver9.1|org.apache.axis2.transport.http.AxisServlet|_ThreadID=30;_ThreadName=httpSSLWorkerThread-8080-0;_RequestID=e4b286ed-0978-4119-82e1-731619257190;|java.lang.NoSuchMethodError: javax.xml.stream.XMLOutputFactory.newInstance(Ljava/lang/String;Ljava/lang/ClassLoader;)Ljavax/xml/stream/XMLOutputFactory;|#]



[#|2007-10-18T13:11:56.001-0400|SEVERE|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=30;_ThreadName=httpSSLWorkerThread-8080-0;_RequestID=e4b286ed-0978-4119-82e1-731619257190;|StandardWrapperValve[AxisServlet]: PWC1406: Servlet.service() for servlet AxisServlet threw exception

java.lang.NoSuchMethodError: javax.xml.stream.XMLOutputFactory.newInstance(Ljava/lang/String;Ljava/lang/ClassLoader;)Ljavax/xml/stream/XMLOutputFactory;

        at org.apache.axiom.om.util.StAXUtils.getXMLOutputFactory(StAXUtils.java:97)

        at org.apache.axiom.om.util.StAXUtils.createXMLStreamWriter(StAXUtils.java:123)

        at org.apache.axiom.om.impl.MTOMXMLStreamWriter.<init>(MTOMXMLStreamWriter.java:74)

        at org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:410)

        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.sendUsingOutputStream(CommonsHTTPTransportSender.java:275)

        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:209)

        at org.apache.axis2.engine.AxisEngine.sendFault(AxisEngine.java:710)

        at org.apache.axis2.transport.http.AxisServlet.handleFault(AxisServlet.java:305)

        at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:287)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)

        at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)

        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290)

        at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)

        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)

        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)

        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)

        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)

        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)

        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)

        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)

        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)

        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)

        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)

        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)

        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)

        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)

        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)

        at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:270)

        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)

        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)

        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)

        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339)

        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:261)

        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:212)

        at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:361)

        at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)

        at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)

|#]



[#|2007-10-18T13:12:03.412-0400|SEVERE|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=30;_ThreadName=httpSSLWorkerThread-8080-0;_RequestID=e4b286ed-0978-4119-82e1-731619257190;|ApplicationDispatcher[/server-build] PWC1231: Servlet.service() for servlet jsp threw exception

java.lang.IllegalStateException: PWC3991: getOutputStream() has already been called for this response

        at org.apache.coyote.tomcat5.CoyoteResponse.getWriter(CoyoteResponse.java:700)

        at org.apache.coyote.tomcat5.CoyoteResponseFacade.getWriter(CoyoteResponseFacade.java:210)

        at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:171)

        at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:164)

        at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:221)

        at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:157)

        at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:108)

        at org.apache.jsp.axis2_002dweb.Error.error500_jsp._jspService(error500_jsp.java:101)

        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)

        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)

        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470)

        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)

        at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)

        at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:855)

        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)

        at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:544)

        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:474)

        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:366)

        at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:531)

        at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:420)

        at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:351)

        at org.apache.catalina.core.StandardHostValve.postInvoke(StandardHostValve.java:230)

        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:633)

        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)

        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)

        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)

        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)

        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)

        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)

        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)

        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)

        at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:270)

        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)

        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)

        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)

        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339)

        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:261)

        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:212)

        at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:361)

        at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)

        at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)

|#]



[#|2007-10-18T13:12:03.412-0400|SEVERE|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=30;_ThreadName=httpSSLWorkerThread-8080-0;_RequestID=e4b286ed-0978-4119-82e1-731619257190;|org.apache.catalina.core.StandardHostValve_at_4055ba: Exception Processing ErrorPage[errorCode=500, location=/axis2-web/Error/error500.jsp]

java.lang.IllegalStateException: PWC3991: getOutputStream() has already been called for this response

        at org.apache.coyote.tomcat5.CoyoteResponse.getWriter(CoyoteResponse.java:700)

        at org.apache.coyote.tomcat5.CoyoteResponseFacade.getWriter(CoyoteResponseFacade.java:210)

        at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:171)

        at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:164)

        at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:221)

        at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:157)

        at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:108)

        at org.apache.jsp.axis2_002dweb.Error.error500_jsp._jspService(error500_jsp.java:101)

        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)

        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)

        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470)

        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)

        at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)

        at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:855)

        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)

        at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:544)

        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:474)

        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:366)

        at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:531)

        at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:420)

        at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:351)

        at org.apache.catalina.core.StandardHostValve.postInvoke(StandardHostValve.java:230)

        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:633)

        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)

        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)

        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)

        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)

        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)

        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)

        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)

        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)

        at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:270)

        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)

        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)

        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)

        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339)

        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:261)

        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:212)

        at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:361)

        at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)

        at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)

|#]

Thanks,
Allen
[Message sent by forum member 'allen_a_george' (allen_a_george)]

http://forums.java.net/jive/thread.jspa?messageID=242325