Hi,

We are trying to deploy a webservice to tomcat 8.0.5 using Jersey WS 2.8.  In 
the Jersey documentation it mentions deploying without the need for a web.xml 
in your war file using annotations, so I thought I'd give that a  try.
However, when I go to deploy my webservice Tomcat is throwing the exception 
below, I can't figure out what might be the issue.

Some notes about our environment in case  they come into play:
The webservice  is compiled with java 8.
Tomcat is running on a linux server.
As per the Jersey documentation, I have a class annotated with @ApplicationPath 
which extends ResourceConfig.  Our webservices exist in a separate package 
which is being loaded using the packages() function.

30-May-2014 20:57:22.592 SEVERE [localhost-startStop-4] 
org.apache.catalina.startup.ContextConfig.processServletContainerInitializers 
Failed to process JAR found at URL [/api] for ServletContainerInitializers for 
context with name [{1}]
java.io.IOException: java.lang.ClassCastException: Cannot cast 
org.glassfish.jersey.servlet.init.JerseyServletContainerInitializer to 
javax.servlet.ServletContainerInitializer
        at 
org.apache.catalina.startup.WebappServiceLoader.loadServices(WebappServiceLoader.java:185)
        at 
org.apache.catalina.startup.WebappServiceLoader.load(WebappServiceLoader.java:151)
        at 
org.apache.catalina.startup.ContextConfig.processServletContainerInitializers(ContextConfig.java:1597)
        at 
org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1125)
        at 
org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:768)
        at 
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:303)
        at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
        at 
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
        at 
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5058)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726)
        at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:702)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:697)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:976)
        at 
org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1762)
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassCastException: Cannot cast 
org.glassfish.jersey.servlet.init.JerseyServletContainerInitializer to 
javax.servlet.ServletContainerInitializer
        at java.lang.Class.cast(Class.java:3258)
        at 
org.apache.catalina.startup.WebappServiceLoader.loadServices(WebappServiceLoader.java:182)
        ... 19 more


Thanks,

Nick Cuneo  /  Software Engineer, Cloud  /  Tyco Retail Solutions
Tel: +1 949 517 4802  /  Mobile: +1 949 243 4952
3 Ada  /  Irvine, CA 92618  /  USA
ncu...@tycoint.com  /  www.tyco.com
[cid:image001.png@01CF7C0F.E25B4660]


This email (including any attachments) may contain information that is private 
or business confidential. If you received this email in error, please delete it 
from your system without copying it and notify sender by reply email so that 
our records can be corrected


________________________________

This e-mail contains privileged and confidential information intended for the 
use of the addressees named above. If you are not the intended recipient of 
this e-mail, you are hereby notified that you must not disseminate, copy or 
take any action in respect of any information contained in it. If you have 
received this e-mail in error, please notify the sender immediately by e-mail 
and immediately destroy this e-mail and its attachments.

Reply via email to