0

I'm getting this error when I'm trying to consume one Web Service:

java.lang.NoSuchMethodError: javax.jws.WebMethod.exclude()Z
at org.apache.cxf.jaxws.support.JaxWsServiceConfiguration.isOperation(JaxWsServiceConfiguration.java:155)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.isValidMethod(ReflectionServiceFactoryBean.java:1853)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeWSDLOperations(ReflectionServiceFactoryBean.java:623)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOperations(JaxWsServiceFactoryBean.java:289)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:392)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:499)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:241)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:202)
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)
at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:90)
at org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:152)
at org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:142)
at org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:464)
at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:331)
at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:318)
at javax.xml.ws.Service.getPort(Service.java:40)
at prova.wsclient.hello.HelloWorldImplService.getHelloWorldImplPort(HelloWorldImplService.java:78)
at prova.helloWorldProxy(Tasca.java:1380)
at prova.run(Tasca.java:126)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)

In my project I've got CXF and JSR181 jars and seems to appear this method.

At the weblogic.xml appears:

<wls:prefer-web-inf-classes>true</wls:prefer-web-inf-classes>

Also, at the weblogic-application.xml:

<prefer-application-packages>
    <package-name>javax.jws.*</package-name>
</prefer-application-packages>

My version of Weblogic Server is 9.2. What I'm doing wrong? I would appreciate any help.

Thanks!

Tete
  • 1

1 Answers1

0

I have faced this kind of issues with Weblogic 9.2 and resolved by prepending the jars to the server jvm classpath (you can do it through the weblogic console). It is not the right solution, but it has worked at times.

Jiji
  • 353
  • 1
  • 7
  • I can't do this because the Weblogic Server is a common platform with other third-party applications. Thanks for your suggestion – Tete Sep 19 '13 at 09:29