I am having difficulty accessing a entity bean local interface in from my
test case.

Context context = new InitialContext();
Object ref = context.lookup("java:comp/env/ejb/MemberEJB");
then I get the exception (see below for full stack)
javax.naming.NameNotFoundException: ejb not bound

How do you access a local interface entity bean from a Cactus test case?  I
can see the MemberEJB using the jboss management web interface on port 8082.
I can access it fram a session bean but not from the cactus test code.

Has anyone got an example piece of code and the required xml deployment
files required to deploy a local bean in jboss.  

If I use Object ref = context.lookup("java:comp/env/MemberEJB"); 
then I get the exception
javax.naming.NameNotFoundException: MemberEJB not bound


full stack trace.
################
javax.naming.NameNotFoundException: ejb not bound
        at org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
        at org.jnp.server.NamingServer.getBinding(NamingServer.java:503)
        at org.jnp.server.NamingServer.getObject(NamingServer.java:509)
        at org.jnp.server.NamingServer.lookup(NamingServer.java:253)
        at org.jnp.server.NamingServer.lookup(NamingServer.java:256)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:365)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:473)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:349)
        at javax.naming.InitialContext.lookup(InitialContext.java:350)
        at
test.ie.emuse.ichara.server.entity.MemberImplTest.testFindByPrimaryKeyWithVa
lidPk(Unknown Source)
        at java.lang.reflect.Method.invoke(Native Method)
        at
org.apache.cactus.AbstractTestCase.runServerTest(AbstractTestCase.java:491)
        at
org.apache.cactus.AbstractTestCase.runBareServerTest(AbstractTestCase.java:4
56)
        at
org.apache.cactus.server.AbstractTestCaller.doTest(AbstractTestCaller.java:1
37)
        at
org.apache.cactus.server.AbstractTestController.handleRequest(AbstractTestCo
ntroller.java:122)
        at
org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector.
java:134)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:488)
        at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:387)
        at org.mortbay.http.HandlerContext.handle(HandlerContext.java:1040)
        at org.mortbay.http.HandlerContext.handle(HandlerContext.java:995)
        at org.mortbay.http.HttpServer.service(HttpServer.java:683)
        at org.mortbay.http.HttpConnection.service(HttpConnection.java:732)
        at
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:889)
        at org.mortbay.http.HttpConnection.handle(HttpConnection.java:746)
        at
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:146)
        at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:287)
        at
org.mortbay.util.ThreadPool$PoolThreadRunnable.run(ThreadPool.java:609)
        at java.lang.Thread.run(Thread.java:484)

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

Reply via email to