Alright,
Try this...
1. Remove the ejb-ref from your web.xml
2. Change your jboss-web.xml from
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
<ejb-ref>
<ejb-ref-name>DBaseFetch</ejb-ref-name>
<jndi-name>ejb/DBaseFetchHome</jndi-name>
</ejb-ref>
</jboss-web>
to
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
<ejb-ref>
<ejb-ref-name>ejb/DBaseFetchHome</ejb-ref-name>
<jndi-name>ejb/DBaseFetchHome</jndi-name>
</ejb-ref>
</jboss-web>
and lookup the bean as usual.
Should work
Vinay
----- Original Message -----
From: G.L. Grobe
To: [EMAIL PROTECTED]
Sent: Saturday, July 07, 2001 10:09 AM
Subject: [JBoss-user] servlet to ejb lookup
Can someone fill me in on how to use the jboss-web.xml file, or why I'm
getting this error? I'm just trying to do a lookup from a Servlet to a
session bean.
[Auto deploy] Linking ejb-ref: DBaseFetch to JNDI name: null
[Auto deploy] javax.naming.NamingException: ejb-ref: DBaseFetch, expected
jndi-name in jboss-web.xml
Any help much appreciated.
--- MyServlet.java ------------------------------------
...
Object result = ctx.lookup("java:comp/env/ejb/DBaseFetchHome");
DBaseFetchHome home = (DBaseFetchHome)
javax.rmi.PortableRemoteObject.narrow(result,
DBaseFetchHome.class);
--- jboss-web.xml -------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
<ejb-ref>
<ejb-ref-name>DBaseFetch</ejb-ref-name>
<jndi-name>ejb/DBaseFetchHome</jndi-name>
</ejb-ref>
</jboss-web>
--- web.xml --------------------------------------------
...
<ejb-ref>
<ejb-ref-name>DBaseFetch</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>com.neuroquest.cais.ejb.session.dbaseFetch.DBaseFetchHome</home>
<remote>com.neuroquest.cais.ejb.session.dbaseFetch.DBaseFetch</remote>
</ejb-ref>
--- ejb-jar.xml -----------------------------------------
...
<session>
<ejb-name>DBaseFetch</ejb-name>
<ejb-class>com.neuroquest.cais.ejb.session.dbaseFetch.DBaseFetchBean</ejb-cl
ass>
<home>com.neuroquest.cais.ejb.session.dbaseFetch.DBaseFetchHome</home>
<remote>com.neuroquest.cais.ejb.session.dbaseFetch.DBaseFetch</remote>
<session-type>Stateful</session-type>
<transaction-type>Container</transaction-type>
</session>
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user