0
votes

After some issues I completely reinstalled tomcat7 with apt-get and I'm now with v7.0.52. When I try to start the server though I get the following exception:

Feb 27, 2014 11:09:06 AM org.apache.catalina.core.StandardContext filterStart SEVERE: Exception starting filter CORS java.lang.ClassNotFoundException: com.thetransactioncompany.cors.CORSFilter at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1718) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1569) at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:529) at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:511) at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:139) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258) at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:105) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4809) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5485) 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:632) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1073) at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:701) Feb 27, 2014 11:09:06 AM org.apache.catalina.core.StandardContext startInternal SEVERE: Error filterStart

What am I missing? Shouldn't it work out of the box when I install tomcat without changes and just run the server?

Thanks for helping clueless me!

2
This should be commented out by default in your $CATALINA_BASE/conf/web.xml. See tomcat.apache.org/tomcat-7.0-doc/config/… - yours are enabled somehow - you can comment these outJoseK
I commented out the cors filter + mapping and restarted the server, still the same error. I've already tried with enabling and disabling it but had no luckDoidel
your installation might be corrupted/incomplete - this class is found in apache-tomcat-7.0.52\lib\catalina.jar - do you have it there?JoseK
It's there I'm afraid. CorsFilter$1.class, CorsFilter$CORSRequestType.class, CorsFilter.class.Doidel
What I did was purging apt-get tomcat7 and then using --reinstall to reinstall the stuff should I first deinstall it or something?Doidel

2 Answers

1
votes

The problem was in the project itself - sorry. Someone once included a custom cors filter library which was referenced in the xml but not included anymore. One could have recognized that in the upper stacktrace the namespace was

com.thetransactioncompany.cors.CORSFilter instead of an apache / catalina one.

Thanks for the help though!

0
votes

Sometimes this error occurs with me (TomCat 7.0 / Maven / Eclipse in Linux Mint) when I try to start the application with tomcat.

I solved it by doing:

  1. Maven clean within Eclipse
  2. clicking refresh on the project inside Eclipse (right button, refresh)
  3. Maven install with Eclipse again