The problem has gone away after I discovered taht a hibernate persistence.properties file under src/test tree was not being filtered and was therefor invalid. I am not 100% sure what to make of it. All I can guess is that junit 4.4 somehow ate some error message and made me think it was a ClassNotFound issue.

Farrukh Najmi wrote:

This may be a junit questions rather than a maven question....

I have a project where I have under the src/test tree a class called server.common.ServerTestBase that serves as a base classfor other test classes. For some reason this class is not found during test execution. Any idea what could cause this? The compiled class is under the target/test/classes.
TIA for your help

java.lang.NoClassDefFoundError: server.common.ServerTestBase
       at java.lang.Class.getDeclaredMethods0(Native Method)
       at java.lang.Class.privateGetDeclaredMethods(Class.java:2395)
       at java.lang.Class.getMethod0(Class.java:2642)
       at java.lang.Class.getMethod(Class.java:1579)
at org.junit.internal.requests.ClassRequest.hasSuiteMethod(ClassRequest.java:61) at org.junit.internal.requests.ClassRequest.getRunnerClass(ClassRequest.java:50) at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:28) at org.apache.maven.surefire.junit4.JUnit4TestSet.<init>(JUnit4TestSet.java:45) at org.apache.maven.surefire.junit4.JUnit4DirectoryTestSuite.createTestSet(JUnit4DirectoryTestSuite.java:56) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.locateTestSets(AbstractDirectoryTestSuite.java:96) at org.apache.maven.surefire.Surefire.createSuiteFromDefinition(Surefire.java:150)
       at org.apache.maven.surefire.Surefire.run(Surefire.java:111)
       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.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)



--
Regards,
Farrukh Najmi

Web: http://www.wellfleetsoftware.com



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to