maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lammert Westerhoff (JIRA)" <j...@codehaus.org>
Subject [jira] Commented: (MRELEASE-140) Tests fail during release:perform but work elsewhere
Date Mon, 24 Nov 2008 10:51:19 GMT

    [ http://jira.codehaus.org/browse/MRELEASE-140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=155201#action_155201
] 

Lammert Westerhoff commented on MRELEASE-140:
---------------------------------------------

I have not been able to reproduce this bug in a smaller project. My project looks similar
to this:

Project X with modules A, B and C.
Module A depends on module B (compile scope).
Module B depends on module C (compile scope) and module C with classifier 'tests' (test scope).

Now in module A, the test fails that is using a class from C. It cannot find the class from
C.


I did find a (quite simple) work around for this. Switching the order of the C and C-tests
dependencies around works. So instead of C and then C-tests I now defined first C-tests and
then C (within the same pom in the dependencies structure).

> Tests fail during release:perform but work elsewhere
> ----------------------------------------------------
>
>                 Key: MRELEASE-140
>                 URL: http://jira.codehaus.org/browse/MRELEASE-140
>             Project: Maven 2.x Release Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0-beta-4
>         Environment: Maven 2.0.4. Linux 
>            Reporter: Adrian
>            Priority: Blocker
>         Attachments: com.dolby.pics.core.ejb.bean.CountryBeanTestCase.txt, perform-output,
TEST-com.dolby.pics.core.ejb.bean.CountryBeanTestCase.xml, WORKING-TEST-com.dolby.pics.core.ejb.bean.CountryBeanTestCase.xml
>
>
> h2. Summary
> I have a project that builds successfully when {{mvn clean install}} is executed.
> When {{mvn clean release:prepare}} is executed the integration tests run successfully
too.
> When {{mvn release:perform}} is executed the junit tests using surefire fail.
> h2. Details
> h3. The project layout
> The project is an EJB 3 project. The unit tests bootstrap/startup an embedded EJB container
to test the EJBs. The container is configured via a set of xml and property files that are
specified in the testResources section of the pom. The embedded container is a dependency
of the project with _test_ scope.
> h3. release:perform output
> The output of the release:perform goal is attached to this issue.
> h3. surefire junit test report
> The output of the release:perform goal is attached to this issue. A snippet is shown
here:
> {code}
> -------------------------------------------------------------------------------
> Battery: com.dolby.pics.core.ejb.bean.CountryBeanTestCase
> -------------------------------------------------------------------------------
> Tests run: 11, Failures: 0, Errors: 11, Time elapsed: 7.234 sec 
> testGetAll(com.dolby.pics.core.ejb.bean.CountryBeanTestCase)  Time elapsed: 2.255 sec
 <<< ERROR!
> [ stdout ] ---------------------------------------------------------------
> [ stderr ] ---------------------------------------------------------------
> [ stacktrace ] -----------------------------------------------------------
> java.lang.RuntimeException: org.jboss.xb.binding.JBossXBRuntimeException: Failed to create
a new SAX parser
> 	at org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.boot(EJB3StandaloneBootstrap.java:391)
> 	at com.dolby.pics.test.AbstractEJBTestCase.startupEmbeddedJboss(AbstractEJBTestCase.java:63)
> 	at com.dolby.pics.test.AbstractEJBTestCase.setUp(AbstractEJBTestCase.java:145)
> 	at com.dolby.pics.core.ejb.bean.CountryBeanTestCase.setUp(CountryBeanTestCase.java:43)
> 	at junit.framework.TestCase.runBare(TestCase.java:128)
> 	at junit.framework.TestResult$1.protect(TestResult.java:110)
> 	at junit.framework.TestResult.runProtected(TestResult.java:128)
> 	at junit.framework.TestResult.run(TestResult.java:113)
> 	at junit.framework.TestCase.run(TestCase.java:120)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:228)
> 	at junit.framework.TestSuite.run(TestSuite.java:223)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at org.apache.maven.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.java:242)
> 	at org.apache.maven.surefire.battery.JUnitBattery.execute(JUnitBattery.java:216)
> 	at org.apache.maven.surefire.Surefire.executeBattery(Surefire.java:215)
> 	at org.apache.maven.surefire.Surefire.run(Surefire.java:163)
> 	at org.apache.maven.surefire.Surefire.run(Surefire.java:87)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at org.apache.maven.surefire.SurefireBooter.runTestsInProcess(SurefireBooter.java:313)
> 	at org.apache.maven.surefire.SurefireBooter.run(SurefireBooter.java:221)
> 	at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:371)
> 	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
> 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
> 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
> 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	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)
> Caused by: org.jboss.xb.binding.JBossXBRuntimeException: Failed to create a new SAX parser
> 	at org.jboss.xb.binding.UnmarshallerFactory$UnmarshallerFactoryImpl.newUnmarshaller(UnmarshallerFactory.java:100)
> 	at org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer.deploy(BeanXMLDeployer.java:84)
> 	at org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.boot(EJB3StandaloneBootstrap.java:380)
> 	... 44 more
> Caused by: org.jboss.xb.binding.JBossXBException: Failed to create a new SAX parser
> 	at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.<init>(SaxJBossXBParser.java:69)
> 	at org.jboss.xb.binding.UnmarshallerImpl.<init>(UnmarshallerImpl.java:55)
> 	at org.jboss.xb.binding.UnmarshallerFactory$UnmarshallerFactoryImpl.newUnmarshaller(UnmarshallerFactory.java:96)
> 	... 46 more
> Caused by: javax.xml.parsers.ParserConfigurationException: validation is not supported
> 	at org.gjt.xpp.jaxp11.SAXParserFactoryImpl.newSAXParser(SAXParserFactoryImpl.java:100)
> 	at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.<init>(SaxJBossXBParser.java:65)
> 	... 48 more
> {code}
> I would guess the problem is regarding something not on the class path when the tests
run within release:perform, but I am not sure. This is a eral blocker as we cannot release
a working project.

-- 
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

        

Mime
View raw message