0
votes

I'm running a relatively simple annotation driven Spring configured web app. I'm using Java 1.6, Tomcat 7 and have I believe the appropriate dependencies in my pom.xml, i.e. jsp-api:2.2, javax.servlet-api:3.0.1. I continually get the error below although my webapp doesn't appear to have any problem while running. I did find one reference to this error online and it suggested adding 'metadata-complete="true"' to my web.xml file which made the @HandleTypes error go away but prevented my app from constructing itself properly.

Any suggestions/help would be greatly appreciated. Thanks!

Sep 5, 2012 1:29:52 PM org.apache.catalina.startup.ContextConfig checkHandlesTypes
WARNING: Unable to load class [javax.servlet.jsp.el.ImplicitObjectELResolver$ImplicitObjects] to check against the @HandlesTypes annotation of one or more ServletContentInitializers.

java.lang.ClassNotFoundException: javax.servlet.jsp.el.ImplicitObjectELResolver$ImplicitObjects at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1688) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1533) at org.apache.catalina.startup.ContextConfig.checkHandlesTypes(ContextConfig.java:1988) at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:1951) at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1840) at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1808) at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1794) at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1214) at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:828) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:302) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5148) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:842) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:958) at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1599) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662)

1
Make sure that jsp-api:2.2 and javax.servlet-api:3.0.1 have <scope>provided</scope>.axtavt
That's exactly what was needed. Do you want to answer it officially and I'll mark it correct?Queso

1 Answers

2
votes

You should make sure that your war file doesn't contain Servlet API and JSP API jars, otherwise you'll get tricky classloading problems.

However, you still need them as compile-time dependencies. For this case Maven allows you to declare these dependencies with scope provided.

So, make sure that jsp-api:2.2 and javax.servlet-api:3.0.1 have <scope>provided</scope>.