Forums Register Login

Getting Initial Context Exception

+Pie Number of slices to send: Send
Hi Guys
I have written a simple stateless session bean and am using the application server downloaded from java.sun.com
My bean has been deployed successfuly and now i am trying to access the same from a standalone client. I have the ejb client jar generated by the deploy tool in the client class path

My client code is as follows:



However i am getting an exception as :



I am sure this has relation with the Initial Context Factory or the provider url. can any 1 clarify me what should be their values for the server?
+Pie Number of slices to send: Send
Hi Nischal,

I am no expert here, and not used the Sun server.

It appears you are getting a COS (CORBA) error. Unless the Sun JNDI server stores everything this way (which I think unlikely), I would assume that you are loading the wrong driver.

You just want standard JNDI.

Clive
+Pie Number of slices to send: Send
Lookups work slightly different with Sun AS. Check here.
+Pie Number of slices to send: Send
Thanks for the reference Annie.
+Pie Number of slices to send: Send
Instead of Standalone Java client, try it from servlet. From Servlet you can call java calss if you want. Java class will contain lookup code. Thanks
+Pie Number of slices to send: Send
 

Originally posted by Srinivas Reddy Patelu:
Instead of Standalone Java client, try it from servlet. From Servlet you can call java calss if you want. Java class will contain lookup code. Thanks



That shouldn't make much of a difference except for the fact that the InitialContext() would not require any environment properties, if the servelt is using the same app server.
It's a tiny ad only because the water is so cold.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 793 times.
Similar Threads
EJB3.0: Call Back Listener not working.
gettin problem with running client after deploying ejb in websphere 6.0
creating a WAS client.
error while running Client in Eclipse helios
EJB3.0 CallBack methods - simple doubt
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 19, 2024 03:57:33.