Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What causes a bean not bound error:

Status
Not open for further replies.

AnthonyGeorge

Technical User
Jun 3, 2004
46
0
0
GB
I am getting the following error :
javax.naming.NameNotFoundException: StoreAccessBean not bound.

In my Jboss.xml I have the following code:
<session>
<ejb-name>StoreAccess</ejb-name>
<jndi-name>StoreAccessBean</jndi-name>
<local-jndi-name>StoreAccessLocal</local-jndi-name>
<ejb-local-ref>
<ejb-ref-name>ejb/CustomerLocal</ejb-ref-name>
<jndi-name>CustomerLocal</jndi-name>
</ejb-local-ref>
<resource-ref>
<res-ref-name>jdbc/OracleDS</res-ref-name>
<jndi-name>java:/OracleDS</jndi-name>
</resource-ref>

</session>

What I would like to know is what causes a not bound error.
what is the best way to debug such an error.

Thanks for any help
Tony
 
Yes I am its the Tutorial for building J2EE Applications using JBOSS and ECLIPSE Chapter 3 problem.

Is what buka suggesting is that in the jboss352all.server you replace
label="Server Configuration (minimal/default/all):"
with
label="Server Configuration (server/default/deploy):"

But I still get a javax.naming.NameNotFoundException: StoreAccessBean not bound error.

Thanks for any help I have spent 5 hours trying to figure this one out.
 
You can open the jboss admin page then click on the jndi link. Then click on the list method. This should give you a list of all avaliable beans referenceable via jndi.
 
Sorted the problem

the tag in StoreAccessBean

@ejb.ejb-ref ejb-name="Customer"
view-type="local"
ref-name="CustomerLocal"


generates the following in the ejb-jar

<ejb-local-ref >
<ejb-ref-name>CustomerLocal</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>au.com.tusc.bmp.CustomerLocalHome</local-home>
<local>au.com.tusc.bmp.CustomerLocal</local>
<ejb-link>Customer</ejb-link>
</ejb-local-ref>

what I did was then add ejb in front of CustomerLocal
<ejb-ref-name>ejb/CustomerLocal</ejb-ref-name>

which solved the problem.

Tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top