You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Dirk Sturzebecher (JIRA)" <ji...@codehaus.org> on 2005/10/12 19:46:12 UTC

[jira] Commented: (MNG-1172) class loading / xerces

    [ http://jira.codehaus.org/browse/MNG-1172?page=comments#action_48448 ] 

Dirk Sturzebecher commented on MNG-1172:
----------------------------------------

I don't use xerces. JDK 5.0 does not use xerces. Only maven or one of the plugins can set the property! The error as such is ok, as there is really no xerces in the project, thus it is ok that it is not found. But why does the jdk assume that xml is done via xerces?

Without maven the tests run fine, no problem. The xml in the JDK 5.0 is used.

But something in the maven environment configures for the use of xerces.

It worked in maven 1. 

Very strange! Any ideas? I would hate to go back.

the traget is: clean:clean package site:site 

> class loading / xerces
> ----------------------
>
>          Key: MNG-1172
>          URL: http://jira.codehaus.org/browse/MNG-1172
>      Project: Maven 2
>         Type: Bug
>   Components: maven-surefire-plugin
>     Versions: 2.0-beta-3
>  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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org