java.lang.InstantiationException: java.lang.NoClassDefFoundError: org/jenkinsci/plugins/Beer

Jenkins JIRA | Alvaro Lobato | 7 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    The Variant Plugin (https://github.com/jenkinsci/variant-plugin/) is not working properly when you specify `requiredClasses` and one of them do not exists. There are two observed situations. * If the annotated class extends the non existent class this exception is thrown: {code} WARNING: Failed to load org.jenkinsci.plugins.variant.Negative4 java.lang.InstantiationException: java.lang.NoClassDefFoundError: org/jenkinsci/plugins/Beer at net.java.sezpoz.IndexItem.element(IndexItem.java:146) at hudson.ExtensionFinder$GuiceFinder$SezpozModule.configure(ExtensionFinder.java:504) at com.google.inject.AbstractModule.configure(AbstractModule.java:62) at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:230) at com.google.inject.spi.Elements.getElements(Elements.java:103) at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:136) at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104) at com.google.inject.Guice.createInjector(Guice.java:96) at com.google.inject.Guice.createInjector(Guice.java:73) at hudson.ExtensionFinder$GuiceFinder.<init>(ExtensionFinder.java:282) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at java.lang.Class.newInstance(Class.java:379) at net.java.sezpoz.IndexItem.instance(IndexItem.java:181) at hudson.ExtensionFinder$Sezpoz._find(ExtensionFinder.java:642) at hudson.ExtensionFinder$Sezpoz.find(ExtensionFinder.java:617) at hudson.ExtensionFinder._find(ExtensionFinder.java:151) at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:345) at hudson.ExtensionList.load(ExtensionList.java:300) at hudson.ExtensionList.ensureLoaded(ExtensionList.java:253) at hudson.ExtensionList.iterator(ExtensionList.java:143) at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:338) at hudson.ExtensionList.load(ExtensionList.java:300) at hudson.ExtensionList.ensureLoaded(ExtensionList.java:253) at hudson.ExtensionList.get(ExtensionList.java:158) at hudson.PluginManager$PluginUpdateMonitor.getInstance(PluginManager.java:1248) at hudson.maven.PluginImpl.init(PluginImpl.java:58) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:105) at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:169) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282) at jenkins.model.Jenkins$7.runTask(Jenkins.java:886) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NoClassDefFoundError: org/jenkinsci/plugins/Beer at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:412) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at net.java.sezpoz.IndexItem.element(IndexItem.java:134) ... 41 more Caused by: java.lang.ClassNotFoundException: org.jenkinsci.plugins.Beer at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ... 55 more {code} This is due to the fact that Guice is not treating it as optional. * If the class is not extended and just used inside the annotated class: {code} INFO: An exception was caught and reported. Message: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:715) at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:522) at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:348) at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:283) at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:117) at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:70) at java.lang.Class.initAnnotationsIfNecessary(Class.java:3271) at java.lang.Class.getDeclaredAnnotations(Class.java:3248) at org.jenkinsci.plugins.variant.OptionalExtensionProcessor.isActive(OptionalExtensionProcessor.java:46) at hudson.ExtensionFinder$GuiceFinder.isActive(ExtensionFinder.java:375) at hudson.ExtensionFinder$GuiceFinder.access$400(ExtensionFinder.java:234) at hudson.ExtensionFinder$GuiceFinder$SezpozModule.configure(ExtensionFinder.java:506) at com.google.inject.AbstractModule.configure(AbstractModule.java:62) at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:230) at com.google.inject.spi.Elements.getElements(Elements.java:103) at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:136) at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104) at com.google.inject.Guice.createInjector(Guice.java:96) at com.google.inject.Guice.createInjector(Guice.java:73) at hudson.ExtensionFinder$GuiceFinder.<init>(ExtensionFinder.java:282) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at java.lang.Class.newInstance(Class.java:379) at net.java.sezpoz.IndexItem.instance(IndexItem.java:181) at hudson.ExtensionFinder$Sezpoz._find(ExtensionFinder.java:642) at hudson.ExtensionFinder$Sezpoz.find(ExtensionFinder.java:617) at hudson.ExtensionFinder._find(ExtensionFinder.java:151) at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:345) at hudson.ExtensionList.load(ExtensionList.java:300) at hudson.ExtensionList.ensureLoaded(ExtensionList.java:253) at hudson.ExtensionList.iterator(ExtensionList.java:143) at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:338) at hudson.ExtensionList.load(ExtensionList.java:300) at hudson.ExtensionList.ensureLoaded(ExtensionList.java:253) at hudson.ExtensionList.get(ExtensionList.java:158) at hudson.PluginManager$PluginUpdateMonitor.getInstance(PluginManager.java:1248) at hudson.maven.PluginImpl.init(PluginImpl.java:58) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:105) at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:169) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282) at jenkins.model.Jenkins$7.runTask(Jenkins.java:886) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) {code} This is related to this bug in the JDK http://bugs.java.com/view_bug.do?bug_id=7183985 by which an annotation with a non existent class in a value cannot be loaded.

    Jenkins JIRA | 7 months ago | Alvaro Lobato
    java.lang.InstantiationException: java.lang.NoClassDefFoundError: org/jenkinsci/plugins/Beer
  2. 0

    java.lang.ClassNotFoundException: org.springframework.core.ResolvableTypeProvider

    Stack Overflow | 8 months ago | Maruli
    java.lang.NoClassDefFoundError: org/springframework/core/ResolvableTypeProvider
  3. 0

    NoClassDefFoundError when using URLClassLoader

    Stack Overflow | 2 years ago
    java.lang.NoClassDefFoundError: org/apache/http/protocol/HttpCoreContext
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Tracking down a familiar ClassNotFoundException

    Google Groups | 2 years ago | Chris Heller
    java.lang.reflect.InvocationTargetException
  6. 0

    [Spark 1.2] zeppelin with mesos

    zeppelin-users | 2 years ago | Ayoub Benali
    java.lang.NoClassDefFoundError: scala/tools/nsc/CompilerCommand

  1. davidvanlaatum 1080 times, last 9 months ago
  2. Handemelindo 4 times, last 2 months ago
  3. Hronom 1 times, last 2 months ago
  4. andyglick 2 times, last 2 months ago
  5. batwalrus76 6 times, last 2 months ago
7 more registered users
88 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.ClassNotFoundException

    org.jenkinsci.plugins.Beer

    at java.net.URLClassLoader$1.run()
  2. Java RT
    ClassLoader.loadClass
    1. java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    2. java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    3. java.security.AccessController.doPrivileged(Native Method)
    4. java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    5. java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    6. sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    7. java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    8. java.lang.ClassLoader.defineClass1(Native Method)
    9. java.lang.ClassLoader.defineClass(ClassLoader.java:800)
    10. java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    11. java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
    12. java.net.URLClassLoader.access$100(URLClassLoader.java:71)
    13. java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    14. java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    15. java.security.AccessController.doPrivileged(Native Method)
    16. java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    17. java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    18. sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    19. java.lang.ClassLoader.loadClass(ClassLoader.java:412)
    20. java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    20 frames
  3. SezPoz
    IndexItem.element
    1. net.java.sezpoz.IndexItem.element(IndexItem.java:134)
    1 frame
  4. Hudson
    ExtensionFinder$GuiceFinder$SezpozModule.configure
    1. hudson.ExtensionFinder$GuiceFinder$SezpozModule.configure(ExtensionFinder.java:504)
    1 frame
  5. Google Guice - Core Library
    Guice.createInjector
    1. com.google.inject.AbstractModule.configure(AbstractModule.java:62)
    2. com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:230)
    3. com.google.inject.spi.Elements.getElements(Elements.java:103)
    4. com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:136)
    5. com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
    6. com.google.inject.Guice.createInjector(Guice.java:96)
    7. com.google.inject.Guice.createInjector(Guice.java:73)
    7 frames
  6. Hudson
    ExtensionFinder$GuiceFinder.<init>
    1. hudson.ExtensionFinder$GuiceFinder.<init>(ExtensionFinder.java:282)
    1 frame
  7. Java RT
    Class.newInstance
    1. sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    2. sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    3. sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    4. java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    5. java.lang.Class.newInstance(Class.java:379)
    5 frames
  8. SezPoz
    IndexItem.instance
    1. net.java.sezpoz.IndexItem.instance(IndexItem.java:181)
    1 frame
  9. Hudson
    PluginManager$PluginUpdateMonitor.getInstance
    1. hudson.ExtensionFinder$Sezpoz._find(ExtensionFinder.java:642)
    2. hudson.ExtensionFinder$Sezpoz.find(ExtensionFinder.java:617)
    3. hudson.ExtensionFinder._find(ExtensionFinder.java:151)
    4. hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:345)
    5. hudson.ExtensionList.load(ExtensionList.java:300)
    6. hudson.ExtensionList.ensureLoaded(ExtensionList.java:253)
    7. hudson.ExtensionList.iterator(ExtensionList.java:143)
    8. hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:338)
    9. hudson.ExtensionList.load(ExtensionList.java:300)
    10. hudson.ExtensionList.ensureLoaded(ExtensionList.java:253)
    11. hudson.ExtensionList.get(ExtensionList.java:158)
    12. hudson.PluginManager$PluginUpdateMonitor.getInstance(PluginManager.java:1248)
    12 frames
  10. Hudson Maven Embedder
    PluginImpl.init
    1. hudson.maven.PluginImpl.init(PluginImpl.java:58)
    1 frame
  11. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:606)
    4 frames
  12. Hudson
    TaskMethodFinder$TaskImpl.run
    1. hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:105)
    2. hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:169)
    2 frames
  13. init
    Reactor.runTask
    1. org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
    1 frame
  14. jenkins.model
    Jenkins$7.runTask
    1. jenkins.model.Jenkins$7.runTask(Jenkins.java:886)
    1 frame
  15. init
    Reactor$Node.run
    1. org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
    2. org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
    2 frames
  16. Java RT
    Thread.run
    1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    3. java.lang.Thread.run(Thread.java:745)
    3 frames