File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and Other Java EE Technologies and the fly likes Problems obtaining initial context Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » EJB and Other Java EE Technologies
Reply Bookmark "Problems obtaining initial context" Watch "Problems obtaining initial context" New topic
Author

Problems obtaining initial context

Terry Schulting
Greenhorn

Joined: Nov 20, 2001
Posts: 5
I am writing a java client (written in VA Java 3.5 on NT) to communicate with an EJB deployed on Websphere (not sure which version as the EJB is "owned" by a different group). The problem I am noticing is that when I attempt to create a new InitialContext the first time through for the day or the first time after restarting my image, everything works fine(I am testing through the IDE). After that first attempt though, my image just hangs on the call for the new InitialContext. What's even more strange is that if I change my URL property to a different server (one that I have not hit yet), it will look that one up, even though I hang on the others, and then of course, if I attempt to look this new one up again, it hangs. See below for a quick illustration:
url of 111 works
url of 111 hangs
url of 123 works
url of 111 hangs
url of 123 hangs
url of 333 works
I think you get the picture now. Any ideas of what might be going on? We are doing the typical new InitialContext(props), where props is populated with the Initial context factory of com.ibm.ejs.ns.jndi.CNInitialContextFactory and a provider url of with the following format iiop://hostname:port.
Thanks for all help!!
[This message has been edited by Thomas Paul (edited November 20, 2001).]
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3878
The fact that you don't know what version could be a BIG problem. VAJ contains a version of the code of WebSphere. WebSphere has problems with back-level client code communicating with up-level server code. You need to find that out and PRONTO, and if necessary bring your VAJ up to the latest version...
Kyle
------------------
Kyle Brown,
Author of Enterprise Java (tm) Programming with IBM Websphere
See my homepage at http://members.aol.com/kgb1001001 for other WebSphere information.


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
Terry Schulting
Greenhorn

Joined: Nov 20, 2001
Posts: 5
They are running WAS 3.5.4. Shouldn't VAJ 3.5 and WAS 3.5.4 be compatible?
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3878
No they're not -- like I say, WebSphere has problems with downlevel clients working with up-level servers. You should try upgrading to VAJ 4.0 -- which is built on WebSphere 3.5.3.
Kyle
------------------
Kyle Brown,
Author of Enterprise Java (tm) Programming with IBM Websphere
See my homepage at http://members.aol.com/kgb1001001 for other WebSphere information.
Terry Schulting
Greenhorn

Joined: Nov 20, 2001
Posts: 5
Upgraded to VAJava4.0, and now I get a bit farther. Instead of hanging on the context, I now hang on the create call of the home interface.
 
 
subject: Problems obtaining initial context
 
Threads others viewed
JNDI lookups with > 1 nameserver
Exception at client side EJB program
How do I refresh a jtable after I delete a row?
A Quest for all of those who don't use RI for HF EJB
Geting exeption in JNDI
IntelliJ Java IDE