简体   繁体   中英

Netbeans generated WAR doesn't work in Glassfish Server 3.1

I've tried to deploy a Netbeans WAR webservice into Glassfish several times, but it returns this error:

 Error occurred during deployment: Exception while loading the app : 
java.lang.IllegalStateException: ContainerBase.addChild: start:     
org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException: 
javax.servlet.ServletException: 
com.sun.xml.ws.transport.http.servlet.WSServletException:
 WSSERVLET11: failed to parse  
runtime descriptor: java.lang.RuntimeException: MASM0015: Class [  
com.sun.xml.ws.tx.runtime.TxTubeFactory ] does not implement [ 
com.sun.xml.ws.assembler.dev.TubeFactory ] interface. 

Please see server.log for more details.

Whatever WAR I generate in Eclipse works in Glassfish, but I tried importing from Netbeans this project, and it didn't work. Glassfish also returns this same error. The log doesn't extend the information of the possible problem.

By the way, in the embedded Glassfish for Netbeans, the webservice works like a charm, but importing this, results in an error in the Glassfish server (which is another computer)

Any suggestions? Is there any configuration I need to change in the Glassfish server?

Thank you all for your ideas and solutions.

Cristina

Extract from Server .LOG

[#|2012-05-31T10:16:59.951-    
0430|INFO|glassfish3.1|com.sun.xml.ws.wstx|_ThreadID=40;_ThreadName=Thread-1;|[failed 
to localize] HOST_AND_PORT_LOOKUP_FAILURE_2015(https://192.168.2.43:8080)

java.lang.ClassNotFoundException: com.sun.enterprise.webservice.WsTxUtils


[#|2012-05-31T10:16:59.990- 
0430|SEVERE|glassfish3.1|com.sun.xml.ws.wspolicy.jaxws.PolicyWSDLParserExtension|_ThreadID=    40;_ThreadName=Thread-1;|WSP1007: Policy exception occured when finishing WSDL parsing.
com.sun.xml.ws.policy.PolicyException: [failed to localize]  
WSP_0071_ERROR_MULTIPLE_ASSERTION_CREATORS_FOR_NAMESPACE(http://schemas.xmlsoap.org/ws/2004/08/addressing,     com.sun.xml.ws.security.addressing.impl.policy.AddressingPolicyAssertionCreator,     com.sun.xml.ws.addressing.impl.policy.AddressingPolicyAssertionCreator)

Caused by: com.sun.xml.ws.policy.PolicyException: [failed to localize]     WSP_0071_ERROR_MULTIPLE_ASSERTION_CREATORS_FOR_NAMESPACE(http://schemas.xmlsoap.org/ws/2004    /08/addressing,     com.sun.xml.ws.security.addressing.impl.policy.AddressingPolicyAssertionCreator,     com.sun.xml.ws.addressing.impl.policy.AddressingPolicyAssertionCreator)

[#|2012-05-31T10:16:59.990-    0430|FINE|glassfish3.1|javax.enterprise.system.container.web.org.glassfish.web.loader|_Thre    adID=143;_ThreadName=Thread-    1;ClassName=org.glassfish.web.loader.WebappClassLoader;MethodName=clearReferences;|Could     not set field tm to null in class com.sun.xml.ws.tx.at.ATCoordinator
java.lang.NoClassDefFoundError: Could not initialize class     com.sun.xml.ws.tx.at.ATCoordinator

[#|2012-05-31T10:16:59.990-    0430|FINE|glassfish3.1|javax.enterprise.system.container.web.org.glassfish.web.loader|_Thre     adID=143;_ThreadName=Thread-    1;ClassName=org.glassfish.web.loader.WebappClassLoader;MethodName=clearReferences;|Could     not set field wsatCoordinatorService to null in class com.sun.xml.ws.tx.at.ATCoordinator
java.lang.NoClassDefFoundError: Could not initialize class     com.sun.xml.ws.tx.at.ATCoordinator

[#|2012-05-31T10:16:59.990- 0430|FINE|glassfish3.1|javax.enterprise.system.container.web.org.glassfish.web.loader|_Thre adID=143;_ThreadName=Thread- 1;ClassName=org.glassfish.web.loader.WebappClassLoader;MethodName=clearReferences;|Could not set field wsatCoordinatorService to null in class com.sun.xml.ws.tx.at.ATCoordinator java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.ws.tx.at.ATCoordinator

Something similar happened to me recently. What happened was that initially I was going to deploy the application to Tomcat7, so Netbeans included some Metro jars in my library section. I then decided to deploy to Glassfish instead, however those Metro jars are what are apparently causing the problem you are seeing. I just deleted the Metro jars from my libraries section in Netbeans, redeployed, and everything was ok.

Here is a link that talks a little bit more about what is happening: https://java.net/jira/browse/WSIT-1636 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM