java.lang.reflect.InvocationTargetException

jenkins-ci.org | 8 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

    I get the following exception in the the latest update of gerrit trigger plugin: {code:java} Jun 02, 2016 7:38:09 PM com.sonymobile.tools.gerrit.gerritevents.GerritHandler notifyListener SEVERE: Exception thrown during event handling. java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedMethodAccessor471.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.sonymobile.tools.gerrit.gerritevents.GerritHandler.notifyListener(GerritHandler.java:316) at com.sonymobile.tools.gerrit.gerritevents.GerritHandler.notifyListeners(GerritHandler.java:296) at com.sonyericsson.hudson.plugins.gerrit.trigger.JenkinsAwareGerritHandler.notifyListeners(JenkinsAwareGerritHandler.java:77) at com.sonymobile.tools.gerrit.gerritevents.workers.AbstractGerritEventWork.perform(AbstractGerritEventWork.java:46) at com.sonymobile.tools.gerrit.gerritevents.workers.GerritEventWork.perform(GerritEventWork.java:48) at com.sonymobile.tools.gerrit.gerritevents.workers.EventThread.run(EventThread.java:66) at com.sonyericsson.hudson.plugins.gerrit.trigger.SystemEventThread.run(SystemEventThread.java:66) Caused by: java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.EventListener$ParametersActionInspection.<init>(EventListener.java:435) at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.EventListener.getParametersInspection(EventListener.java:391) at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.EventListener.createParameters(EventListener.java:269) at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.EventListener.schedule(EventListener.java:188) at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.EventListener.schedule(EventListener.java:164) at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.EventListener.gerritEvent(EventListener.java:126) ... 10 more Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang3.StringUtils at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1376) at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1326) at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1079) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) {code} It looks like in the following commit the dependency to apache commons lang 3 was introduced: [https://github.com/jenkinsci/gerrit-trigger-plugin/pull/285/files#diff-54e50e5c447d3a893fd786bd419ee8b4R46] This dependency is resolved during build time via the rabbitmq-consumer plugin. Since this plugin is optional, the class will not be found if this plugin is not installed. There are now two possibilities to fix this (which is why I didn't create a pull request in the first place): # Replace in class 'com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.EventListener' the import 'org.apache.commons.lang3.StringUtils' with 'org.apache.commons.lang.StringUtils'. This class is available with core jenkins installation. # Explicitely add apache commons-lang3 to the dependencies of gerrit trigger plugin to make sure it is always imported.

    Jenkins JIRA | 11 months ago | Felix Wohlfrom
    java.lang.reflect.InvocationTargetException
  2. 0

    I get the following exception in the the latest update of gerrit trigger plugin: {code:java} Jun 02, 2016 7:38:09 PM com.sonymobile.tools.gerrit.gerritevents.GerritHandler notifyListener SEVERE: Exception thrown during event handling. java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedMethodAccessor471.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.sonymobile.tools.gerrit.gerritevents.GerritHandler.notifyListener(GerritHandler.java:316) at com.sonymobile.tools.gerrit.gerritevents.GerritHandler.notifyListeners(GerritHandler.java:296) at com.sonyericsson.hudson.plugins.gerrit.trigger.JenkinsAwareGerritHandler.notifyListeners(JenkinsAwareGerritHandler.java:77) at com.sonymobile.tools.gerrit.gerritevents.workers.AbstractGerritEventWork.perform(AbstractGerritEventWork.java:46) at com.sonymobile.tools.gerrit.gerritevents.workers.GerritEventWork.perform(GerritEventWork.java:48) at com.sonymobile.tools.gerrit.gerritevents.workers.EventThread.run(EventThread.java:66) at com.sonyericsson.hudson.plugins.gerrit.trigger.SystemEventThread.run(SystemEventThread.java:66) Caused by: java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.EventListener$ParametersActionInspection.<init>(EventListener.java:435) at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.EventListener.getParametersInspection(EventListener.java:391) at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.EventListener.createParameters(EventListener.java:269) at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.EventListener.schedule(EventListener.java:188) at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.EventListener.schedule(EventListener.java:164) at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.EventListener.gerritEvent(EventListener.java:126) ... 10 more Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang3.StringUtils at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1376) at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1326) at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1079) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) {code} It looks like in the following commit the dependency to apache commons lang 3 was introduced: [https://github.com/jenkinsci/gerrit-trigger-plugin/pull/285/files#diff-54e50e5c447d3a893fd786bd419ee8b4R46] This dependency is resolved during build time via the rabbitmq-consumer plugin. Since this plugin is optional, the class will not be found if this plugin is not installed. There are now two possibilities to fix this (which is why I didn't create a pull request in the first place): # Replace in class 'com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.EventListener' the import 'org.apache.commons.lang3.StringUtils' with 'org.apache.commons.lang.StringUtils'. This class is available with core jenkins installation. # Explicitely add apache commons-lang3 to the dependencies of gerrit trigger plugin to make sure it is always imported.

    Jenkins JIRA | 11 months ago | Felix Wohlfrom
    java.lang.reflect.InvocationTargetException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    RunListener failed - Build Passes do not update commit statuses

    GitHub | 2 years ago | techman83
    java.lang.NoClassDefFoundError: hudson/tasks/test/TestObject
  5. 0

    How to deploy war file to jboss eap 6.4 (local installed on my machine) using jenkins

    Stack Overflow | 2 years ago | Aliasger Motiwala
    org.codehaus.cargo.container.ContainerException: Failed to create deployer with implementation class org.codehaus.cargo.container.jboss.JBoss7xRemoteDeployer for the parameters (container [id = [jboss7x]], deployer type [remote]).

  1. poroszd 1 times, last 6 months ago
  2. davidvanlaatum 1 times, last 9 months ago
25 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.apache.commons.lang3.StringUtils

    at jenkins.util.AntClassLoader.findClassInComponents()
  2. jenkins.util
    AntClassLoader.loadClass
    1. jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1376)
    2. jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1326)
    3. jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1079)
    3 frames