#17206 closed defect (fixed)
ant spotbugs gives NoClassDefFoundError: org/slf4j/LoggerFactory
| Reported by: | GerdP | Owned by: | Don-vip |
|---|---|---|---|
| Priority: | normal | Milestone: | 19.01 |
| Component: | Core | Version: | |
| Keywords: | regression spotbugs | Cc: | Don-vip |
Description
Tried to run ant spotbugs on josm core or plugin pbf.
See also ticket:17187#comment:12
I see this log:
C:\josm\core>ant spotbugs
Buildfile: C:\josm\core\build.xml
init-properties:
init:
javacc:
compile-cots:
[javac] Compiling 17 source files to C:\josm\core\build
compile-jmapviewer:
compile:
[javac] Compiling 120 source files to C:\josm\core\build
init-svn-revision-xml:
init-git-revision-xml:
create-revision:
[delete] Deleting: C:\josm\core\REVISION.XML
check-schemas:
epsg-compile:
epsg:
dist:
[echo] Revision 14698
[delete] Deleting: C:\josm\core\dist\josm-custom.jar
[jar] Building jar: C:\josm\core\dist\josm-custom.jar
spotbugs:
[spotbugs] Executing SpotBugs FindBugsTask from ant task
[spotbugs] Running SpotBugs...
[spotbugs] java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
[spotbugs] at edu.umd.cs.findbugs.Version.<clinit>(Version.java:38)
[spotbugs] at edu.umd.cs.findbugs.Plugin.<init>(Plugin.java:119)
[spotbugs] at edu.umd.cs.findbugs.PluginLoader.constructMinimalPlugin(PluginLoader.java:1113)
[spotbugs] at edu.umd.cs.findbugs.PluginLoader.init(PluginLoader.java:714)
[spotbugs] at edu.umd.cs.findbugs.PluginLoader.<init>(PluginLoader.java:396)
[spotbugs] at edu.umd.cs.findbugs.PluginLoader.loadCorePlugin(PluginLoader.java:1478)
[spotbugs] at edu.umd.cs.findbugs.PluginLoader.loadInitialPlugins(PluginLoader.java:1432)
[spotbugs] at edu.umd.cs.findbugs.PluginLoader.<clinit>(PluginLoader.java:150)
[spotbugs] at edu.umd.cs.findbugs.DetectorFactoryCollection.getCoreResource(DetectorFactoryCollection.java:351)
[spotbugs] at edu.umd.cs.findbugs.SystemProperties.loadPropertiesFromConfigFile(SystemProperties.java:77)
[spotbugs] at edu.umd.cs.findbugs.SystemProperties.<clinit>(SystemProperties.java:60)
[spotbugs] at edu.umd.cs.findbugs.FindBugs2.<clinit>(FindBugs2.java:86)
[spotbugs] Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
[spotbugs] at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
[spotbugs] at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
[spotbugs] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
[spotbugs] at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[spotbugs] ... 12 more
[spotbugs] Exception in thread "main"
[spotbugs] Java Result: 1
[spotbugs] Output saved to spotbugs-josm.xml
BUILD SUCCESSFUL
Total time: 8 seconds
C:\josm\core>
Attachments (0)
Change History (9)
comment:1 by , 7 years ago
comment:2 by , 7 years ago
Same problem on Jenkins, see https://josm.openstreetmap.de/jenkins/job/JOSM-Plugins/jdk=JDK8/1476/console
comment:3 by , 7 years ago
| Cc: | added |
|---|
comment:4 by , 7 years ago
| Milestone: | → 19.01 |
|---|---|
| Owner: | changed from to |
| Status: | new → assigned |
comment:6 by , 7 years ago
| Keywords: | regression spotbugs added |
|---|
comment:7 by , 7 years ago
Thanks, seems to work again. One more question: How do I configure a sonarlint Eclipse plugin to produce the same results as those that are presented by Jenkins?
comment:8 by , 7 years ago
See https://www.sonarlint.org/eclipse/#eclipse-connected-mode You need to tell the Eclipse plugin the URL of our SonarQube instance.
comment:9 by , 7 years ago
If I got that right I need a login to SonarQube for that. I tried with my Trac user+password but that did not work.



I've downloaded c:\Users\Gerd\Downloads\slf4j-1.8.0-beta2.zip from https://www.slf4j.org/download.html
and extracted slf4j-api-1.8.0-beta2.jar. After copying this into the two spotbugs directories
ant spotbugs works again:
Should I commit this?