Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins Git userContent plugin

I recently tried to install the Git userContent plugin on Jenkins 1.546. After restarting Jenkins the following error occured:

hudson.util.HudsonFailedToLoad: org.jvnet.hudson.reactor.ReactorException: java.lang.Error: java.lang.reflect.InvocationTargetException
    at hudson.WebAppMain$3.run(WebAppMain.java:234)
Caused by: org.jvnet.hudson.reactor.ReactorException: java.lang.Error: java.lang.reflect.InvocationTargetException
    at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:269)
    at jenkins.InitReactorRunner.run(InitReactorRunner.java:44)
    at jenkins.model.Jenkins.executeReactor(Jenkins.java:908)
    at jenkins.model.Jenkins.<init>(Jenkins.java:807)
    at hudson.model.Hudson.<init>(Hudson.java:82)
    at hudson.model.Hudson.<init>(Hudson.java:78)
    at hudson.WebAppMain$3.run(WebAppMain.java:222)
Caused by: java.lang.Error: java.lang.reflect.InvocationTargetException
    at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:109)
    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:897)
    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(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
    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 hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:105)
    ... 8 more
Caused by: java.lang.NullPointerException
    at hudson.plugins.git.GitSCM.onLoaded(GitSCM.java:1389)
    ... 13 more

I tried reverting to Jenkins 1.544 via the jenkins.war.bak, but the error persists. I can not access Jenkins anymore. Is there any way to recover from this, or at least a decent way to re-install Jenkins without losing any data?

like image 673
adrian.nicolau Avatar asked Jan 08 '14 14:01

adrian.nicolau


2 Answers

In my case it was because I had selected the git-client.jpi and git-server.jpi files for installation, but before they could be downloaded by Jenkins plugin manager, the download got stuck at a database plugin download. I restarted Jenkins and I think Jenkins mistook the not-yet-downloaded git plugin as already downloaded.

To solve the problem, just navigate to /var/lib/jenkins/plugins and delete the jpi files that are causing the problem. The restart Jenkins and your problem will be solved.

like image 146
Nav Avatar answered Nov 05 '22 00:11

Nav


The same issue occurred to me while i was disabling the plugin from Jenkins.

To Remove this error i have removed the partially disabled plugin which in my case was credentials.jpi.disabled

Traverse to /var/lib/jenkins/plugins/

Find the disabled file , which in my case was credentials.jpi.disabled and removing this file from the plugin directory.

Restart Jenkins service

service jenkins restart

and it worked !!

like image 42
Abhijeet Kamble Avatar answered Nov 05 '22 00:11

Abhijeet Kamble