0

我曾多次尝试将 Netbeans WAR 网络服务部署到 Glassfish 中,但它返回此错误:

 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.

无论我在 Eclipse 中生成什么 WAR,都可以在 Glassfish 中使用,但我尝试从 Netbeans 导入这个项目,但没有成功。Glassfish 也返回同样的错误。日志不会扩展可能问题的信息。

顺便说一句,在用于 Netbeans 的嵌入式 Glassfish 中,Web 服务的工作方式非常棒,但是导入它会导致 Glassfish 服务器(另一台计算机)出错

有什么建议么?我需要在 Glassfish 服务器中更改任何配置吗?

谢谢大家的想法和解决方案。

克里斯蒂娜

从服务器 .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|_Thread ID=143;_ThreadName=Thread-1; ClassName=org.glassfish.web.loader.WebappClassLoader;MethodName=clearReferences;|无法在 com.sun.xml.ws.tx.at.ATCoordinator java.lang.NoClassDefFoundError 类中将字段 wsatCoordinatorService 设置为 null:无法初始化类 com .sun.xml.ws.tx.at.ATCoordinator

4

1 回答 1

2

类似的事情最近发生在我身上。发生的事情是,最初我打算将应用程序部署到 Tomcat7,因此 Netbeans 在我的库部分中包含了一些 Metro jar。然后我决定改为部署到 Glassfish,但是这些 Metro jar 显然是导致您看到的问题的原因。我刚刚从 Netbeans 的库部分中删除了 Metro jar,重新部署,一切正常。

这是一个关于正在发生的事情的更多讨论的链接:https ://java.net/jira/browse/WSIT-1636 。

于 2013-09-25T17:25:33.747 回答