aspose file tools*
The moose likes JBoss/WildFly and the fly likes remote JNDI lookup fails Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "remote JNDI lookup fails" Watch "remote JNDI lookup fails" New topic
Author

remote JNDI lookup fails

Heiner Lamprecht
Greenhorn

Joined: Feb 26, 2008
Posts: 2
Hi,

I'm rather new to JBoss and Java EE. At the moment, I'm trying to make a remote JNDI lookup. The following code is used in the client to perform the lookup:



If I run this on the host "server", everything works fine. But when I run in on a different host, I get an exception:



What surprises me, is that the client seems to try to connect to localhost, even though the provider URL points to a different maschine. There is no firewall inbetween, I can reach the URL via telnet.

The server is a JBoss 4.2.2GA.

Any idea what's going wrong here?


Thanks,

Heiner
John Gregory
Ranch Hand

Joined: Oct 05, 2006
Posts: 118
Heiner,

Hi, I'm fairly new, myself. Whenever I do a jndi look-up, I get a
different exception thrown, a NoInitialContextException. I think one
time, I noticed I had placed the jboss jnp.jar file in my netbeans
library and everything seemed to work fine. Since then, I've not
been able to replicate success......

When you built your app, did you place the jar file in your classpath?

John
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10264
    
168

Heiner,

Welcome to JavaRanch

How are you starting JBoss? Do you use the -b option with the run.bat(or run.sh) file? Also which operating system are you using?

Also, see if this is of any help.
[ February 26, 2008: Message edited by: Jaikiran Pai ]

[My Blog] [JavaRanch Journal]
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10264
    
168

Originally posted by John Gregory:


Whenever I do a jndi look-up, I get a different exception thrown, a NoInitialContextException.


John,

The NoInitialContextException is because of this, unless the exception stacktrace has some other root cause.
Heiner Lamprecht
Greenhorn

Joined: Feb 26, 2008
Posts: 2
Jaikirian,

Originally posted by Jaikiran Pai:
How are you starting JBoss? Do you use the -b option with the run.bat(or run.sh) file? Also which operating system are you using?


Sorry, I forgot to mention that I'm using Linux.

Yes, I'm using the -b option. But there was a problem in jboss-service.xml. The IP for port 8083 was hardcoded

Now it works perfectly.

thanks,

Heiner
 
Consider Paul's rocket mass heater.
 
subject: remote JNDI lookup fails