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

You might've forgot to add a dependency or it's written wrong. Also, you might be using incompatible versions of Java and Hibernate. More on this here: https://goo.gl/SjSlRA

tip

If you're using Hibernate, this indicates you're missing FasterXML Classmate dependency, which you can add to your dependencies. To add it, the groupId is com.fasterxml and artifactId is Classmate.

tip

This error means there's a class missing in your classpath during runtime. You need to create a jar with all your dependencies and have it in your classpath. Check Maven Assembly Plugin and how to add your dependencies to a jar: https://goo.gl/U2zr8k

tip

jsp-api and servlet-api jars must NOT be deployed by your web app. They should be marked as provided but not deployed by your app.

tip

The server rejects all jars that already belong to the server runtime (such as tomcat-**.jar, servlet**.jar). Consider substituting the CORS filter you're using for this one: https://goo.gl/ctQ7Fs

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

  • Exception: client startup on Windows
    via compiere by *anonymous
    ,
  • Heritrix-as-a-war-file is broken since commit of SinkHandler. Fix. See note below from list. Quoting bmadaras9 <madaras@ebrinc.com>: > > > > > I am trying to drop Heritrix into Tomcat 5.0.28 to test it out and so I can > run a remote debug on it to see exactly what is going on as the JSP interacts > with heritrix. This mail describes the issue: http://www.mail-archive.com/ tomcat- user@jakarta.apache.org/msg103306.html (The wrong classpath context is in place when the lookup on SinkHandler is being done). I tried playing around adding SinkHandler as an inner class of Heritrix as was suggested in another post -- so the correct context is forced -- but it needs more work. Adding heritrix*.jar to commons/endorsed only adds to the confusion. Making a small jar that has org.archive.io.SinkHandler* in it -- making it with jdk1.4.x -- and adding this to commons/endorsed works. Looks like heritrix-as-a-war has been broken with a while, since the commit of SinkHandler. I'll make an issue to fix... Thanks for pointing out the problem. St.Ack > > I downloaded src heritrix-1.5.1-200510181217 from > > http://crawltools.archive.org:8080/cruisecontrol/artifacts/HEAD- heritrix/ 20051018121732 > > > > I setup Maven as directed in the developer manual and ran "maven war" > > This seems to describe the problem: > > I then threw the war into tomcat and started up and received this error: > > INFO: Installing web application at context path /heritrix from URL > file:C:/Tomcat5/webapps/heritrix > > Can't load log handler "org.archive.io.SinkHandler" > > java.lang.ClassNotFoundException: org.archive.io.SinkHandler > > java.lang.ClassNotFoundException: org.archive.io.SinkHandler > > at java.net.URLClassLoader$1.run(URLClassLoader.java:199) > > at java.security.AccessController.doPrivileged(Native Method) > > at java.net.URLClassLoader.findClass(URLClassLoader.java: 187) > > at java.lang.ClassLoader.loadClass(ClassLoader.java:289) > > at sun.misc.Launcher$AppClassLoader.loadClass (Launcher.java:274) > > at java.lang.ClassLoader.loadClass(ClassLoader.java:235) > > at java.util.logging.LogManager$5.run(LogManager.java:783) > > at java.security.AccessController.doPrivileged(Native Method) > > at > java.util.logging.LogManager.initializeGlobalHandlers (LogManager.java:776) > > at java.util.logging.LogManager.access$900 (LogManager.java:114) > > at > java.util.logging.LogManager$RootLogger.getHandlers (LogManager.java:883) > > at org.archive.io.SinkHandler.getInstance(SinkHandler.java: 80) > > at org.archive.crawler.Heritrix.<init>(Heritrix.java:313) > > at > org.archive.crawler.WebappLifecycle.contextInitialized (WebappLifecycle.java: 41) > > at > org.apache.catalina.core.StandardContext.listenerStart (StandardContext.java: 3831) > > at > org.apache.catalina.core.StandardContext.start (StandardContext.java:4323) > > at > org.apache.catalina.core.ContainerBase.addChildInternal (ContainerBase.java: 823) > > at > org.apache.catalina.core.ContainerBase.addChild (ContainerBase.java:807) > > at org.apache.catalina.core.StandardHost.addChild (StandardHost.java:595) > > at > org.apache.catalina.core.StandardHostDeployer.install (StandardHostDeployer.java:277) > > at org.apache.catalina.core.StandardHost.install (StandardHost.java:832) > > at org.apache.catalina.startup.HostConfig.deployWARs (HostConfig.java:625) > > at org.apache.catalina.startup.HostConfig.deployApps (HostConfig.java:431) > > at org.apache.catalina.startup.HostConfig.start (HostConfig.java:983) > > at > org.apache.catalina.startup.HostConfig.lifecycleEvent (HostConfig.java:349) > > at > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent (LifecycleSupport.java:119) > > at org.apache.catalina.core.ContainerBase.start (ContainerBase.java:1091) > > at org.apache.catalina.core.StandardHost.start (StandardHost.java:789) > > at org.apache.catalina.core.ContainerBase.start (ContainerBase.java:1083) > > at org.apache.catalina.core.StandardEngine.start (StandardEngine.java:478) > > at > org.apache.catalina.core.StandardService.start (StandardService.java:480) > > at > org.apache.catalina.core.StandardServer.start (StandardServer.java:2313) > > at org.apache.catalina.startup.Catalina.start(Catalina.java: 556) > > 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:324) > > at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java: 287) > > at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java: 425) > >
    via by Michael Stack,
  • Apache Storm application fails at run
    via Stack Overflow by JME
    ,
  • Re: ZooInspector on Mac OS X
    via by Kevin Gao,
  • exception while using excel workbook
    via Stack Overflow by Pooja Mahawar
    ,
    • java.lang.ClassNotFoundException: org.compiere.util.CLogErrorBuffer at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.util.logging.LogManager$7.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.util.logging.LogManager.initializeGlobalHandlers(Unknown Source) at java.util.logging.LogManager.access$900(Unknown Source) at java.util.logging.LogManager$RootLogger.getHandlers(Unknown Source) at org.compiere.util.CLogMgt.initialize(CLogMgt.java:67) at org.compiere.Compiere.startup(Compiere.java:389) at org.compiere.Compiere.main(Compiere.java:501) 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 com.sun.javaws.Launcher.executeApplication(Unknown Source) at com.sun.javaws.Launcher.executeMainClass(Unknown Source) at com.sun.javaws.Launcher.continueLaunch(Unknown Source) at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source) at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source) at com.sun.javaws.Launcher.run(Unknown Source) at java.lang.Thread.run(Unknown Source)

    Users with the same issue

    CasperCasper
    4 times, last one,
    HandemelindoHandemelindo
    1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    rprp
    3 times, last one,
    1188 more bugmates