-
1. Re: JNDI
joelwyland Feb 8, 2003 7:28 PM (in response to div_)I'm having this exact same problem... I've got an out of the box jboss config. I deployed an ejb jar file and the messages on the console say my bean was deployed successfully. When I try to connect with a client I get the above exception.
Any help is appreciated!
Kenny Smith -
2. Re: JNDI
stefankuhn Feb 11, 2003 1:39 AM (in response to div_)
Hi!
Some time ago i had problem understanding the XML-Files / JNDI myselve. As i found out how it works, i posted this message:
http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t=forums/ about setting up a Datasource (DS), but it covers the JNDI/XML-File-Problem too.
Rgds
Stefan -
3. Re: JNDI
lepe Feb 11, 2003 2:44 AM (in response to div_)Your client must have a jndi.properties somewhere in its classpath. How does it look like? There is one entry looking like this:
java.naming.provider.url=192.168.205.193
where you have to specify IP address of your JBoss server. Optionally add :1099 to specify port if not using default one. Can you ping your server... there seems to be some network related problem...
/Lennart -
4. Re: JNDI
aragorn94 Feb 11, 2003 5:11 AM (in response to div_)Something is missing : should be
HelloServerHome theHelloHome = (HelloServerHome) ctx.lookup("jndi:ejb/HelloServer");
it's what i have coded and it works for me
PS : it is
initial.lookup("java:comp/env/ejb/MyEntityBean");
for session bean calling entity bean
So you see why you must specify the lookup method (jndi:) -
5. Re: JNDI
aragorn94 Feb 11, 2003 1:31 PM (in response to div_)Sorry i checked my sources, it's :
jndi/UserBean
Context initial = new InitialContext();
return (UserHome)
initial.lookup(jndi/UserBean);
As i use eclipse with Lomboz plug-in, i didn't remember exactly the value,
which is in the Home class :
public static final String JNDI_NAME="jndi/UserBean";
So i don't have to remember, the value to pass to the parameter.
return (UserHome)
initial.lookup(UserHome.JNDI_NAME);
And when i create a client with the lomboz plugin, i precise the local class and the local home class, so i have automatically the source line above coded -
6. Re: JNDI
juhalindfors Feb 12, 2003 8:24 AM (in response to div_)it's not an issue with the lookup string (that would yield a NameNotFoundException) but is more likely to be some sort of network problem as lennart said in the previous reply.
hehe... värmland? In Sweden? You guys are funny... ;-) -
7. Re: JNDI
div_ Feb 13, 2003 3:02 PM (in response to div_)I have tried every suggestion and made the modifications to my code, I can see the ejb in the JMX console and I am still unable to bind to JNDI. This is very frustrating and I don't believe it should be this difficult! I am running Windows 2000 professional, I've tried running the server using the Eclipse IDE plug-in and also from the MS-DOS command line (run.bat) but to no avail. Again, the deployment is successful and I can see the bean in the JMX console under the JNDI view but still no luck. If it is a network issue, are there any procedures I can perform that might prove helpful?
-
8. Re: JNDI
juhalindfors Feb 14, 2003 7:25 AM (in response to div_)well stick to command line, IDE's will just mess you up.
What is the name that you are seeing in the global JNDI name space?
Are you running firewall software (ZoneAlarm)?
Are you trying to do the lookup from another process or within the server process (from another bean)? -
9. Re: JNDI
div_ Feb 15, 2003 1:39 PM (in response to div_)AHHHH YEEESSSS!
I figured it out! There is a mistake in the tutorial:
http://users.pandora.be/bert.torfs/j2ee.pdf
the statement should look like this:
HelloServerHome theHelloHome = (HelloServerHome) ctx.lookup("HelloWorldServer");
NOT
HelloServerHome theHelloHome = (HelloServerHome) ctx.lookup("ejb/HelloServer");