• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JNDI Configuration Query

 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
This is first time I am using WebSphere
I want to look up some resources deployed in WebSphere and for that I need to create an InitialContext object
Am not able to find the JNDI configuration in WebSphere console. (Wanted to check the port information, for me 1099 port is not working)
Can any body guide me to get through JNDI configuration
any help anticipated
 
Bhavesh Dak
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Look up code [Jars in class path: jnp-client-3.2.1.jar, jboss-common-3.2.1.jar]



Getting following Exception
javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]
at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1058)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1127)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:478)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471)
at javax.naming.InitialContext.lookup(Unknown Source)
...etc...
Caused by: java.net.SocketTimeoutException: Receive timed out
at java.net.PlainDatagramSocketImpl.receive(Native Method)
at java.net.DatagramSocket.receive(Unknown Source)
at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1038)
... 5 more
 
Ranch Hand
Posts: 446
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Suggest you look at this post for some helpful details:
https://coderanch.com/t/484139/Websphere/JNDI-Lookup-WebSphere
 
Bhavesh Dak
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Deepak,

I tried with the port mentioned in the link but still getting same exception.
It will be great if you can just help me to locate where the jndi configuration resides in WebSphere

Thanks for reply
 
Deepak Pant
Ranch Hand
Posts: 446
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Suggest you try corba style provider URL method mentioned in the link. The port number for base websphere version is generally 2809. For ND version it starts from 98XX.

You can look for Bootstrap port under the server->ports link in the admin console.

The name to lookup gets logged in the WebSphere SystemOut.log file.

 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not sure if looking up the jndi tree will give the correct port name. But here is what works for me on WAS6.1.

Go to Admin console.
On left hand navigation bar, go to Resources--> JMS
Choose one of ConnectionFactory, QueueConnectioNFactory, TopicConnectionFactory.
On the right hand pane, click on the ConnectionFactoryname.
And you can see the jndi details for this connectionfactory.
 
Bhavesh Dak
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bhavesh Dak wrote:Look up code [Jars in class path: jnp-client-3.2.1.jar, jboss-common-3.2.1.jar]



Getting following Exception
javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]
at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1058)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1127)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:478)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471)
Caused by: java.net.SocketTimeoutException: Receive timed out
at java.net.PlainDatagramSocketImpl.receive(Native Method)
at java.net.DatagramSocket.receive(Unknown Source)
at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1038)
... 5 more

 
Bhavesh Dak
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bhavesh Dak wrote:Look up code [Jars in class path: jnp-client-3.2.1.jar, jboss-common-3.2.1.jar]



Getting following Exception
javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]
at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1058)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1127)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:478)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471)
Caused by: java.net.SocketTimeoutException: Receive timed out
at java.net.PlainDatagramSocketImpl.receive(Native Method)
at java.net.DatagramSocket.receive(Unknown Source)
at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1038)
... 5 more

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic