tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <david.blev...@visi.com>
Subject Re: Exception while using embedded openejb for testing in eclipse
Date Wed, 07 Nov 2007 05:37:31 GMT
Hi Per,

It isn't clear what's causing the issue based on the stack trace  
(NoClassDefFoundErrors usually require some debugging).  I'm going to  
try and convert one of our examples into an eclipse project and see if  
I can't get something working.  I'll post the workspace when I'm done.

If you'd like to post a workspace that reproduces the issue as well,  
that'd be great too.  Even if the space I create works, I'd be nice to  
know what happened for support reasons.

-David

On Nov 2, 2007, at 3:20 PM, Per Newgro wrote:

> Hi *,
>
> i try to run my SLSB Tests on an embedded openejb server - without  
> any extra
> configuration. I added all required libs (try and error :-). But now  
> i get a
> strange exception. (OpenEJB is in eclipse classpath). How can i  
> reuse the
> eclipse classpath for my tests?
>
> Cheers
> Per
>
> javax.naming.NamingException: Attempted to load OpenEJB.
> java.lang.NoClassDefFoundError [Root exception is
> java.lang.ClassCastException: java.lang.NoClassDefFoundError]
>
>             at
> org 
> .apache.openejb.client.LocalInitialContextFactory.getInitialContext(L
> ocalInitialContextFactory.java:47)
>
>             at
> javax.naming.spi.NamingManager.getInitialContext(NamingManager.java: 
> 667)
>
>             at
> javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
>
>             at javax.naming.InitialContext.init(InitialContext.java: 
> 223)
>
>             at
> javax.naming.InitialContext.<init>(InitialContext.java:197)
>
>             at
> de 
> .yhd.buma.backend.backendtests.OpenEjbAccessTest.setUp(OpenEjbAccessTe
> st.java:40)
>
>             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
>
>             at
> sun 
> .reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
> a:39)
>
>             at
> sun 
> .reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> Impl.java:25)
>
>             at java.lang.reflect.Method.invoke(Method.java:585)
>
>             at
> org 
> .junit.internal.runners.BeforeAndAfterRunner.invokeMethod(BeforeAndAf
> terRunner.java:74)
>
>             at
> org 
> .junit.internal.runners.BeforeAndAfterRunner.runBefores(BeforeAndAfte
> rRunner.java:50)
>
>             at
> org 
> .junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAf
> terRunner.java:33)
>
>             at
> org 
> .junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.j
> ava:75)
>
>             at
> org 
> .junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45
> )
>
>             at
> org 
> .junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestC
> lassMethodsRunner.java:66)
>
>             at
> org 
> .junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRu
> nner.java:35)
>
>             at
> org.junit.internal.runners.TestClassRunner 
> $1.runUnprotected(TestClassRun
> ner.java:42)
>
>             at
> org 
> .junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAf
> terRunner.java:34)
>
>             at
> org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java: 
> 52)
>
>             at
> org 
> .eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4Tes
> tReference.java:38)
>
>             at
> org 
> .eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.ja
> va:38)
>
>             at
> org 
> .eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTe
> stRunner.java:460)
>
>             at
> org 
> .eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTe
> stRunner.java:673)
>
>             at
> org 
> .eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRun
> ner.java:386)
>
>             at
> org 
> .eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRu
> nner.java:196)
>
> Caused by: java.lang.ClassCastException:  
> java.lang.NoClassDefFoundError
>
>             at
> org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java: 
> 38)
>
>             at
> org 
> .apache.openejb.client.LocalInitialContextFactory.init(LocalInitialCo
> ntextFactory.java:59)
>
>             at
> org 
> .apache.openejb.client.LocalInitialContextFactory.getInitialContext(L
> ocalInitialContextFactory.java:45)
>
>             ... 25 more
>


Mime
View raw message