Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-7932

Findbugs messes with the XML parser causing M2 builds to fail

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • findbugs-plugin
    • None
    • Static Analysis Collector Plug: 1.8
      Static Analysis Utilities: 1.14
      FindBugs Plug-in: 4.14
      Hudson: 1.381

      The Findbugs plugin sets the system varaible to the a non standard sax parser.

      It helpfully adds the sax parser to its context classpath.

      When some part of a maven build wishes to use a sax parser it blows up as it can not load the non-existent sax parser.

      Findbugs should not set the sax parser and use whatever is returned using the standard JDK APIs.

      INFO] Generating "Project Summary" report.
      [INFO] Generating "About" report.
      [INFO] Generating "FindBugs Report" report.
      [INFO] Using source root:
      [INFO] /home/hudson/data/workspace/xxx-app_full/trunk/xxx-app-common/xxx-app-common-core/target/classes
      [INFO] Using test source root:
      [INFO] /home/hudson/data/workspace/xxx-app_full/trunk/xxx-app-common/xxx-app-common-core/target/test-classes
      [INFO] Using maximum effort.
      [INFO] Adding Source Directory: /home/hudson/data/workspace/xxx-app_full/trunk/xxx-app-common/vam-app-common-core/src/main/java
      [INFO] Using low threshold.
      [INFO] Using FindBugs Version: 1.3.7
      [INFO] Using low threshold.
      [INFO] Using low threshold.
      [INFO] Using low threshold.
      [INFO] Using the xdoc format
      [INFO] Using maximum effort.
      [INFO] Using low threshold.
      [INFO] Using low threshold.
      [INFO] Debugging is Off
      [INFO] No bug include filter.
      [INFO] Using bug exclude filter /tmp/plexus-resources178441232tmp
      [INFO] ------------------------------------------------------------------------
      [ERROR] FATAL ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] A java source file could not be added

      Embedded error: SAX2 driver class org.apache.xerces.parsers.SAXParser not found
      [INFO] ------------------------------------------------------------------------
      [INFO] Trace
      java.lang.reflect.UndeclaredThrowableException
      at $Proxy10.generate(Unknown Source)
      at org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:139)
      at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:303)
      at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:135)
      at org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:133)
      at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:100)
      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
      at hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:182)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
      at org.apache.maven.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:65)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
      at hudson.maven.agent.Main.launch(Main.java:165)
      at hudson.maven.MavenBuilder.call(MavenBuilder.java:165)
      at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:694)
      at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:638)
      at hudson.remoting.UserRequest.perform(UserRequest.java:114)
      at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      at hudson.remoting.Request$2.run(Request.java:270)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: org.apache.maven.plugin.MojoExecutionException: A java source file could not be added
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      at org.codehaus.groovy.runtime.MetaClassHelper.doConstructorInvoke(MetaClassHelper.java:535)
      at groovy.lang.MetaClassImpl.doConstructorInvoke(MetaClassImpl.java:2356)
      at groovy.lang.MetaClassImpl.invokeConstructor(MetaClassImpl.java:1255)
      at groovy.lang.MetaClassImpl.invokeConstructor(MetaClassImpl.java:1185)
      at org.codehaus.groovy.runtime.InvokerHelper.invokeConstructorOf(InvokerHelper.java:809)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNewN(ScriptBytecodeAdapter.java:230)
      at org.codehaus.mojo.findbugs.FindBugsMojo.fail(FindBugsMojo.groovy:1187)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
      at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:912)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN(ScriptBytecodeAdapter.java:78)
      at org.codehaus.mojo.findbugs.FindBugsMojo.executeReport(FindBugsMojo.groovy:771)
      at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:101)
      at sun.reflect.GeneratedMethodAccessor72.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at hudson.maven.agent.ComponentInterceptor.invoke(ComponentInterceptor.java:47)
      at hudson.maven.agent.PluginManagerInterceptor$3.invoke(PluginManagerInterceptor.java:229)
      ... 37 more
      Caused by: java.io.IOException: SAX2 driver class org.apache.xerces.parsers.SAXParser not found
      at edu.umd.cs.findbugs.filter.Filter.<init>(Filter.java:128)
      at edu.umd.cs.findbugs.FindBugs.configureFilter(FindBugs.java:389)
      at edu.umd.cs.findbugs.FindBugs2.addFilter(FindBugs2.java:314)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
      at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:912)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:756)
      at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:778)
      at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:758)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:170)
      at org.codehaus.mojo.findbugs.FindBugsMojo.addFiltersToFindBugs(FindBugsMojo.groovy:564)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
      at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:912)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN(ScriptBytecodeAdapter.java:78)
      at org.codehaus.mojo.findbugs.FindBugsMojo.initialiseFindBugs(FindBugsMojo.groovy:1063)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
      at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:912)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN(ScriptBytecodeAdapter.java:78)
      at org.codehaus.mojo.findbugs.FindBugsMojo.executeReport(FindBugsMojo.groovy:767)
      ... 43 more
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 5 minutes 11 seconds
      [INFO] Finished at: Tue Oct 26 22:13:35 UTC 2010
      [INFO] Final Memory: 120M/254M
      [INFO] ------------------------------------------------------------------------

            drulli Ulli Hafner
            teilo James Nord
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: