user3442562
user3442562

Reputation: 331

Tomcat unable to start application

I have installed petclinic application in tomcat server. During tomcat start up and loading of petclinic application I am having the error with the followed stack trace. How to resolve this issue ?

apache-tomcat-7.0.47/webapps/petclinic Oct 27, 2016 12:14:36 PM org.apache.catalina.core.StandardContext startInternal

SEVERE: Error during ServletContainerInitializer processing javax.servlet.ServletException: Failed to instantiate WebApplicationInitializer class at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:160) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5423) 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:877) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1120) at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1678) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:483) at java.util.concurrent.FutureTask.run(FutureTask.java:274) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1157) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:627) at java.lang.Thread.run(Thread.java:798) Caused by: java.lang.NoClassDefFoundError: org.glassfish.jersey.server.ResourceConfig at java.lang.J9VMInternals.verifyImpl(Native Method) at java.lang.J9VMInternals.verify(J9VMInternals.java:94) at java.lang.J9VMInternals.initialize(J9VMInternals.java:169) at java.lang.J9VMInternals.newInstanceImpl(Native Method) at java.lang.Class.newInstance(Class.java:1781) at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:157) ... 12 more Caused by: java.lang.ClassNotFoundException: org.glassfish.jersey.server.ResourceConfig at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547) ... 18 more

Upvotes: 1

Views: 2447

Answers (1)

Al.T.Os
Al.T.Os

Reputation: 72

I think you didn't let spring know about some bean class.

Look at your context.xml or dispatcher-context.xml.

In the exception stack above, it says java.lang.ClassNotFoundException occured.

Spring can't find class files even if you have them in your java src package.

If my answer doesn't solve your problem, you need to show your xml or source code to make sure what the problem is.

Upvotes: 0

Related Questions