You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Tim Waters <ti...@gmail.com> on 2005/12/09 03:43:05 UTC
surefire forking needed?
Hi,
I'm having trouble with Maven when using CORBA. I have a unit test which
uses a third-party re-implementation of a java class
(org/omg/CORBA/portable/Streamable). I've seen discussion in the past for
Ant-- that this type of problem is resolved by setting "fork" equal to
"true", however what I understand to be the equivalent in Maven 2.0 does not
seem to help. When I execute the junit test with a classpath that reflects
exactly my pom.xml for this file (i.e., without Maven) I do not see this
problem.
The class that Junit is choking on is: org/omg/CORBA/portable/Streamable
which is defined in 2 places, both are which part of the classpath:
Defined in './jre/lib/rt.jar'.
Defined in './omg/1.2/omg-1.2.jar'.
So if I execute the following:
mvn -Dsurefire.forkMode=once -Dsurefire.useFile=false test
I see this stack trace:
java.lang.LinkageError: loader constraints violated when linking
org/omg/CORBA/portable/Streamable class
at com.iona.corba.art.artimpl.ORBSingleton.create_any(Unknown
Source)
at
com.iona.corba.art.configuration.art_config_common.ConfigSource.create_data(Unknown
Source)
at
com.iona.corba.art.configuration.art_config_common.ConfigSource.addVariableToScope(Unknown
Source)
at
com.iona.corba.art.configuration.art_config_common.ConfigSource.createVariable(Unknown
Source)
at
com.iona.corba.art.configuration.art_config_common.ConfigSource.nodifyStatement(Unknown
Source)
at
com.iona.corba.art.configuration.art_config_args.ConfigArgs.readConfigSource(Unknown
Source)
at
com.iona.corba.art.configuration.art_config_args.ConfigArgs.readConfigSource(Unknown
Source)
at
com.iona.corba.art.configuration.art_config_args.ArtConfigArgPlugInImpl.get_repository(Unknown
Source)
at com.iona.corba.art.artimpl.ORBDelegate.set_parameters(Unknown
Source)
at com.iona.corba.art.artimpl.ORBImpl.set_parameters(Unknown
Source)
at org.omg.CORBA.ORB.init(ORB.java:337)
at baex.corba.CORBAHelper.<init>(CORBAHelper.java:43)
at baex.ds.adapter.StagingAreaAdapterTest.setUp(
StagingAreaAdapterTest.java:100)
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.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: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(
DelegatingMethodAccessorImpl.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(
DefaultPluginManager.java:399)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
DefaultLifecycleExecutor.java:519)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
(DefaultLifecycleExecutor.java:469)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
DefaultLifecycleExecutor.java:448)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
(DefaultLifecycleExecutor.java:301)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java:268)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
DefaultLifecycleExecutor.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(
DelegatingMethodAccessorImpl.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)
Does anyone know how to resolve this type of problem with Maven 2.0?
Thanks!
Re: surefire forking needed?
Posted by Brett Porter <br...@gmail.com>.
We have surefire forking 90% working in a testing version (see
instructions on the website for how to test dev versions of plugins)
- Brett
On 12/9/05, Tim Waters <ti...@gmail.com> wrote:
> Actually, we do not having forking available, so the "-
> Dsurefire.forkMode=once" flag is not applicable for our version of Maven 2.0.
> Going to patch surefire soon. I'll respond to this thread if the patch
> works.
>
> On 12/8/05, Tim Waters <ti...@gmail.com> wrote:
> >
> > Hi,
> >
> > I'm having trouble with Maven when using CORBA. I have a unit test which
> > uses a third-party re-implementation of a java class
> > (org/omg/CORBA/portable/Streamable). I've seen discussion in the past for
> > Ant-- that this type of problem is resolved by setting "fork" equal to
> > "true", however what I understand to be the equivalent in Maven 2.0 does
> > not seem to help. When I execute the junit test with a classpath that
> > reflects exactly my pom.xml for this file (i.e., without Maven) I do not
> > see this problem.
> >
> > The class that Junit is choking on is: org/omg/CORBA/portable/Streamable
> > which is defined in 2 places, both are which part of the classpath:
> > Defined in './jre/lib/rt.jar'.
> > Defined in './omg/1.2/omg-1.2.jar'.
> >
> > So if I execute the following:
> >
> > mvn -Dsurefire.forkMode=once -Dsurefire.useFile=false test
> >
> > I see this stack trace:
> >
> > java.lang.LinkageError: loader constraints violated when linking
> > org/omg/CORBA/portable/Streamable class
> > at com.iona.corba.art.artimpl.ORBSingleton.create_any(Unknown
> > Source)
> > at
> > com.iona.corba.art.configuration.art_config_common.ConfigSource.create_data(Unknown
> > Source)
> > at
> > com.iona.corba.art.configuration.art_config_common.ConfigSource.addVariableToScope(Unknown
> > Source)
> > at
> > com.iona.corba.art.configuration.art_config_common.ConfigSource.createVariable(Unknown
> > Source)
> > at
> > com.iona.corba.art.configuration.art_config_common.ConfigSource.nodifyStatement(Unknown
> > Source)
> > at
> > com.iona.corba.art.configuration.art_config_args.ConfigArgs.readConfigSource(Unknown
> > Source)
> > at
> > com.iona.corba.art.configuration.art_config_args.ConfigArgs.readConfigSource(Unknown
> > Source)
> > at
> > com.iona.corba.art.configuration.art_config_args.ArtConfigArgPlugInImpl.get_repository(Unknown
> > Source)
> > at com.iona.corba.art.artimpl.ORBDelegate.set_parameters(Unknown
> > Source)
> > at com.iona.corba.art.artimpl.ORBImpl.set_parameters(Unknown
> > Source)
> > at org.omg.CORBA.ORB.init(ORB.java:337)
> > at baex.corba.CORBAHelper.<init>(CORBAHelper.java:43)
> > at baex.ds.adapter.StagingAreaAdapterTest.setUp(
> > StagingAreaAdapterTest.java:100)
> > 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.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: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(
> > DelegatingMethodAccessorImpl.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(
> > DefaultPluginManager.java:399)
> > at
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> > DefaultLifecycleExecutor.java:519)
> > at
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
> > (DefaultLifecycleExecutor.java:469)
> > at
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
> > DefaultLifecycleExecutor.java:448)
> > at
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
> > (DefaultLifecycleExecutor.java:301)
> > at
> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
> > DefaultLifecycleExecutor.java:268)
> > at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute
> > (DefaultLifecycleExecutor.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(
> > DelegatingMethodAccessorImpl.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)
> >
> > Does anyone know how to resolve this type of problem with Maven 2.0?
> >
> > Thanks!
> >
> >
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: surefire forking needed?
Posted by Tim Waters <ti...@gmail.com>.
Actually, we do not having forking available, so the "-
Dsurefire.forkMode=once" flag is not applicable for our version of Maven 2.0.
Going to patch surefire soon. I'll respond to this thread if the patch
works.
On 12/8/05, Tim Waters <ti...@gmail.com> wrote:
>
> Hi,
>
> I'm having trouble with Maven when using CORBA. I have a unit test which
> uses a third-party re-implementation of a java class
> (org/omg/CORBA/portable/Streamable). I've seen discussion in the past for
> Ant-- that this type of problem is resolved by setting "fork" equal to
> "true", however what I understand to be the equivalent in Maven 2.0 does
> not seem to help. When I execute the junit test with a classpath that
> reflects exactly my pom.xml for this file (i.e., without Maven) I do not
> see this problem.
>
> The class that Junit is choking on is: org/omg/CORBA/portable/Streamable
> which is defined in 2 places, both are which part of the classpath:
> Defined in './jre/lib/rt.jar'.
> Defined in './omg/1.2/omg-1.2.jar'.
>
> So if I execute the following:
>
> mvn -Dsurefire.forkMode=once -Dsurefire.useFile=false test
>
> I see this stack trace:
>
> java.lang.LinkageError: loader constraints violated when linking
> org/omg/CORBA/portable/Streamable class
> at com.iona.corba.art.artimpl.ORBSingleton.create_any(Unknown
> Source)
> at
> com.iona.corba.art.configuration.art_config_common.ConfigSource.create_data(Unknown
> Source)
> at
> com.iona.corba.art.configuration.art_config_common.ConfigSource.addVariableToScope(Unknown
> Source)
> at
> com.iona.corba.art.configuration.art_config_common.ConfigSource.createVariable(Unknown
> Source)
> at
> com.iona.corba.art.configuration.art_config_common.ConfigSource.nodifyStatement(Unknown
> Source)
> at
> com.iona.corba.art.configuration.art_config_args.ConfigArgs.readConfigSource(Unknown
> Source)
> at
> com.iona.corba.art.configuration.art_config_args.ConfigArgs.readConfigSource(Unknown
> Source)
> at
> com.iona.corba.art.configuration.art_config_args.ArtConfigArgPlugInImpl.get_repository(Unknown
> Source)
> at com.iona.corba.art.artimpl.ORBDelegate.set_parameters(Unknown
> Source)
> at com.iona.corba.art.artimpl.ORBImpl.set_parameters(Unknown
> Source)
> at org.omg.CORBA.ORB.init(ORB.java:337)
> at baex.corba.CORBAHelper.<init>(CORBAHelper.java:43)
> at baex.ds.adapter.StagingAreaAdapterTest.setUp(
> StagingAreaAdapterTest.java:100)
> 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.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: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(
> DelegatingMethodAccessorImpl.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(
> DefaultPluginManager.java:399)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> DefaultLifecycleExecutor.java:519)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
> (DefaultLifecycleExecutor.java:469)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
> DefaultLifecycleExecutor.java:448)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
> (DefaultLifecycleExecutor.java:301)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
> DefaultLifecycleExecutor.java:268)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute
> (DefaultLifecycleExecutor.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(
> DelegatingMethodAccessorImpl.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)
>
> Does anyone know how to resolve this type of problem with Maven 2.0?
>
> Thanks!
>
>