http://www.mkyong.com/webservices/jax-ws/jax-ws-hello-world-example-document-style/comment-page-1/#comment-133527でチュートリアルを試しました。このチュートリアルでは、helloworld Web サービスを作成して公開し、クライアント コードで試す方法について説明します。チュートリアルはうまく機能します。パブリッシャーを使用して Web サービスを公開し (??? をデプロイせずに)、クライアントを実行して Web サービス メソッドを呼び出し、応答を得ることができます。
私の Web サービス コードは、別の Web プロジェクトの一部です。プロジェクトの war ファイルを tomcat にデプロイすると、エラーが発生します。プロジェクトから Web サービス コード (サービス、クライアント、パブリッシャー) を削除すると、Web プロジェクトをデプロイできます。web.xml ファイル、sun-jaxws.xml ファイル、およびすべてを 100 万回チェックしましたが、何も見つかりません。助けてください..
May 29, 2013 10:33:53 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error during ServletContainerInitializer processing
javax.servlet.ServletException: com.sun.xml.ws.transport.http.servlet.WSServletE
xception: WSSERVLET11: failed to parse runtime descriptor: com.sun.xml.ws.util.S
erviceConfigurationError: com.sun.xml.ws.policy.jaxws.spi.PolicyFeatureConfigura
tor: Provider com.sun.xml.ws.addressing.policy.AddressingFeatureConfigurator is
specified in jar:file:/C:/Program%20Files/Apache/apache-tomcat-7.0.40/webapps/RO
OT/WEB-INF/lib/webservices-rt.jar!/META-INF/services/com.sun.xml.ws.policy.jaxws
.spi.PolicyFeatureConfiguratorbut could not be instantiated: java.lang.ClassCast
Exception: Cannot cast com.sun.xml.ws.addressing.policy.AddressingFeatureConfigu
rator to com.sun.xml.ws.policy.jaxws.spi.PolicyFeatureConfigurator
at com.sun.xml.ws.transport.http.servlet.WSServletContainerInitializer.o
nStartup(WSServletContainerInitializer.java:70)
at org.apache.catalina.core.StandardContext.startInternal(StandardContex
t.java:5370)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:87
7)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:
1654)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:47
1)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:615)
at java.lang.Thread.run(Thread.java:722)
Caused by: com.sun.xml.ws.transport.http.servlet.WSServletException: WSSERVLET11
: failed to parse runtime descriptor: com.sun.xml.ws.util.ServiceConfigurationEr
ror: com.sun.xml.ws.policy.jaxws.spi.PolicyFeatureConfigurator: Provider com.sun
.xml.ws.addressing.policy.AddressingFeatureConfigurator is specified in jar:file
:/C:/Program%20Files/Apache/apache-tomcat-7.0.40/webapps/ROOT/WEB-INF/lib/webser
vices-rt.jar!/META-INF/services/com.sun.xml.ws.policy.jaxws.spi.PolicyFeatureCon
figuratorbut could not be instantiated: java.lang.ClassCastException: Cannot cas
t com.sun.xml.ws.addressing.policy.AddressingFeatureConfigurator to com.sun.xml.
ws.policy.jaxws.spi.PolicyFeatureConfigurator
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.parseA
daptersAndCreateDelegate(WSServletContextListener.java:141)
at com.sun.xml.ws.transport.http.servlet.WSServletContainerInitializer.o
nStartup(WSServletContainerInitializer.java:65)
... 13 more
Caused by: com.sun.xml.ws.util.ServiceConfigurationError: com.sun.xml.ws.policy.
jaxws.spi.PolicyFeatureConfigurator: Provider com.sun.xml.ws.addressing.policy.A
ddressingFeatureConfigurator is specified in jar:file:/C:/Program%20Files/Apache
/apache-tomcat-7.0.40/webapps/ROOT/WEB-INF/lib/webservices-rt.jar!/META-INF/serv
ices/com.sun.xml.ws.policy.jaxws.spi.PolicyFeatureConfiguratorbut could not be i
nstantiated: java.lang.ClassCastException: Cannot cast com.sun.xml.ws.addressing
.policy.AddressingFeatureConfigurator to com.sun.xml.ws.policy.jaxws.spi.PolicyF
eatureConfigurator
at com.sun.xml.ws.util.ServiceFinder.fail(ServiceFinder.java:258)
at com.sun.xml.ws.util.ServiceFinder.access$300(ServiceFinder.java:151)
at com.sun.xml.ws.util.ServiceFinder$LazyIterator.next(ServiceFinder.jav
a:465)
at com.sun.xml.ws.util.ServiceFinder$CompositeIterator.next(ServiceFinde
r.java:402)
at com.sun.xml.ws.policy.jaxws.PolicyUtil.addServiceProviders(PolicyUtil
.java:97)
at com.sun.xml.ws.policy.jaxws.PolicyUtil.<clinit>(PolicyUtil.java:83)
at com.sun.xml.ws.policy.jaxws.PolicyWSDLGeneratorExtension.loadConfigur
ators(PolicyWSDLGeneratorExtension.java:476)
at com.sun.xml.ws.policy.jaxws.PolicyWSDLGeneratorExtension.start(Policy
WSDLGeneratorExtension.java:124)
at com.sun.xml.ws.wsdl.writer.WSDLGeneratorExtensionFacade.start(WSDLGen
eratorExtensionFacade.java:71)
at com.sun.xml.ws.wsdl.writer.WSDLGenerator.generateDocument(WSDLGenerat
or.java:407)
at com.sun.xml.ws.wsdl.writer.WSDLGenerator.doGeneration(WSDLGenerator.j
ava:330)
at com.sun.xml.ws.db.DatabindingImpl.generateWSDL(DatabindingImpl.java:2
30)
at com.sun.xml.ws.server.EndpointFactory.generateWSDL(EndpointFactory.ja
va:553)
at com.sun.xml.ws.server.EndpointFactory.create(EndpointFactory.java:278
)
at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.
java:147)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:574)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:557)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapter
s(DeploymentDescriptorParser.java:260)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(Deploy
mentDescriptorParser.java:152)
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.parseA
daptersAndCreateDelegate(WSServletContextListener.java:131)
... 14 more
Caused by: java.lang.ClassCastException: Cannot cast com.sun.xml.ws.addressing.p
olicy.AddressingFeatureConfigurator to com.sun.xml.ws.policy.jaxws.spi.PolicyFea
tureConfigurator
at java.lang.Class.cast(Class.java:3014)
at com.sun.xml.ws.util.ServiceFinder$LazyIterator.next(ServiceFinder.jav
a:460)
... 31 more
May 29, 2013 10:33:53 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [] startup failed due to previous errors
May 29, 2013 10:33:55 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Program Files\Apache\apache-tomcat-
7.0.40\webapps\docs
May 29, 2013 10:33:56 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jcaptcha.sourceforge.net is already defined
May 29, 2013 10:33:59 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Program Files\Apache\apache-tomcat-
7.0.40\webapps\examples
May 29, 2013 10:34:00 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jcaptcha.sourceforge.net is already defined
May 29, 2013 10:34:00 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Program Files\Apache\apache-tomcat-
7.0.40\webapps\host-manager
May 29, 2013 10:34:01 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jcaptcha.sourceforge.net is already defined
May 29, 2013 10:34:01 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Program Files\Apache\apache-tomcat-
7.0.40\webapps\manager
May 29, 2013 10:34:03 AM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jcaptcha.sourceforge.net is already defined
May 29, 2013 10:34:03 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
May 29, 2013 10:34:03 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
May 29, 2013 10:34:03 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 17869 ms