This content has been marked as final. Show 19 replies
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.
It works for me!!
I have find the code to specify the naming context property to access another host
Properties props = new Properties();
// optional. Defaults to localhost. Only needed if web server is running
// on a different host than the appserver
// optional. Defaults to 3700. Only needed if target orb port is not 3700.
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
How to get around in EJB 3.0??
urgent help plz.