| Author |
Cant access EJB from a J2SE client - Lookup Failed Error
|
Rajesh Khan
Ranch Hand
Joined: Oct 16, 2011
Posts: 230
|
|
I am using Netbeans and am experimenting with EJBs.
I have two projects (2 separate applications)
1- A J2EE Project called EnterpriseApp
2- A standard J2SE Project called Test
Now Here is what I did - in EnterpriseApp I generated a stateless EJB called TestEJB with both local and remote interfaces. For the remote project selection I selected the Test App. In short the bean code looks like this
And in the J2SE client Project here is my main class through which i am trying to access the bean
This is the contents of JNDI.properties file
java.naming.factory.initial = com.sun.enterprise.naming.SerialInitContextFactory
java.naming.factory.url.pkgs = com.sun.enterprise.naming
java.naming.factory.state = com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl
#optional. Defaults to localhost. Only needed if web server is running
#on a different host than the appserver
org.omg.CORBA.ORBInitialHost = localhost
#optional. Defaults to 3700. Only needed if target orb port is not 3700.
org.omg.CORBA.ORBInitialPort = 3700
And I get this error at
TestEjbRemote testEJB = (TestEjbRemote) ctx.lookup("stateless.TestEjbRemote");
Any suggestions on how i may resolve this issue ?
|
 |
James Boswell
Ranch Hand
Joined: Nov 09, 2011
Posts: 657
|
|
|
What web server is your App deployed to?
|
 |
 |
|
|
subject: Cant access EJB from a J2SE client - Lookup Failed Error
|
|
|