无法在Glassfish上部署JAX-WS Web服务 [英] Cannot Deploy JAX-WS webservice on Glassfish

查看:106
本文介绍了无法在Glassfish上部署JAX-WS Web服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Glassfish应用程序服务器上运行JAX_WS Web服务时遇到问题.以前,我曾经使用过与Apache Tomcat兼容的Apache Tomcat.但是现在有了Glassfish,此问题阻止了应用程序的部署...请在下面进行检查:

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)

有人对如何解决此错误有想法吗? 请注意,正在将MyEclipse用作我的Glassfish版本3.1.2的IDE

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

推荐答案

我看到了对类似问题的参考,其中安装Glassfish Web配置文件而不是完全安装可以解决该问题.如果您需要完整安装,显然这将无济于事.

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.

如果MyEclipse部署应用程序的方式出现问题,请尝试导出war文件并手动部署它.

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

某些服务器将包含一些常见的jar文件,而其他服务器则不包含.因此,您可以尝试通过MyEclipse-> Web下项目属性中的Deployment标签来调整要部署的引用jar.

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.

我还看到了通过除去对webservice-rt的依赖关系部分解决的问题的参考.我不知道这是否适用于您的项目,但如果是这样,您可以查看是否可以删除该依赖项.

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.

这篇关于无法在Glassfish上部署JAX-WS Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆