Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

java.lang.ClassNotFoundException: org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader

I am putting spring.jar file in my lib folder but still there is error like

 at org.apache.jsp.index_jsp._jspInit(index_jsp.java:23)
 at org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52)
 at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:159)
 at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
 at java.lang.Thread.run(Unknown Source)

and webpage give me error like

HTTP Status 500 -

How do I resolved it?

like image 364
NAYAN RAMI Avatar asked Jan 06 '11 13:01

NAYAN RAMI


2 Answers

If you want to configure load time weaving on Tomcat, you need to place org.springframework.instrument.tomcat.jar into lib folder of Tomcat installation directory, as described in the documentation.

Otherwise, if you don't need it and accidentially used wrong context.xml, you need to remove <Loader> element from it.

like image 188
axtavt Avatar answered Nov 07 '22 02:11

axtavt


The org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader is now located in the spring-instrument-tomcat.jar, which can be downloaded from Maven Central or Spring Source.

like image 39
user2475989 Avatar answered Nov 07 '22 02:11

user2475989