Frank,
Your problem does not appear to be related to Cactus but rather to the
way you have registered your bean name.
In your web.xml, you need to tell the web application about your EJBs.
Something like :
<ejb-ref>
<ejb-ref-name>ejb/Converter</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>org.apache.cactus.sample.ejb.ConverterHome</home>
<remote>org.apache.cactus.sample.ejb.Converter</remote>
</ejb-ref>
Then, in your jboss specific mapping file, you need to map
"ejb/Converter" to your EJB real name. For the J2EE RI, that would be :
<j2ee-ri-specific-information>
<server-name/>
<rolemapping/>
<web>
<display-name>test</display-name>
<context-root>test</context-root>
<ejb-ref>
<ejb-ref-name>ejb/Converter</ejb-ref-name>
<jndi-name>ejb/Converter</jndi-name>
</ejb-ref>
</web>
</j2ee-ri-specific-information>
See http://jakarta.apache.org/cactus/howto_ejb_j2eeri.html
In other words, you need to know how to lookup your EJB from a servlet
for your application server.
Hope it helps.
-Vincent
> -----Original Message-----
> From: O'Rourke, Frank [mailto:[EMAIL PROTECTED]]
> Sent: 14 March 2002 17:22
> To: '[EMAIL PROTECTED]'
> Subject: Testing Local interfaces in JBoss
>
> 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.testFindByPrimaryKeyWi
th
> Va
> lidPk(Unknown Source)
> at java.lang.reflect.Method.invoke(Native Method)
> at
>
org.apache.cactus.AbstractTestCase.runServerTest(AbstractTestCase.java:4
91
> )
> at
>
org.apache.cactus.AbstractTestCase.runBareServerTest(AbstractTestCase.ja
va
> :4
> 56)
> at
>
org.apache.cactus.server.AbstractTestCaller.doTest(AbstractTestCaller.ja
va
> :1
> 37)
> at
>
org.apache.cactus.server.AbstractTestController.handleRequest(AbstractTe
st
> Co
> ntroller.java:122)
> at
>
org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirec
to
> r.
> 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:cactus-user-
> [EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:cactus-user-
> [EMAIL PROTECTED]>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>