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

I put the spring.jar file in the lib folder, but still there is an 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 the webpage give me an error like

HTTP Status 500 -

How to resolve this?

+6
java java-ee tomcat
source share
3 answers

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

Otherwise, if you do not need this and accidentally mistaken context.xml , you need to remove the <Loader> element from it.

+16
source share

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

+2
source share

Whenever you see an exception with something from this effect (i.e. a ClassNotFoundException ):

 java.lang.ClassNotFoundException: xx.xxx.class.ClassName 

You should know that (from the JavaDoc of the ClassNotFoundException class):

no definition for a class with the specified name can be found.

In this case, com.vaannila.service.UserServiceImpl cannot be found (from the error log: java.lang.ClassNotFoundException: com.vaannila.service.UserServiceImpl ).

Ensure that the jar file (containing com.vaanila.service.UserServiceImpl ) is included in the project.

0
source share

All Articles