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.

  • If you run some tasks from com.atlassian.sal.api.scheduling.PluginScheduler them will be runned with WebappClassloader. If your plugin job try to check merge vetos for other pull request via com.atlassian.stash.scm.pull.MergeRequestCheckService in this job thread, then all MergeChecks will executed not in http-threads-xxx, bu in other threads. And then, if you try to serialize ListHashMultimap in some of this MergeChecks (other plugins), you may get strange exception: {code} 2014-02-10 01:46:42,645 WARN [scheduler_Worker-5] java.lang.ClassNotFoundException: com.acme.stash.plugin.other.content.SomeKeyInSetMultimap at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702) ~[catalina.jar:7.0.47] at java.lang.Class.forName0(Native Method) ~[na:1.6.0_45] at java.lang.Class.forName(Class.java:249) ~[na:1.6.0_45] at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:602) ~[na:1.6.0_45] at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1589) ~[na:1.6.0_45] at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1494) ~[na:1.6.0_45] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1748) ~[na:1.6.0_45] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1327) ~[na:1.6.0_45] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349) ~[na:1.6.0_45] at com.google.common.collect.Serialization.populateMultimap(Serialization.java:184) ~[guava-10.0.1.jar:na] at com.google.common.collect.LinkedHashMultimap.readObject(LinkedHashMultimap.java:383) ~[guava-10.0.1.jar:na] at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:969) ~[na:1.6.0_45] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871) ~[na:1.6.0_45] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1775) ~[na:1.6.0_45] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1327) ~[na:1.6.0_45] at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1969) ~[na:1.6.0_45] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1893) ~[na:1.6.0_45] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1775) ~[na:1.6.0_45] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1327) ~[na:1.6.0_45] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349) ~[na:1.6.0_45] at java.util.HashSet.readObject(HashSet.java:291) ~[na:1.6.0_45] at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:969) ~[na:1.6.0_45] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871) ~[na:1.6.0_45] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1775) ~[na:1.6.0_45] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1327) ~[na:1.6.0_45] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349) ~[na:1.6.0_45] ... (skipped) ... at com.atlassian.stash.internal.pull.DefaultMergeRequestCheckService.check(DefaultMergeRequestCheckService.java:46) [stash-service-impl-2.10.1.jar:na] at com.sun.proxy.$Proxy168.check(Unknown Source) [na:na] at com.sun.proxy.$Proxy218.check(Unknown Source) [na:na] at com.sun.proxy.$Proxy218.check(Unknown Source) [na:na] at com.acme.stash.plugin.pull.merge.AutoMergingJob$2.perform(AutoMergingJob.java:218) [plugin.6818593026216650093.stash-pull-request-automerge-1.0.32_1390605423000.jar:na] {code} The bug only in this thread, the same check from Web UI work fine. I think, that PluginScheduler load tasks in not valid ClassLoader.
    via by Alexey Efimov,
  • If you run some tasks from com.atlassian.sal.api.scheduling.PluginScheduler them will be runned with WebappClassloader. If your plugin job try to check merge vetos for other pull request via com.atlassian.stash.scm.pull.MergeRequestCheckService in this job thread, then all MergeChecks will executed not in http-threads-xxx, bu in other threads. And then, if you try to serialize ListHashMultimap in some of this MergeChecks (other plugins), you may get strange exception: {code} 2014-02-10 01:46:42,645 WARN [scheduler_Worker-5] java.lang.ClassNotFoundException: com.acme.stash.plugin.other.content.SomeKeyInSetMultimap at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702) ~[catalina.jar:7.0.47] at java.lang.Class.forName0(Native Method) ~[na:1.6.0_45] at java.lang.Class.forName(Class.java:249) ~[na:1.6.0_45] at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:602) ~[na:1.6.0_45] at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1589) ~[na:1.6.0_45] at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1494) ~[na:1.6.0_45] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1748) ~[na:1.6.0_45] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1327) ~[na:1.6.0_45] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349) ~[na:1.6.0_45] at com.google.common.collect.Serialization.populateMultimap(Serialization.java:184) ~[guava-10.0.1.jar:na] at com.google.common.collect.LinkedHashMultimap.readObject(LinkedHashMultimap.java:383) ~[guava-10.0.1.jar:na] at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:969) ~[na:1.6.0_45] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871) ~[na:1.6.0_45] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1775) ~[na:1.6.0_45] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1327) ~[na:1.6.0_45] at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1969) ~[na:1.6.0_45] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1893) ~[na:1.6.0_45] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1775) ~[na:1.6.0_45] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1327) ~[na:1.6.0_45] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349) ~[na:1.6.0_45] at java.util.HashSet.readObject(HashSet.java:291) ~[na:1.6.0_45] at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:969) ~[na:1.6.0_45] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871) ~[na:1.6.0_45] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1775) ~[na:1.6.0_45] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1327) ~[na:1.6.0_45] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349) ~[na:1.6.0_45] ... (skipped) ... at com.atlassian.stash.internal.pull.DefaultMergeRequestCheckService.check(DefaultMergeRequestCheckService.java:46) [stash-service-impl-2.10.1.jar:na] at com.sun.proxy.$Proxy168.check(Unknown Source) [na:na] at com.sun.proxy.$Proxy218.check(Unknown Source) [na:na] at com.sun.proxy.$Proxy218.check(Unknown Source) [na:na] at com.acme.stash.plugin.pull.merge.AutoMergingJob$2.perform(AutoMergingJob.java:218) [plugin.6818593026216650093.stash-pull-request-automerge-1.0.32_1390605423000.jar:na] {code} The bug only in this thread, the same check from Web UI work fine. I think, that PluginScheduler load tasks in not valid ClassLoader.
    via by Alexey Efimov,
  • Batik not in classpath
    via Stack Overflow by AndrewQ
    ,
    • java.lang.ClassNotFoundException: org.eclipse.jetty.alpn.ALPN$Provider at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702)

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    treefolktreefolk
    2 times, last one,
    444 more bugmates