Javier PR
Javier PR

Reputation: 645

Jenkins Violations pluging stopped working

I've been using violations plugging for Jenkins to trace the python pep8 violations of my code for a while and a few days ago it stopped working.

I didn't change any plugging nor updated Jenkins but suddenly I was unable to open the configuration of the jobs using it and jobs got stuck once the results were about to be published

I've looked into the logs and I've got mislead by a reference to coverage plugging (see below) but I ruled it out deactivating sequentially all post build features.

I've uninstalled it and reinstalled it again and also updated Maven Integrations as I've read in a SO post that it was related but had no luck.

My Jenkins version is 2.111 and violations plugin version is 0.7.11

Here is the misleading traceback

Failed to scout hudson.plugins.cobertura.MavenCoberturaPublisher
java.lang.ClassNotFoundException: hudson.maven.MavenReporter
at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1374)
at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1327)
at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1080)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
Caused: java.lang.NoClassDefFoundError: hudson/maven/MavenReporter
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at jenkins.util.AntClassLoader.defineClassFromData(AntClassLoader.java:1140)
at hudson.ClassicPluginStrategy$AntClassLoader2.defineClassFromData(ClassicPluginStrategy.java:847)
at jenkins.util.AntClassLoader.getClassFromStream(AntClassLoader.java:1311)
at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1364)
at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1327)
at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at jenkins.ClassLoaderReflectionToolkit.invoke(ClassLoaderReflectionToolkit.java:44)
at jenkins.ClassLoaderReflectionToolkit._findClass(ClassLoaderReflectionToolkit.java:81)
at hudson.PluginManager$UberClassLoader.findClass(PluginManager.java:1872)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at net.java.sezpoz.IndexItem.element(IndexItem.java:134)
Caused: java.lang.InstantiationException
at net.java.sezpoz.IndexItem.element(IndexItem.java:146)
at hudson.ExtensionFinder$Sezpoz.scout(ExtensionFinder.java:656)
at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:476)
at hudson.ExtensionList.load(ExtensionList.java:366)
at hudson.ExtensionList.ensureLoaded(ExtensionList.java:304)
at hudson.ExtensionList.getComponents(ExtensionList.java:169)
at jenkins.model.Jenkins$6.onInitMilestoneAttained(Jenkins.java:1095)
at jenkins.InitReactorRunner$1.onAttained(InitReactorRunner.java:83)
at org.jvnet.hudson.reactor.ReactorListener$Aggregator.lambda$onAttained$3(ReactorListener.java:102)
at org.jvnet.hudson.reactor.ReactorListener$Aggregator.run(ReactorListener.java:109)
at org.jvnet.hudson.reactor.ReactorListener$Aggregator.onAttained(ReactorListener.java:102)
at org.jvnet.hudson.reactor.Reactor$1.run(Reactor.java:177)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

Did anyone go through something similar? Also, are there alternatives to violations plugin? I can only seem to find similar plugins for other languages other than Python

UPDATE: I've managed to open the configuration of jobs using violations plugging after reinstalling but I cannot add that as post-build step. I just try to add it an nothing happens. The logs do not say anything about it (I've added 'org.jenkinsci.plugins' ALL)

Another update: I've created totally new Jenkins machine installed the same plugins but I'm still unable to use violations.

I'm shocked there is nothing out there to check pep compliance of the code in Jenkins... truly shocked...

Upvotes: 0

Views: 422

Answers (1)

Javier PR
Javier PR

Reputation: 645

For those arriving here with the same question, I sorted it out but I didn't find the reason why violations plugging stopped working. Jenkins logs didn't give me any clue, so I finally installed the flake8 html plugging and I've added a post build action to publish an html file

Upvotes: 1

Related Questions