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!
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.
Your client must have a jndi.properties somewhere in its classpath. How does it look like? There is one entry looking like this:
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...
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
for session bean calling entity bean
So you see why you must specify the lookup method (jndi:)
Sorry i checked my sources, it's :
Context initial = new InitialContext();
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.
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
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... ;-)
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?
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)?
I figured it out! There is a mistake in the tutorial:
the statement should look like this:
HelloServerHome theHelloHome = (HelloServerHome) ctx.lookup("HelloWorldServer");
HelloServerHome theHelloHome = (HelloServerHome) ctx.lookup("ejb/HelloServer");