Agila
  1. Agila
  2. AGILA-24

Maven2 Test goal missing XML dependencies?

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Build
    • Labels:
      None
    • Environment:
      JDK 1.4 (at least)

      Description

      Attempting to run the new Maven2 build for the BPM module using goals like mvn install and mvn surefire:test causes a repeated error with the build output and stacktrace below. Applying the attached patch to the pom fixed the problem, though I don't know if there is another way to fix the issue within Maven2. I found no relevant links on google related to this problem in the context of maven or maven2. Before trying this dependency change I tried adding the same xml jars to <JAVA_HOME>/lib/endorsed with no effect.

      Sample end of build with stacktrace:

      Warning: Caught exception attempting to use SAX to load a SAX XMLReader
      Warning: Exception was: org.xml.sax.SAXException: Can't create default XMLReader
      ; is system property org.xml.sax.driver set?
      Warning: I will print the stack trace then carry on using the default SAX parser

      org.xml.sax.SAXException: Can't create default XMLReader; is system property org
      .xml.sax.driver set?
      at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(Unknown Source)
      at org.dom4j.io.SAXHelper.createXMLReader(SAXHelper.java:74)
      at org.dom4j.io.SAXReader.createXMLReader(SAXReader.java:647)
      at org.dom4j.io.SAXReader.getXMLReader(SAXReader.java:530)
      at org.dom4j.io.SAXReader.read(SAXReader.java:309)
      at org.dom4j.io.SAXReader.read(SAXReader.java:271)
      at org.apache.agila.util.XMLUtil.deserializeXML(XMLUtil.java:68)
      at org.apache.agila.util.XMLUtilTestCase.setUp(XMLUtilTestCase.java:152)

      at junit.framework.TestCase.runBare(TestCase.java:125)
      at junit.framework.TestResult$1.protect(TestResult.java:106)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.framework.TestResult.run(TestResult.java:109)
      at junit.framework.TestCase.run(TestCase.java:118)
      at junit.framework.TestSuite.runTest(TestSuite.java:208)
      at junit.framework.TestSuite.run(TestSuite.java:203)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.codehaus.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.
      java:246)
      at org.codehaus.surefire.battery.JUnitBattery.execute(JUnitBattery.java:
      220)
      at org.codehaus.surefire.Surefire.executeBattery(Surefire.java:204)
      at org.codehaus.surefire.Surefire.run(Surefire.java:153)
      at org.codehaus.surefire.Surefire.run(Surefire.java:77)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.codehaus.surefire.SurefireBooter.run(SurefireBooter.java:104)
      at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:303)

      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
      nManager.java:399)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
      ultLifecycleExecutor.java:519)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
      Goal(DefaultLifecycleExecutor.java:482)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
      ltLifecycleExecutor.java:452)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
      dleFailures(DefaultLifecycleExecutor.java:301)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
      ts(DefaultLifecycleExecutor.java:268)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
      fecycleExecutor.java:137)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:316)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:113)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
      org.dom4j.DocumentException: Could not initialize a SAX Parser. Please add a SAX
      parser to your classpath along with preferably jaxp.jar Nested exception: Could
      not initialize a SAX Parser. Please add a SAX parser to your classpath along wi
      th preferably jaxp.jar
      at org.dom4j.io.SAXReader.read(SAXReader.java:358)
      at org.dom4j.io.SAXReader.read(SAXReader.java:271)
      at org.apache.agila.util.XMLUtil.deserializeXML(XMLUtil.java:68)
      at org.apache.agila.util.XMLUtilTestCase.setUp(XMLUtilTestCase.java:152)

      at junit.framework.TestCase.runBare(TestCase.java:125)
      at junit.framework.TestResult$1.protect(TestResult.java:106)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.framework.TestResult.run(TestResult.java:109)
      at junit.framework.TestCase.run(TestCase.java:118)
      at junit.framework.TestSuite.runTest(TestSuite.java:208)
      at junit.framework.TestSuite.run(TestSuite.java:203)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.codehaus.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.
      java:246)
      at org.codehaus.surefire.battery.JUnitBattery.execute(JUnitBattery.java:
      220)
      at org.codehaus.surefire.Surefire.executeBattery(Surefire.java:204)
      at org.codehaus.surefire.Surefire.run(Surefire.java:153)
      at org.codehaus.surefire.Surefire.run(Surefire.java:77)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.codehaus.surefire.SurefireBooter.run(SurefireBooter.java:104)
      at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:303)

      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
      nManager.java:399)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
      ultLifecycleExecutor.java:519)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
      Goal(DefaultLifecycleExecutor.java:482)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
      ltLifecycleExecutor.java:452)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
      dleFailures(DefaultLifecycleExecutor.java:301)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
      ts(DefaultLifecycleExecutor.java:268)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
      fecycleExecutor.java:137)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:316)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:113)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
      Nested exception:
      org.xml.sax.SAXException: Could not initialize a SAX Parser. Please add a SAX pa
      rser to your classpath along with preferably jaxp.jar
      at org.dom4j.io.SAXHelper.createXMLReader(SAXHelper.java:100)
      at org.dom4j.io.SAXReader.createXMLReader(SAXReader.java:647)
      at org.dom4j.io.SAXReader.getXMLReader(SAXReader.java:530)
      at org.dom4j.io.SAXReader.read(SAXReader.java:309)
      at org.dom4j.io.SAXReader.read(SAXReader.java:271)
      at org.apache.agila.util.XMLUtil.deserializeXML(XMLUtil.java:68)
      at org.apache.agila.util.XMLUtilTestCase.setUp(XMLUtilTestCase.java:152)

      at junit.framework.TestCase.runBare(TestCase.java:125)
      at junit.framework.TestResult$1.protect(TestResult.java:106)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.framework.TestResult.run(TestResult.java:109)
      at junit.framework.TestCase.run(TestCase.java:118)
      at junit.framework.TestSuite.runTest(TestSuite.java:208)
      at junit.framework.TestSuite.run(TestSuite.java:203)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.codehaus.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.
      java:246)
      at org.codehaus.surefire.battery.JUnitBattery.execute(JUnitBattery.java:
      220)
      at org.codehaus.surefire.Surefire.executeBattery(Surefire.java:204)
      at org.codehaus.surefire.Surefire.run(Surefire.java:153)
      at org.codehaus.surefire.Surefire.run(Surefire.java:77)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.codehaus.surefire.SurefireBooter.run(SurefireBooter.java:104)
      at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:303)

      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
      nManager.java:399)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
      ultLifecycleExecutor.java:519)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
      Goal(DefaultLifecycleExecutor.java:482)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
      ltLifecycleExecutor.java:452)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
      dleFailures(DefaultLifecycleExecutor.java:301)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
      ts(DefaultLifecycleExecutor.java:268)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
      fecycleExecutor.java:137)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:316)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:113)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
      Nested exception: org.xml.sax.SAXException: Could not initialize a SAX Parser. P
      lease add a SAX parser to your classpath along with preferably jaxp.jar
      at org.dom4j.io.SAXHelper.createXMLReader(SAXHelper.java:100)
      at org.dom4j.io.SAXReader.createXMLReader(SAXReader.java:647)
      at org.dom4j.io.SAXReader.getXMLReader(SAXReader.java:530)
      at org.dom4j.io.SAXReader.read(SAXReader.java:309)
      at org.dom4j.io.SAXReader.read(SAXReader.java:271)
      at org.apache.agila.util.XMLUtil.deserializeXML(XMLUtil.java:68)
      at org.apache.agila.util.XMLUtilTestCase.setUp(XMLUtilTestCase.java:152)

      at junit.framework.TestCase.runBare(TestCase.java:125)
      at junit.framework.TestResult$1.protect(TestResult.java:106)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.framework.TestResult.run(TestResult.java:109)
      at junit.framework.TestCase.run(TestCase.java:118)
      at junit.framework.TestSuite.runTest(TestSuite.java:208)
      at junit.framework.TestSuite.run(TestSuite.java:203)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.codehaus.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.
      java:246)
      at org.codehaus.surefire.battery.JUnitBattery.execute(JUnitBattery.java:
      220)
      at org.codehaus.surefire.Surefire.executeBattery(Surefire.java:204)
      at org.codehaus.surefire.Surefire.run(Surefire.java:153)
      at org.codehaus.surefire.Surefire.run(Surefire.java:77)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.codehaus.surefire.SurefireBooter.run(SurefireBooter.java:104)
      at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:303)

      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
      nManager.java:399)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
      ultLifecycleExecutor.java:519)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
      Goal(DefaultLifecycleExecutor.java:482)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
      ltLifecycleExecutor.java:452)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
      dleFailures(DefaultLifecycleExecutor.java:301)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
      ts(DefaultLifecycleExecutor.java:268)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
      fecycleExecutor.java:137)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:316)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:113)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
      [surefire] Running org.apache.agila.util.XMLUtilTestCase
      [surefire] Tests run: 9, Failures: 7, Errors: 1, Time elapsed: 0.187 sec <<<<<<<
      < FAILURE !!

      Results :
      [surefire] Tests run: 107, Failures: 7, Errors: 22

      1. pom.patch
        0.7 kB
        Geoff Howard

        Activity

        Geoff Howard created issue -
        Geoff Howard made changes -
        Field Original Value New Value
        Attachment pom.patch [ 12320843 ]
        Chris Lim made changes -
        Assignee Chris Lim [ clim ]
        Chris Lim made changes -
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Geoff Howard made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Chris Lim
            Reporter:
            Geoff Howard
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development