• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

remote JNDI lookup fails

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic