Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Datasource lookup on remote Websphere Application Server

 
Ranch Hand
Posts: 198
Oracle Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am trying to access the datasource from the Websphere running on remote machine. But facing the exception.



The same code works when i access the datasource from the Websphere running on my loacl machine.

Can any one suggest what could be the problem?

Exception is below.

28-Jul-2010 15:36:15 com.ibm.ws.naming.util.WsnInitCtxFactory
WARNING: jndiUnavailCommErr
javax.naming.ServiceUnavailableException: A communication failure occurred while attempting to obtain an initial context with the provider URL: "iiop://10.255.22.145:2809". Make sure that any bootstrap address information in the URL is correct and that the target name server is running. A bootstrap address with no port specification defaults to port 2809. Possible causes other than an incorrect bootstrap address or unavailable name server include the network environment and workstation network configuration. [Root exception is org.omg.CORBA.TRANSIENT: java.net.SocketException: Operation timed out: connect:could be due to invalid address:host=frcacd5k.server.rbsgrp.net,port=2809 vmcid: IBM minor code: E02 completed: No]
at com.ibm.ws.naming.util.WsnInitCtxFactory.mapInitialReferenceFailure(WsnInitCtxFactory.java:2224)
at com.ibm.ws.naming.util.WsnInitCtxFactory.mergeWsnNSProperties(WsnInitCtxFactory.java:1384)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getRootContextFromServer(WsnInitCtxFactory.java:922)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getRootJndiContext(WsnInitCtxFactory.java:846)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:531)
at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:117)
at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:712)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:171)
at javax.naming.InitialContext.lookup(InitialContext.java:363)
at com.dev.WriteCLOBClient.main(WriteCLOBClient.java:33)
Caused by: org.omg.CORBA.TRANSIENT: java.net.SocketException: Operation timed out: connect:could be due to invalid address:host=frcacd5k.server.rbsgrp.net,port=2809vmcid: IBM minor code: E02 completed: No
at com.ibm.CORBA.transport.TransportConnectionBase.connect(TransportConnectionBase.java:425)
at com.ibm.rmi.transport.TCPTransport.getConnection(TCPTransport.java:151)
at com.ibm.rmi.iiop.TransportManager.get(TransportManager.java:88)
at com.ibm.rmi.iiop.GIOPImpl.getConnection(GIOPImpl.java:115)
at com.ibm.rmi.iiop.GIOPImpl.locate(GIOPImpl.java:189)
at com.ibm.rmi.corba.Corbaloc.locateUsingINS(Corbaloc.java:307)
at com.ibm.rmi.corba.Corbaloc.resolve(Corbaloc.java:378)
at com.ibm.rmi.corba.ORB.objectURLToObject(ORB.java:3680)
at com.ibm.CORBA.iiop.ORB.objectURLToObject(ORB.java:3238)
at com.ibm.rmi.corba.ORB.string_to_object(ORB.java:3578)
at com.ibm.ws.naming.util.WsnInitCtxFactory.stringToObject(WsnInitCtxFactory.java:1509)
at com.ibm.ws.naming.util.WsnInitCtxFactory.mergeWsnNSProperties(WsnInitCtxFactory.java:1360)
... 8 more
Caused by: java.net.SocketException: Operation timed out: connect:could be due to invalid address
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:372)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:233)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:220)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:385)
at java.net.Socket.connect(Socket.java:541)
at com.ibm.rmi.transport.TCPTransportConnection.createSocket(TCPTransportConnection.java:155)
at com.ibm.rmi.transport.TCPTransportConnection.createSocket(TCPTransportConnection.java:167)
at com.ibm.CORBA.transport.TransportConnectionBase.connect(TransportConnectionBase.java:354)
... 19 more


 
Bartender
Posts: 1638
IntelliJ IDE MySQL Database Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
CarefullyChooseOneForum while posting. Moving to websphere forum.
 
Ranch Hand
Posts: 446
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check this post.
https://coderanch.com/t/499569/Websphere/JNDI-lookup-datasource-standalone-application#2252198

Change your URL and use the full JNDI to the datasource as it appears in WAS ISC console.
 
Prabhakar Reddy Bokka
Ranch Hand
Posts: 198
Oracle Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for the reply Deepak.

My standalone program works perfectly alright when websphere and the java class running on same machine.
I am using IP address and port number even it is same machine.

When i try to run the same java class from someother machine it doesn't work.
Websphere is running on first machine and i am using the same IP address and port number.

Any thoughts why its happening like that?? See the exception stack trace posted above.
 
Deepak Pant
Ranch Hand
Posts: 446
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you ensured that you can ping from one machine to the other machine? I cannot think of anything else unless there are firewall or anti-virus programs blocking these calls.
 
Prabhakar Reddy Bokka
Ranch Hand
Posts: 198
Oracle Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am able to ping the machine also.
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic