The one relevant line: Caused by: java.lang.NoClassDefFoundError: org/jaxen/BaseXPath
Anyway, I'd suggest using the Maven 2 plugin in Eclipse and get the dependencies to work that way (rather than through the classpath). So when you have the classpath set up correctly in Eclipse, it should work with Maven as well. Eric On 4/6/06, Pierre Jacquot <[EMAIL PROTECTED]> wrote: > > To make Unit Test I use Junit and JTestCase. All works with eclispe but > when > i want to use JTestCase I have a problemem with my JDom package. I already > have one but it seems to doesn't work good in Maven. > If anyone have the same problem, or had have the same, Can he explain me > how > to resolve it ? > > Here the java's error : > java.lang.reflect.InvocationTargetException > 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.apache.maven.surefire.battery.JUnitBattery.processTestClass > ( > JUnitBattery.java:130) > at org.apache.maven.surefire.battery.JUnitBattery.<init>( > JUnitBattery.java:81) > at org.apache.maven.surefire.SurefireUtils.instantiateBattery( > SurefireUtils.java:63) > at org.apache.maven.surefire.Surefire.instantiateBatteries( > Surefire.java:262) > at org.apache.maven.surefire.Surefire.run(Surefire.java:140) > at org.apache.maven.surefire.Surefire.run(Surefire.java:87) > 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.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. > at > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle > (DefaultLifecy > 5) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecycle > (DefaultLifecycleE > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle > (DefaultLifecycleExecutor > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals > (DefaultLifecycleExecutor. > at > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle > (DefaultLifecy > 5) > at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal > ( > DefaultLifecycleExecutor.j > at > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures > (DefaultLi > a:306) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments > (DefaultLifecycleEx > at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute( > DefaultLifecycleExecutor.java: > 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: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) > Caused by: java.lang.NoClassDefFoundError: org/jaxen/BaseXPath > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java:141) > at org.jdom.xpath.XPath.newInstance(XPath.java:126) > at org.jdom.xpath.XPath.selectNodes(XPath.java:337) > at org.jtestcase.core.digester.XQueryParserImpl_Jaxen.getElements > (XQueryParserImpl_Jaxen.java > at > org.jtestcase.core.digester.JTestCaseDigester.getTestCaseGlobalParams( > JTestCaseDigester.ja > at org.jtestcase.JTestCase.getGlobalParams(JTestCase.java:240) > at org.jtestcase.JTestCase.getGlobalParamLocale(JTestCase.java > :278) > at org.jtestcase.JTestCase.<init>(JTestCase.java:155) > at com.test_junit.app.CalculatorTest.<init>(CalculatorTest.java > :53) > at com.test_junit.app.CalculatorTest.suite(CalculatorTest.java:76) > >
