0

I am getting this when I start the tomcat. I have placed the spring2.5.6.jar in my classpath.

SEVERE: Exception starting filter springSecurityFilterChain
java.lang.ClassNotFoundException: org.springframework.web.filter.DelegatingFilterProxy
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1386)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1232)
    at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:207)
    at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:302)
    at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:78)
    at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3666)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4258)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(StandardService.java:448)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)

What can I do?

ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
prem
  • 163
  • 2
  • 3
  • 5

2 Answers2

1

As far as I can recall, in Spring 2.5.x this class was either in the full spring.jar, or in the spring-web.jar.

Check whether you have the class inside your spring2.5.6.jar, and if not add spring-web2.5.6.jar to your classpath.

Eran Harel
  • 2,325
  • 19
  • 28
  • This is odd. ClassNotFoundException means the class is NOT in the classpath. How do you bundle your application? is the spring.jar in the war file? Do you run tomcat from Eclipse? – Eran Harel Jan 14 '12 at 11:20
  • i am running tomcat from eclipse and created user library and add it to classpath – prem Jan 14 '12 at 13:08
0

i have placed the spring2.5.6.jar in my classpath

This phrase is very ambiguous. The "classpath" is merely an abstract term which identifies the collection of all local disk file system paths wherein Java has to scan for classes and JAR files during compiletime or runtime. Your current and previous questions and your comments on this question doesn't give me the impression that you properly understand what exactly the classpath is.

In this particular case, you need to ensure that the JAR file is placed in one of those paths which are (by default) covered by the runtime classpath. The webapp's /WEB-INF/lib folder is one of them. You just have to drop a copy of the JAR in that folder. Absolutely nothing more needs to be done. Even not fiddling with Build Path properties in an IDE, which would possibly make things worse. Undo it if necessary. Just dropping the JAR in /WEB-INF/lib folder of the IDE project is sufficient, really.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555