Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 years 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

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 GerdP, 6 years ago

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:

spotbugs:
 [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 http://www.slf4j.org/codes.html#noProviders 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 by stoecker, 6 years ago

Cc: Don-vip added

comment:4 by Don-vip, 6 years ago

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

comment:5 by Don-vip, 6 years ago

Resolution: fixed
Status: assignedclosed

In 14702/josm:

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

comment:6 by Don-vip, 6 years ago

Keywords: regression spotbugs added

comment:7 by GerdP, 6 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 Don-vip, 6 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 GerdP, 6 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.

Modify Ticket

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

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.