Opened 5 weeks ago

Closed 4 weeks ago

Last modified 4 weeks ago

#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


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




    [javac] Compiling 17 source files to C:\josm\core\build


    [javac] Compiling 120 source files to C:\josm\core\build



   [delete] Deleting: C:\josm\core\REVISION.XML




     [echo] Revision 14698
   [delete] Deleting: C:\josm\core\dist\josm-custom.jar
      [jar] Building jar: C:\josm\core\dist\josm-custom.jar

 [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>(
 [spotbugs]     at edu.umd.cs.findbugs.Plugin.<init>(
 [spotbugs]     at edu.umd.cs.findbugs.PluginLoader.constructMinimalPlugin(
 [spotbugs]     at edu.umd.cs.findbugs.PluginLoader.init(
 [spotbugs]     at edu.umd.cs.findbugs.PluginLoader.<init>(
 [spotbugs]     at edu.umd.cs.findbugs.PluginLoader.loadCorePlugin(
 [spotbugs]     at edu.umd.cs.findbugs.PluginLoader.loadInitialPlugins(
 [spotbugs]     at edu.umd.cs.findbugs.PluginLoader.<clinit>(
 [spotbugs]     at edu.umd.cs.findbugs.DetectorFactoryCollection.getCoreResource(
 [spotbugs]     at edu.umd.cs.findbugs.SystemProperties.loadPropertiesFromConfigFile(
 [spotbugs]     at edu.umd.cs.findbugs.SystemProperties.<clinit>(
 [spotbugs]     at edu.umd.cs.findbugs.FindBugs2.<clinit>(
 [spotbugs] Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
 [spotbugs]     at
 [spotbugs]     at java.lang.ClassLoader.loadClass(
 [spotbugs]     at sun.misc.Launcher$AppClassLoader.loadClass(
 [spotbugs]     at java.lang.ClassLoader.loadClass(
 [spotbugs]     ... 12 more
 [spotbugs] Exception in thread "main"
 [spotbugs] Java Result: 1
 [spotbugs] Output saved to spotbugs-josm.xml

Total time: 8 seconds


Attachments (0)

Change History (9)

comment:1 Changed 5 weeks ago by GerdP

I've downloaded c:\Users\Gerd\Downloads\ from
and extracted slf4j-api-1.8.0-beta2.jar. After copying this into the two spotbugs directories
ant spotbugs works again:

 [spotbugs] Executing SpotBugs FindBugsTask from ant task
 [spotbugs] Running SpotBugs...
 [spotbugs] SLF4J: No SLF4J providers were found.
 [spotbugs] SLF4J: Defaulting to no-operation (NOP) logger implementation
 [spotbugs] SLF4J: See for further details.
 [spotbugs] Calculating exit code...
 [spotbugs] Exit code set to: 0
 [spotbugs] Output saved to spotbugs-josm-o5m.xml

Should I commit this?

comment:3 Changed 4 weeks ago by stoecker

Cc: Don-vip added

comment:4 Changed 4 weeks ago by Don-vip

Milestone: 19.01
Owner: changed from team to Don-vip
Status: newassigned

comment:5 Changed 4 weeks ago by Don-vip

Resolution: fixed
Status: assignedclosed

In 14702/josm:

fix #17206 - add missing files for Spotbugs 3.1.10 (regression from r14604)

comment:6 Changed 4 weeks ago by Don-vip

Keywords: regression spotbugs added

comment:7 Changed 4 weeks ago by GerdP

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 Changed 4 weeks ago by Don-vip

See You need to tell the Eclipse plugin the URL of our SonarQube instance.

comment:9 Changed 4 weeks ago by GerdP

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.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Don-vip.
as The resolution will be set.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.