To be more specific, I added:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.2</version>
<configuration>
<forkMode>always</forkMode>
</configuration>
</plugin>
</plugins>
</build>
to the pom.xml in the killlerapp-store-xstream project.
bkbonner wrote:
>
> So, one of my guys is taking a look at sonatype's mavenbook example
> http://www.sonatype.com/book/simple-project.html where it says to run mvn
> install on the killerapp project.
>
> We're seeing this error msg. Has anyone else seen this problem and how
> did they solve it. I googled a bit and tried using forkMode to get around
> this problem to no avail.
>
> Brian
>
> -------------------------------------------------------------------------------
> Battery: com.training.killerapp.store.xstream.KillerAppXStreamStoreTest
> -------------------------------------------------------------------------------
> Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.953 sec
>
> testPersistence(com.training.killerapp.store.xstream.KillerAppXStreamStoreTest)
>
> Time elapsed: 0.922 sec <<< ERROR!
>
> [ stdout ] ---------------------------------------------------------------
>
>
>
> [ stderr ] ---------------------------------------------------------------
>
>
>
> [ stacktrace ] -----------------------------------------------------------
>
> java.lang.LinkageError: loader constraint violation: loader (instance of
> <bootloader>) previously initiated loading for a different type with name
> "org/xml/sax/InputSource"
> at
> com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:218)
> at
> com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:283)
> at
> com.thoughtworks.xstream.io.xml.DomDriver.createReader(DomDriver.java:40)
> at
> com.thoughtworks.xstream.io.xml.DomDriver.createReader(DomDriver.java:29)
> at com.thoughtworks.xstream.XStream.fromXML(XStream.java:490)
> at
> com.training.killerapp.store.xstream.KillerAppXStreamStore.read(KillerAppXStreamStore.java:193)
> at
> com.training.killerapp.store.xstream.KillerAppXStreamStore.getUser(KillerAppXStreamStore.java:134)
> at
> com.training.killerapp.store.xstream.KillerAppXStreamStoreTest.testPersistence(KillerAppXStreamStoreTest.java:63)
> 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:597)
> 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:597)
> at
> org.apache.maven.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.java:230)
> at
> org.apache.maven.surefire.battery.JUnitBattery.execute(JUnitBattery.java:204)
> at org.apache.maven.surefire.Surefire.executeBattery(Surefire.java:213)
> at org.apache.maven.surefire.Surefire.run(Surefire.java:161)
> at org.apache.maven.surefire.Surefire.run(Surefire.java:85)
> 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:597)
> at
> org.apache.maven.surefire.SurefireBooter.runTestsInProcess(SurefireBooter.java:232)
> at org.apache.maven.surefire.SurefireBooter.run(SurefireBooter.java:181)
> at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:338)
> at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
> 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:597)
> 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)
>
>
>
>
--
View this message in context:
http://www.nabble.com/loader-constraint-violation---killerapp-example-at-sonatype-tf3886824s177.html#a11017732
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]