使用Webservice的MalformedObjectNameException

时间:2014-03-03 17:28:09

标签: java jaxb websphere

我正在为我的webservice框架使用jaxws-rt 2.2.8,jaxb-api 2.2.7和jaxws-api 2.2.9。它将部署在Websphere 8.5.1 JDK 7上。这个带有旧版本依赖项的项目适用于Websphere 6 JDK 5.

该项目包含Web服务提供者和客户端。客户端工作,但提供商没有。当我启动我的服务器时,我看到以下堆栈跟踪:

[2/7/14 17:07:51:349 CST] 00000046 http          E   WSSERVLET11: failed to parse runtime descriptor: java.lang.ExceptionInInitializerError
                                 java.lang.ExceptionInInitializerError
    at java.lang.J9VMInternals.initialize(J9VMInternals.java:258)
    at com.sun.xml.ws.server.MonitorBase.createMOMLoop(MonitorBase.java:209)
    at com.sun.xml.ws.server.MonitorBase.createManagedObjectManager(MonitorBase.java:133)
    at com.sun.xml.ws.server.WSEndpointImpl.obtainManagedObjectManager(WSEndpointImpl.java:641)
    at com.sun.xml.ws.server.WSEndpointImpl.initManagedObjectManager(WSEndpointImpl.java:622)
    at com.sun.xml.ws.server.WSEndpointImpl.<init>(WSEndpointImpl.java:152)
    at com.sun.xml.ws.server.EndpointFactory.create(EndpointFactory.java:320)
    at com.sun.xml.ws.server.EndpointFactory.create(EndpointFactory.java:315)
    at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:158)
    at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:577)
    at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:560)
    at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:303)
    at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:179)
    at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.parseAdaptersAndCreateDelegate(WSServletContextListener.java:131)
    at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:152)
    at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1682)
    at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:414)
    at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
    at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:169)
    at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:749)
    at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:634)
    at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:426)
    at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:718)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1175)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1370)
    at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:968)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:774)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2182)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:445)
    at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:388)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:116)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:994)
    at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:502)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1862)
Caused by: java.lang.RuntimeException: bad ObjectName
    at org.glassfish.external.amx.AMXUtil.newObjectName(AMXUtil.java:60)
    at org.glassfish.external.amx.AMXGlassfish.newObjectName(AMXGlassfish.java:154)
    at org.glassfish.external.amx.AMXGlassfish.newObjectName(AMXGlassfish.java:143)
    at org.glassfish.external.amx.AMXGlassfish.<init>(AMXGlassfish.java:62)
    at org.glassfish.external.amx.AMXGlassfish.<clinit>(AMXGlassfish.java:53)
    at java.lang.J9VMInternals.initializeImpl(Native Method)
    at java.lang.J9VMInternals.initialize(J9VMInternals.java:236)
    ... 35 more
Caused by: javax.management.MalformedObjectNameException: amx:pp=,type=domain-root is not a valid ObjectName. Invalid key/value data pp
    at javax.management.ObjectName.initProperties(ObjectName.java:696)
    at javax.management.ObjectName.init(ObjectName.java:564)
    at javax.management.ObjectName.<init>(ObjectName.java:326)
    at org.glassfish.external.amx.AMXUtil.newObjectName(AMXUtil.java:56)
    ... 41 more

1 个答案:

答案 0 :(得分:0)

您应该为您的应用程序将classloader策略设置为PARENT_LAST。 因为WebSphere Application Server具有自己的库版本。