java.lang.ClassNotFoundException

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
tip

This means you're missing a class that Java needs for this program. Check if you're not missing the jsr305-1.3.7.jar from your classpath, it's the jar that contains the class javax.annotation.Nullable.

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • ContextLoad error in spring
    via Stack Overflow by Ravi Mishra
    ,
  • Cannot get Spring 2.5 work with Tomcat 5
    via Stack Overflow by alextc
    ,
  • I've been trying to use STS 3.1.0 to create a new SpringMVC project. I have been doing this in the Spring perspective, by either control-clicking in the package explorer and selecting "New", or selecting "File" -> "New", then selecting "Spring Template Project", then the Spring MVC Project template. After giving the project a name and a top-level package, STS goes about creating the project. However, the resulting project reports two errors: Unable to load schema mappings from location [META-INF/spring.schemas] for both root-context.xml and servlet-context.xml I sometimes then try to Run As -> Run On Server, but the app won't launch due to a ClassNotFoundException, whose stacktrace is pasted below. Interestingly, I can also take another SpringMVC app created elsewhere, which reports no errors, and import it into my STS 3.1.0 installation, and the same errors occur. Note that I've deleted and reinstalled (and re-downloaded) STS multiple times. java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4149) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057) at org.apache.catalina.core.StandardHost.start(StandardHost.java:840) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) at org.apache.catalina.core.StandardService.start(StandardService.java:525) at org.apache.catalina.core.StandardServer.start(StandardServer.java:754) at org.apache.catalina.startup.Catalina.start(Catalina.java:595) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
    via by Dave Taubler,
  • I've been trying to use STS 3.1.0 to create a new SpringMVC project. I have been doing this in the Spring perspective, by either control-clicking in the package explorer and selecting "New", or selecting "File" -> "New", then selecting "Spring Template Project", then the Spring MVC Project template. After giving the project a name and a top-level package, STS goes about creating the project. However, the resulting project reports two errors: Unable to load schema mappings from location [META-INF/spring.schemas] for both root-context.xml and servlet-context.xml I sometimes then try to Run As -> Run On Server, but the app won't launch due to a ClassNotFoundException, whose stacktrace is pasted below. Interestingly, I can also take another SpringMVC app created elsewhere, which reports no errors, and import it into my STS 3.1.0 installation, and the same errors occur. Note that I've deleted and reinstalled (and re-downloaded) STS multiple times. java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4149) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057) at org.apache.catalina.core.StandardHost.start(StandardHost.java:840) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) at org.apache.catalina.core.StandardService.start(StandardService.java:525) at org.apache.catalina.core.StandardServer.start(StandardServer.java:754) at org.apache.catalina.startup.Catalina.start(Catalina.java:595) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
    via by Dave Taubler,
  • Re: [OpenTripPlanner] How to deploy OTP
    via by Stefan Steiniger,
  • Problems with setting up OTP - Apache Tomcat
    via by Unknown author,
    • java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4149) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057) at org.apache.catalina.core.StandardHost.start(StandardHost.java:840) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) at org.apache.catalina.core.StandardService.start(StandardService.java:525) at org.apache.catalina.core.StandardServer.start(StandardServer.java:754) at org.apache.catalina.startup.Catalina.start(Catalina.java:595) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor4 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    444 more bugmates