Skip to main content

....Service has neither @WebSerivce nor @WebServiceProvider annotation

3 replies [Last post]
tinashechipomho
Offline
Joined: 2005-01-24

Hi guys,
I created my service from a WSDL, and i get the following error:

<br />
WSSERVLET11: failed to parse runtime descriptor: java.lang.IllegalArgumentException: class mypackage.MyService has neither @WebSerivce nor @WebServiceProvider annotation<br />
	at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:100)<br />
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3763)<br />
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)<br />
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)<br />
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)<br />
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)<br />
	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:608)<br />
	at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:535)<br />
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470)<br />
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)<br />
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)<br />
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)<br />
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)<br />
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)<br />
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)<br />
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)<br />
	at org.apache.catalina.core.StandardService.start(StandardService.java:450)<br />
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)<br />
	at org.apache.catalina.startup.Catalina.start(Catalina.java:551)<br />
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br />
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br />
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br />
	at java.lang.reflect.Method.invoke(Method.java:585)<br />
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)<br />
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)<br />

and I must admit this exception is annoying because the annotation is there.
I have tried JAXWS2.0 and JAX2.0.1 all not working, I also tried to put the jar files in WEB-INF/lib and its not working as well.
anybody please?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jitu
Offline
Joined: 2003-06-14

Can you paste the relevant portions of mypackage.MyService class. Runtime looks for the annotation using reflection API. So I am guessing there is something else is going on.

tinashechipomho
Offline
Joined: 2005-01-24

yeah indeed something was going on and i managed to fix it, It was all my problem.

henri_gomez
Offline
Joined: 2005-12-09

I got the same problem înside eclispe 3.2.

When I compile the source code via ant (apt/javac), the application works.

If my web service look classes in eclipse, it didn't works with this error. Annotation processing are enabled in project and taking a look in the generated byte code it seems also present (@WebService)

How did you fix your problem ?

Thanks for your help