Skip to main content

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

3 replies [Last post]
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<br />
	at org.apache.catalina.core.StandardContext.listenerStart(<br />
	at org.apache.catalina.core.StandardContext.start(<br />
	at org.apache.catalina.core.ContainerBase.addChildInternal(<br />
	at org.apache.catalina.core.ContainerBase.addChild(<br />
	at org.apache.catalina.core.StandardHost.addChild(<br />
	at org.apache.catalina.startup.HostConfig.deployDescriptor(<br />
	at org.apache.catalina.startup.HostConfig.deployDescriptors(<br />
	at org.apache.catalina.startup.HostConfig.deployApps(<br />
	at org.apache.catalina.startup.HostConfig.start(<br />
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(<br />
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(<br />
	at org.apache.catalina.core.ContainerBase.start(<br />
	at org.apache.catalina.core.StandardHost.start(<br />
	at org.apache.catalina.core.ContainerBase.start(<br />
	at org.apache.catalina.core.StandardEngine.start(<br />
	at org.apache.catalina.core.StandardService.start(<br />
	at org.apache.catalina.core.StandardServer.start(<br />
	at org.apache.catalina.startup.Catalina.start(<br />
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br />
	at sun.reflect.NativeMethodAccessorImpl.invoke(<br />
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(<br />
	at java.lang.reflect.Method.invoke(<br />
	at org.apache.catalina.startup.Bootstrap.start(<br />
	at org.apache.catalina.startup.Bootstrap.main(<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.
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.

Joined: 2005-01-24

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

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