I got this error message at runtime.
After adding value to the Intialcontext by adding the following code snippet:
Properties p = new Properties();
initContext = new javax.naming.InitialContext(p);
After this i am getting different error message:
minor code: 1 completed: Maybe at om.sun.corba.se.internal.iiop.IIOPConnection.purge_calls(Unknown Source)
at com.sun.corba.se.internal.iiop.ReaderThread.run(Unknown Source)
Looking forward a proper solution
for this problem.
Try adding the naming.jar file in the Java Build Path of your Application Bean. For that in the Bean Properties Menu >> Libraries >> Add Enternal JARs >> naming.jar could be added by providing the path from the runtime/base_v5/lib directory.
Save and Run the Application.
Should not give the error posted.
All the Best !
I encountered the same problem while trying to run the client.
I found a short cut to get the default property for the Context.INITIAL_CONTEXT_FACTORY and Context.PROVIDER_URL while trying to access the EJB deployed in SunServer.
You need not have Properties Object defined in your client code.
The JNDI name should be as it is found in the deployment and not the java:comp/env/ejb etc...
The command line will be like
java -cp /usr/java/SUNWappserver/lib/j2ee.jar:.:/usr/java/SUNWappserver/lib/appserv-rt.jar EJBCLIENTNAME.class
So Just adding the "appserv-rt.jar" in sun server lib folder to the classpath does the trick for providing the corba properties.
I am doing ejb 3.0
I try to implement Account example from Mastering Enterprise JavaBeans 3.0
When I run the client I also get the exception..Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
Hi I am new to EJB. i m getting the same error.plz could any point where i can find the appserv-rt.jar file plz i was trying to find for 2 hrs i am not able to find it.i am in urget any help would help me in great