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

The FindBugs plugin can't find the SAXParser under certain circumstances

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Component/s: findbugs-plugin
    • Labels:
      None
    • Environment:
      Hudson 1.362
      FindBugs plugin 4.10
      Maven findbugs-maven-plugin 2.0.1
    • Similar Issues:

      Description

      We've changed some things in a project of ours (authentication) in order to use an XML catalog.
      Since we've done that, I get the following error when building this project:

      [FINDBUGS] Parsing of file /ige/hudson/work/jobs/auth/workspace/auth-api/target/findbugsXml.xml failed due to an exception:

      org.dom4j.DocumentException: Sax error Nested exception: SAX2 driver class org.apache.xerces.parsers.SAXParser not found
      at edu.umd.cs.findbugs.SortedBugCollection.doReadXML(SortedBugCollection.java:279)
      at edu.umd.cs.findbugs.SortedBugCollection.readXML(SortedBugCollection.java:263)
      at hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:193)
      at hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:129)
      at hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:89)
      at hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:152)
      at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:131)
      at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:87)
      at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:28)
      at hudson.FilePath.act(FilePath.java:753)
      at hudson.FilePath.act(FilePath.java:735)
      at hudson.plugins.findbugs.FindBugsReporter.perform(FindBugsReporter.java:123)
      at hudson.plugins.analysis.core.HealthAwareMavenReporter.postExecute(HealthAwareMavenReporter.java:197)
      at hudson.maven.MavenModuleSetBuild$Builder.postExecute(MavenModuleSetBuild.java:757)
      at hudson.maven.MavenBuilder$Adapter.postExecute(MavenBuilder.java:293)
      at hudson.maven.agent.PluginManagerInterceptor$1MojoIntercepterImpl.callPost(PluginManagerInterceptor.java:170)
      at hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:183)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:540)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:519)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:332)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181)
      at org.apache.maven.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:65)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
      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:696)
      at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:640)
      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: java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser
      at org.xml.sax.helpers.XMLReaderFactory.loadClass(XMLReaderFactory.java:189)
      at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:150)
      at edu.umd.cs.findbugs.SortedBugCollection.doReadXML(SortedBugCollection.java:276)
      ... 45 more
      Caused by: java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser
      at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
      at org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195)
      at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:255)
      at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:274)
      at org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:214)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
      at org.xml.sax.helpers.NewInstance.newInstance(NewInstance.java:49)
      at org.xml.sax.helpers.XMLReaderFactory.loadClass(XMLReaderFactory.java:187)
      ... 47 more
      Nested exception:
      java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser
      at org.xml.sax.helpers.XMLReaderFactory.loadClass(XMLReaderFactory.java:189)
      at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:150)
      at edu.umd.cs.findbugs.SortedBugCollection.doReadXML(SortedBugCollection.java:276)
      at edu.umd.cs.findbugs.SortedBugCollection.readXML(SortedBugCollection.java:263)
      at hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:193)
      at hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:129)
      at hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:89)
      at hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:152)
      at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:131)
      at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:87)
      at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:28)
      at hudson.FilePath.act(FilePath.java:753)
      at hudson.FilePath.act(FilePath.java:735)
      at hudson.plugins.findbugs.FindBugsReporter.perform(FindBugsReporter.java:123)
      at hudson.plugins.analysis.core.HealthAwareMavenReporter.postExecute(HealthAwareMavenReporter.java:197)
      at hudson.maven.MavenModuleSetBuild$Builder.postExecute(MavenModuleSetBuild.java:757)
      at hudson.maven.MavenBuilder$Adapter.postExecute(MavenBuilder.java:293)
      at hudson.maven.agent.PluginManagerInterceptor$1MojoIntercepterImpl.callPost(PluginManagerInterceptor.java:170)
      at hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:183)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:540)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:519)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:332)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181)
      at org.apache.maven.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:65)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
      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:696)
      at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:640)
      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: java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser
      at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
      at org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195)
      at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:255)
      at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:274)
      at org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:214)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
      at org.xml.sax.helpers.NewInstance.newInstance(NewInstance.java:49)
      at org.xml.sax.helpers.XMLReaderFactory.loadClass(XMLReaderFactory.java:187)
      ... 47 more

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in hudson
            User: : drulli
            Path:
            trunk/hudson/plugins/findbugs/plugin/src/test/java/hudson/plugins/findbugs/parser/FindBugsParserTest.java
            trunk/hudson/plugins/findbugs/plugin/src/test/resources/hudson/plugins/findbugs/parser/issue7312.xml
            http://jenkins-ci.org/commit/34145
            Log:
            JENKINS-7312 Added test case.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : drulli Path: trunk/hudson/plugins/findbugs/plugin/src/test/java/hudson/plugins/findbugs/parser/FindBugsParserTest.java trunk/hudson/plugins/findbugs/plugin/src/test/resources/hudson/plugins/findbugs/parser/issue7312.xml http://jenkins-ci.org/commit/34145 Log: JENKINS-7312 Added test case.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in hudson
            User: : drulli
            Path:
            trunk/hudson/plugins/findbugs/plugin/pom.xml
            trunk/hudson/plugins/findbugs/plugin/src/main/java/hudson/plugins/findbugs/parser/FindBugsParser.java
            trunk/hudson/plugins/findbugs/plugin/src/test/java/hudson/plugins/findbugs/parser/FindBugsParserTest.java
            http://jenkins-ci.org/commit/34146
            Log:
            [FIXED JENKINS-7312] Added dependency to Xerces and set system property "org.xml.sax.driver".

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : drulli Path: trunk/hudson/plugins/findbugs/plugin/pom.xml trunk/hudson/plugins/findbugs/plugin/src/main/java/hudson/plugins/findbugs/parser/FindBugsParser.java trunk/hudson/plugins/findbugs/plugin/src/test/java/hudson/plugins/findbugs/parser/FindBugsParserTest.java http://jenkins-ci.org/commit/34146 Log: [FIXED JENKINS-7312] Added dependency to Xerces and set system property "org.xml.sax.driver".
            Hide
            drulli Ulli Hafner added a comment -

            Integrated in Hudson Plug-ins (Compile) #46
            [FIXED JENKINS-7312] Added dependency to Xerces and set system property "org.xml.sax.driver".
            JENKINS-7312 Added test case.

            Show
            drulli Ulli Hafner added a comment - Integrated in Hudson Plug-ins (Compile) #46 [FIXED JENKINS-7312] Added dependency to Xerces and set system property "org.xml.sax.driver". JENKINS-7312 Added test case.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in hudson
            User: : drulli
            Path:
            trunk/hudson/plugins/findbugs/plugin/clean.sh
            trunk/hudson/plugins/findbugs/plugin/src/main/java/hudson/plugins/findbugs/parser/FindBugsParser.java
            http://jenkins-ci.org/commit/35056
            Log:
            JENKINS-7312 Set context classloader to plugin classloader in order to correctly instantiate the Xerces SAX parser.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : drulli Path: trunk/hudson/plugins/findbugs/plugin/clean.sh trunk/hudson/plugins/findbugs/plugin/src/main/java/hudson/plugins/findbugs/parser/FindBugsParser.java http://jenkins-ci.org/commit/35056 Log: JENKINS-7312 Set context classloader to plugin classloader in order to correctly instantiate the Xerces SAX parser.
            Hide
            drulli Ulli Hafner added a comment -

            Integrated in Hudson Plug-ins (Compile) #59
            JENKINS-7312 Set context classloader to plugin classloader in order to correctly instantiate the Xerces SAX parser.

            Show
            drulli Ulli Hafner added a comment - Integrated in Hudson Plug-ins (Compile) #59 JENKINS-7312 Set context classloader to plugin classloader in order to correctly instantiate the Xerces SAX parser.

              People

              • Assignee:
                drulli Ulli Hafner
                Reporter:
                cristalp cristalp
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: