[ http://jira.codehaus.org/browse/MSUREFIRE-14?page=all ]

Maria Odea Ching moved MNG-1172 to MSUREFIRE-14:
------------------------------------------------

      Version:     (was: 2.0-beta-3)
    Component:     (was: maven-surefire-plugin)
     Workflow: jira  (was: Maven)
          Key: MSUREFIRE-14  (was: MNG-1172)
      Project: Maven 2.x Surefire Plugin  (was: Maven 2)

> class loading / xerces
> ----------------------
>
>          Key: MSUREFIRE-14
>          URL: http://jira.codehaus.org/browse/MSUREFIRE-14
>      Project: Maven 2.x Surefire Plugin
>         Type: Bug

>  Environment: maven-2-beta-3, jdk 5.0.0_4, winXP SP2
>     Reporter: Dirk Sturzebecher
>     Assignee: Brett Porter

>
>
> I have two tests in one test class. Both read a csv file and check for 
> certain attributes. Both tests run ok outside maven. In maven the first test 
> fails, the second (ordered by execution sequence) is ok. That is, if I do 
> understand the output correctly. The output in surefire-reports is:
> -------------------------------------------------------------------------------
> Battery: de.dst.money.stock.StockPluginTest
> -------------------------------------------------------------------------------
> testDoImport01(de.dst.money.stock.StockPluginTest)
> [ stdout ] ---------------------------------------------------------------
> [ stderr ] ---------------------------------------------------------------
> [ stacktrace ] -----------------------------------------------------------
> javax.xml.parsers.FactoryConfigurationError: Provider 
> org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found
>       at 
> javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:145)
>       at 
> de.dst.money.framework.model.persistence.xml.XMLUtil.loadDocument(XMLUtil.java:64)
>       at 
> de.dst.money.framework.model.persistence.xml.XMLPersistenceManager.loadDocument(XMLPersistenceManager.java:82)
>       at de.dst.money.stock.StockPlugin.load(StockPlugin.java:97)
>       at de.dst.money.stock.StockPlugin.getModel(StockPlugin.java:87)
>       at 
> de.dst.money.stock.StockPluginTest.testDoImport01(StockPluginTest.java:35)
>       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:585)
>       at junit.framework.TestCase.runTest(TestCase.java:154)
>       at junit.framework.TestCase.runBare(TestCase.java:127)
>       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.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:585)
>       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:203)
>       at org.codehaus.surefire.Surefire.run(Surefire.java:152)
>       at org.codehaus.surefire.Surefire.run(Surefire.java:76)
>       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:585)
>       at org.codehaus.surefire.SurefireBooter.run(SurefireBooter.java:104)
>       at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:229)
>       at 
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:417)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:554)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:508)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:494)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:307)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:149)
>       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:217)
>       at org.apache.maven.cli.MavenCli.main(MavenCli.java:247)
>       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:585)
>       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)
> testDoImport02(de.dst.money.stock.StockPluginTest)
> Is it a classloader issue? Why does it try to get xerces? I checked if I can 
> configure jdk 1.5 for the tests, but did not find an option. But as the code 
> contains generics it should be using the 1.5 jdk anyway... 
> Or is it a problem with some jaxp.properties loaded by maven? Does maven use 
> xerces? If so, the problem might go away if the test would be forked. But 
> that can't be done in beta 3, correct?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to