Hello! Has someone experience with testing EJBs using JUnit?
I've some entity beans and want to ensure that their basic functions (creation, editing and deletion of records in the database) do work properly after changes (see attachment TestProjectBean.java). But I get a NoClassDefFoundError when I run this test, although all classes used are in the classpath (full stacktrace is given in attachment 2002_07_17_stackTrace.txt). If I put the same statements into a normal Java application, everything works fine. Any help is highly appreciated Dimitri Pissarenko
java.lang.NoClassDefFoundError
at
test.DataAccess.entities.TestProjectBean.testEjbCreate(TestProjectBean.java:58)
at java.lang.reflect.Method.invoke(Native Method)
at junit.framework.TestCase.runTest(TestCase.java:166)
at junit.framework.TestCase.runBare(TestCase.java:140)
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:131)
at junit.framework.TestSuite.runTest(TestSuite.java:173)
at junit.framework.TestSuite.run(TestSuite.java:168)
at
com.togethersoft.testing.internal.testserver.plugin.junit.JUnitTestRunner.a([DashoPro-V2-050200])
at
com.togethersoft.testing.internal.testserver.plugin.junit.JUnitTestRunner.a([DashoPro-V2-050200])
at
com.togethersoft.testing.internal.testserver.plugin.junit.JUnitHttpTestRunner.run([DashoPro-V2-050200])
at mtfwes.execute([DashoPro-V2-050200])
at mtfwer.execute([DashoPro-V2-050200])
at
com.togethersoft.testing.internal.testserver.TestServerServlet.executeCommand([DashoPro-V2-050200])
at
com.togethersoft.testing.internal.testserver.TestServerServlet.GetMethod([DashoPro-V2-050200])
at
com.togethersoft.testing.internal.testserver.jetty.TsHandler.handleRequest([DashoPro-V2-050200])
at
com.togethersoft.testing.internal.testserver.jetty.TsHandler.handle([DashoPro-V2-050200])
at org.mortbay.http.HandlerContext.handle(HandlerContext.java:1047)
at org.mortbay.http.HandlerContext.handle(HandlerContext.java:1002)
at org.mortbay.http.HttpServer.service(HttpServer.java:774)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:745)
at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:918)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:760)
at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:148)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:287)
at org.mortbay.util.ThreadPool$JobRunner.run(ThreadPool.java:775)
at java.lang.Thread.run(Thread.java:484)
TestProjectBean.java
Description: Binary data
