File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JBoss and the fly likes JBOSS JNDI Lookup from Standalone Client Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Products » JBoss
Reply Bookmark "JBOSS JNDI Lookup from Standalone Client" Watch "JBOSS JNDI Lookup from Standalone Client" New topic
Author

JBOSS JNDI Lookup from Standalone Client

David Connell
Greenhorn

Joined: Feb 18, 2005
Posts: 1
Ok, I've spent 3 hours trying to figure out what I've done wrong here and I need some help....

I'm trying to write a standalone client that accesses a SessionBean in JBoss 4.0.1. I'm hitting it fine from embedded Tomcat but can't seem to get the incantation right from the standalone client. I'm using the 'Getting Started' guide from docs.jboss.org but I'm just missing some connection somewhere....

I've written the following config components:

-------------------
- jndi.properties -

java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=jnp://localhost:1099
java.naming.factory.url.pkgs=org.jboss.naming.client
j2ee.clientName=daily-cycle

--------------------
- jboss-client.xml -

<jboss-client>
<jndi-name>daily-cycle</jndi-name>
<ejb-ref>
<ejb-ref-name>ejb/DailyBillingCycle</ejb-ref-name>
<jndi-name>ejb/billing/DailyBillingCycle</jndi-name>
</ejb-ref>
</jboss-client>


--------------------------
- application-client.xml -
<application-client>
<display-name>DailyBillingCycle</display-name>
<ejb-ref>
<ejb-ref-name>ejb/DailyBillingCycle</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>com.rlsworx.billing.interfaces.DailyBillingCycleHome</home>
<remote>com.rlsworx.billing.interfaces.DailyBillingCycle</remote>
</ejb-ref>
</application-client>

---------------------
- jboss.xml (frag) -

...
<session>
<ejb-name>DailyBillingCycle</ejb-name>
<jndi-name>ejb/billing/DailyBillingCycle</jndi-name>

<method-attributes>
</method-attributes>
</session>
...

I've compiled everything and deployed everything and I keep getting:

--> javax.naming.NameNotFoundException: daily-cycle not bound


Can someone please tell me what's missing (or misplaced) here?

Thanks!
Narendran Nair
Ranch Hand

Joined: Sep 25, 2003
Posts: 35
hi man ...

from the details u have given here only one thing pops up in my mind .. your error message is NameNotFound for daily-cycle but in the jboss.xml file this jndi name is not there .... i think u are looking for the wrong jndi name ....

this is what i have to say .....

regards
Naren


Narendran J S<br />SCJP 1.4<br /><a href="http://narendranj.blogspot.com" target="_blank" rel="nofollow">http://narendranj.blogspot.com</a><br /><a href="http://narendranj.blogspot.com" target="_blank" rel="nofollow">http://techboom.blogspot.com</a><br /><a href="http://bookmarks-share.blogspot.com" target="_blank" rel="nofollow">http://bookmarks-share.blogspot.com</a>
 
IntelliJ Java IDE
 
subject: JBOSS JNDI Lookup from Standalone Client
 
Threads others viewed
Ejb deployment issue
j2ee.clientName in jndi.properties
Guess my questions was too DIFFICULT ?
Is there something wrong with this .ear archive?
Access EJB deployed in external machine.
developer file tools