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.

  • When I try to run the Sample "Spring Social QuickStart" I get this issue: ######################################################## Jul 04, 2013 7:41:16 PM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre7\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;. Jul 04, 2013 7:41:16 PM org.apache.tomcat.util.digester.SetPropertiesRule begin WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:spring-social-quickstart' did not find a matching property. Jul 04, 2013 7:41:16 PM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler ["http-bio-80"] Jul 04, 2013 7:41:16 PM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler ["ajp-bio-8009"] Jul 04, 2013 7:41:16 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1618 ms Jul 04, 2013 7:41:16 PM org.apache.catalina.core.StandardService startInternal INFO: Starting service Catalina Jul 04, 2013 7:41:16 PM org.apache.catalina.core.StandardEngine startInternal INFO: Starting Servlet Engine: Apache Tomcat/7.0.35 Jul 04, 2013 7:41:21 PM org.apache.catalina.core.ApplicationContext log INFO: No Spring WebApplicationInitializer types detected on classpath Jul 04, 2013 7:41:21 PM org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring root WebApplicationContext Jul 04, 2013 7:41:21 PM org.springframework.web.context.ContextLoader initWebApplicationContext INFO: Root WebApplicationContext: initialization started Jul 04, 2013 7:41:21 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh INFO: Refreshing Root WebApplicationContext: startup date [Thu Jul 04 19:41:21 CEST 2013]; root of context hierarchy Jul 04, 2013 7:41:21 PM org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider registerDefaultFilters INFO: JSR-330 'javax.inject.Named' annotation found and supported for component scanning Jul 04, 2013 7:41:21 PM org.springframework.web.context.support.AnnotationConfigWebApplicationContext loadBeanDefinitions INFO: No annotated classes found for specified class/package [org.springframework.social.quickstart.config] Jul 04, 2013 7:41:21 PM org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor <init> INFO: JSR-330 'javax.inject.Inject' annotation found and supported for autowiring Jul 04, 2013 7:41:21 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@15363c8e: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy Jul 04, 2013 7:41:21 PM org.springframework.web.context.ContextLoader initWebApplicationContext INFO: Root WebApplicationContext: initialization completed in 641 ms Jul 04, 2013 7:41:21 PM org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring FrameworkServlet 'appServlet' Jul 04, 2013 7:41:21 PM org.springframework.web.servlet.FrameworkServlet initServletBean INFO: FrameworkServlet 'appServlet': initialization started Jul 04, 2013 7:41:22 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh INFO: Refreshing WebApplicationContext for namespace 'appServlet-servlet': startup date [Thu Jul 04 19:41:22 CEST 2013]; parent: Root WebApplicationContext Jul 04, 2013 7:41:22 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@f669400: defining beans []; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@15363c8e Jul 04, 2013 7:41:22 PM org.springframework.web.servlet.FrameworkServlet initServletBean INFO: FrameworkServlet 'appServlet': initialization completed in 469 ms Jul 04, 2013 7:41:22 PM org.apache.catalina.core.ApplicationContext log INFO: Marking servlet H2Console as unavailable Jul 04, 2013 7:41:22 PM org.apache.catalina.core.StandardContext loadOnStartup SEVERE: Servlet /spring-social-quickstart threw load() exception java.lang.ClassNotFoundException: org.h2.server.web.WebServlet at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559) at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:527) at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:509) at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:137) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1137) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1081) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5033) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5320) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Jul 04, 2013 7:41:22 PM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["http-bio-80"] Jul 04, 2013 7:41:22 PM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["ajp-bio-8009"] Jul 04, 2013 7:41:22 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 5635 ms This is very annoying, because any of the Sample projects seems to work.
    via by Miguel Angel,
  • When I try to run the Sample "Spring Social QuickStart" I get this issue: ######################################################## Jul 04, 2013 7:41:16 PM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre7\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;. Jul 04, 2013 7:41:16 PM org.apache.tomcat.util.digester.SetPropertiesRule begin WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:spring-social-quickstart' did not find a matching property. Jul 04, 2013 7:41:16 PM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler ["http-bio-80"] Jul 04, 2013 7:41:16 PM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler ["ajp-bio-8009"] Jul 04, 2013 7:41:16 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1618 ms Jul 04, 2013 7:41:16 PM org.apache.catalina.core.StandardService startInternal INFO: Starting service Catalina Jul 04, 2013 7:41:16 PM org.apache.catalina.core.StandardEngine startInternal INFO: Starting Servlet Engine: Apache Tomcat/7.0.35 Jul 04, 2013 7:41:21 PM org.apache.catalina.core.ApplicationContext log INFO: No Spring WebApplicationInitializer types detected on classpath Jul 04, 2013 7:41:21 PM org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring root WebApplicationContext Jul 04, 2013 7:41:21 PM org.springframework.web.context.ContextLoader initWebApplicationContext INFO: Root WebApplicationContext: initialization started Jul 04, 2013 7:41:21 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh INFO: Refreshing Root WebApplicationContext: startup date [Thu Jul 04 19:41:21 CEST 2013]; root of context hierarchy Jul 04, 2013 7:41:21 PM org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider registerDefaultFilters INFO: JSR-330 'javax.inject.Named' annotation found and supported for component scanning Jul 04, 2013 7:41:21 PM org.springframework.web.context.support.AnnotationConfigWebApplicationContext loadBeanDefinitions INFO: No annotated classes found for specified class/package [org.springframework.social.quickstart.config] Jul 04, 2013 7:41:21 PM org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor <init> INFO: JSR-330 'javax.inject.Inject' annotation found and supported for autowiring Jul 04, 2013 7:41:21 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@15363c8e: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy Jul 04, 2013 7:41:21 PM org.springframework.web.context.ContextLoader initWebApplicationContext INFO: Root WebApplicationContext: initialization completed in 641 ms Jul 04, 2013 7:41:21 PM org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring FrameworkServlet 'appServlet' Jul 04, 2013 7:41:21 PM org.springframework.web.servlet.FrameworkServlet initServletBean INFO: FrameworkServlet 'appServlet': initialization started Jul 04, 2013 7:41:22 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh INFO: Refreshing WebApplicationContext for namespace 'appServlet-servlet': startup date [Thu Jul 04 19:41:22 CEST 2013]; parent: Root WebApplicationContext Jul 04, 2013 7:41:22 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@f669400: defining beans []; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@15363c8e Jul 04, 2013 7:41:22 PM org.springframework.web.servlet.FrameworkServlet initServletBean INFO: FrameworkServlet 'appServlet': initialization completed in 469 ms Jul 04, 2013 7:41:22 PM org.apache.catalina.core.ApplicationContext log INFO: Marking servlet H2Console as unavailable Jul 04, 2013 7:41:22 PM org.apache.catalina.core.StandardContext loadOnStartup SEVERE: Servlet /spring-social-quickstart threw load() exception java.lang.ClassNotFoundException: org.h2.server.web.WebServlet at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559) at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:527) at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:509) at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:137) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1137) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1081) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5033) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5320) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Jul 04, 2013 7:41:22 PM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["http-bio-80"] Jul 04, 2013 7:41:22 PM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["ajp-bio-8009"] Jul 04, 2013 7:41:22 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 5635 ms This is very annoying, because any of the Sample projects seems to work.
    via by Miguel Angel,
  • Class Not Found HttpSessionListener
    via Stack Overflow by Kim Honoridez
    ,
  • jsf - Jsf- tomcat-cdi
    via by Unknown author,
  • Developing a web App in Spring Tool Suit
    via Stack Overflow by Alekhya
    ,
    • java.lang.ClassNotFoundException: org.h2.server.web.WebServlet at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559) at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:527) at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:509) at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:137) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1137) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1081) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5033) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5320) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)

    Users with the same issue

    stigkj
    18 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor2 times, last one,
    Unknown visitor4 times, last one,
    468 more bugmates