Cannot Deploy JAX-WS webservice on Glassfish

早过忘川 提交于 2019-12-08 00:10:43

问题


I have a problem running JAX_WS Webservices with Glassfish application server. Previously, i used to use Apache tomcat which works fine with it. But now, having Glassfish, this problem is preventing the application from being deployed... please check it below:

2013-04-04T13:09:23.028+0300 com.sun.xml.ws.wspolicy.com.sun.xml.ws.api.policy.ModelTranslator
SEVERE: [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)
2013-04-04T13:09:23.028+0300 com.sun.xml.ws.wspolicy.jaxws.PolicyWSDLParserExtension
SEVERE: [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)
2013-04-04T13:09:23.028+0300 com.sun.xml.ws.wspolicy.jaxws.PolicyWSDLParserExtension
SEVERE: WSP1007: Policy exception occurred 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)
    at com.sun.xml.ws.policy.sourcemodel.PolicyModelTranslator.<init>(PolicyModelTranslator.java:188)
    at com.sun.xml.ws.api.policy.ModelTranslator.<init>(ModelTranslator.java:85)
    at com.sun.xml.ws.api.policy.ModelTranslator.<clinit>(ModelTranslator.java:74)
    at com.sun.xml.ws.policy.jaxws.BuilderHandler.getPolicies(BuilderHandler.java:102)
    at com.sun.xml.ws.policy.jaxws.BuilderHandler.getPolicySubjects(BuilderHandler.java:110)
    at com.sun.xml.ws.policy.jaxws.BuilderHandlerEndpointScope.doPopulate(BuilderHandlerEndpointScope.java:72)
    at com.sun.xml.ws.policy.jaxws.BuilderHandler.populate(BuilderHandler.java:82)
    at com.sun.xml.ws.policy.jaxws.PolicyMapBuilder.getNewPolicyMap(PolicyMapBuilder.java:109)
    at com.sun.xml.ws.policy.jaxws.PolicyMapBuilder.getPolicyMap(PolicyMapBuilder.java:91)
    at com.sun.xml.ws.policy.jaxws.PolicyWSDLParserExtension.postFinished(PolicyWSDLParserExtension.java:960)
    at com.sun.xml.ws.wsdl.parser.DelegatingParserExtension.postFinished(DelegatingParserExtension.java:191)
    at com.sun.xml.ws.wsdl.parser.WSDLParserExtensionFacade.postFinished(WSDLParserExtensionFacade.java:338)
    at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:234)
    at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:191)
    at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:160)
    at com.sun.xml.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:307)
    at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:269)
    at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:205)
    at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:195)
    at com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:112)
    at javax.xml.ws.Service.<init>(Service.java:92)
    at com.sun.xml.ws.tx.webservice.member.at.WSATCoordinator.<init>(WSATCoordinator.java:73)
    at com.sun.xml.ws.tx.at.ATCoordinator.<clinit>(ATCoordinator.java:1063)
    at sun.misc.Unsafe.ensureClassInitialized(Native Method)
    at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:25)
    at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:122)
    at java.lang.reflect.Field.acquireFieldAccessor(Field.java:918)
    at java.lang.reflect.Field.getFieldAccessor(Field.java:899)
    at java.lang.reflect.Field.get(Field.java:358)
    at org.glassfish.web.loader.WebappClassLoader.clearReferences(WebappClassLoader.java:1798)
    at org.glassfish.web.loader.WebappClassLoader.stop(WebappClassLoader.java:1662)
    at org.glassfish.web.loader.WebappClassLoader.preDestroy(WebappClassLoader.java:1631)
    at org.glassfish.deployment.common.DeploymentContextImpl.getClassLoader(DeploymentContextImpl.java:236)
    at org.glassfish.deployment.common.DeploymentContextImpl.getClassLoader(DeploymentContextImpl.java:186)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:450)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
    at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:353)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
    at org.glassfish.deployment.autodeploy.AutoOperation.run(AutoOperation.java:145)
    at org.glassfish.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:575)
    at org.glassfish.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:461)
    at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:389)
    at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:380)
    at org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeployService.java:220)
    at java.util.TimerThread.mainLoop(Timer.java:512)
    at java.util.TimerThread.run(Timer.java:462)

Anybody have a idea on how to solve this error? Please note that am using MyEclipse as my IDE with Glassfish version 3.1.2


回答1:


I've seen reference to a similar problem where installing the Glassfish Web profile, instead of the full install, solves the problem. If you need the full install, this, obviously, wouldn't help.

Try exporting a war file and deploying it manually, in case there is some problem with the way MyEclipse is deploying the application.

Some servers will include some common jar files whilst others don't. So you could try adjusting what referenced jars get deployed, via the Deployment tag in the project properties under MyEclipse->Web.

I've also seen reference to the problem that is partially solved by removing a dependency on webservice-rt. I don't know if this applies to your project, but, if so, you could see if you could remove that dependency.



来源:https://stackoverflow.com/questions/15809003/cannot-deploy-jax-ws-webservice-on-glassfish

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!