Hello all!
I'm constantly having troubles when trying to look up an EJB from a remote Application Server. I spent the last 3 Days trying to solve this without success. (I am new to EJB).
First of all, i was doing the same before with an application server in the same JVM and everything worked fine.
Application Server is Glassfish 3.1.2 (build 23) and is running on 10.1.15.202.
Somehow i do not see the formatting Toolbar, so i'm trying to keep my text clear with some lines.
First I'm setting the Properties for the initialContext:
=======================================
props = new Properties();
props.setProperty("java.naming.factory.initial", "com.sun.enterprise.naming.SerialInitContextFactory");
props.setProperty("java.naming.factory.url.pkgs", "com.sun.enterprise.naming");
props.setProperty("java.naming.factory.state", "com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");
props.setProperty("org.omg.CORBA.ORBInitialHost", "10.1.15.202");
props.setProperty("org.omg.CORBA.ORBInitialPort", "3700");
initialContext = new InitialContext(props);
=======================================
After this I'm trying to lookup my Remote EJB:
========================================
qib = (GetQueueInfoBeanRemote) initialContext.lookup("java:global/odin-core-maven-ear-0.5-new/odin-core-maven-ejb/GetQueueInfoBean");
========================================
If I run my Code now, nothing happens. By Debugging i found out that everything works fine until the lookup of the Bean. At this point the IDE keeps working and working... Even after half an hour there was no result.
If I change the Port to 8080 (even though the orb-listener-1 in the admin gui is configured to 3700) I receive following error:
========================================
org.omg.CORBA.COMM_FAILURE: Fein: 00410008: Connection abort vmcid: OMG minor code: 8 completed: Maybe
at $Proxy17.connectionAbort(Unknown Source)
at com.sun.corba.ee.impl.transport.ConnectionImpl.doOptimizedReadStrategy(ConnectionImpl.java:1425)
at com.sun.corba.ee.impl.transport.ConnectionImpl.doWork(ConnectionImpl.java:984)
at com.sun.corba.ee.impl.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:497)
at com.sun.corba.ee.impl.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:540)
JNDI Lookup of GetQueueInfoBean failed.
Caused by: org.omg.CORBA.COMM_FAILURE: Fein: 00410011: IOException received when reading from connection SocketOrChannelConnectionImpl[ java.nio.channels.SocketChannel[connected local=/127.0.0.1:1560 remote=10.1.15.202/10.1.15.202:8080] ESTABLISHED true true] vmcid: OMG minor code: 11 completed: No
at $Proxy17.ioexceptionWhenReadingConnection(Unknown Source)
at com.sun.corba.ee.impl.transport.ConnectionImpl.nonBlockingRead(ConnectionImpl.java:1600)
at com.sun.corba.ee.impl.transport.ConnectionImpl.doOptimizedReadStrategy(ConnectionImpl.java:1379)
... 3 more
Caused by: java.io.IOException: End-of-stream
at com.sun.corba.ee.impl.transport.ConnectionImpl.nonBlockingRead(ConnectionImpl.java:1593)
... 4 more
javax.naming.NamingException: Lookup failed for 'java:global/odin-core-maven-ear-0.5-new/odin-core-maven-ejb/GetQueueInfoBean!de.aco.odin.gui.GetQueueInfoBeanRemote' in SerialContext[myEnv={org.omg.CORBA.ORBInitialPort=8080, java.naming.factory.initial=com.sun.enterprise.naming.SerialInitContextFactory, org.omg.CORBA.ORBInitialHost=10.1.15.202, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is javax.naming.NamingException: Unable to acquire SerialContextProvider for SerialContext[myEnv={org.omg.CORBA.ORBInitialPort=8080, java.naming.factory.initial=com.sun.enterprise.naming.SerialInitContextFactory, org.omg.CORBA.ORBInitialHost=10.1.15.202, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is org.omg.CORBA.COMM_FAILURE: Fein: 00410008: Connection abort vmcid: OMG minor code: 8 completed: Maybe]]
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:491)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:438)
at javax.naming.InitialContext.lookup(InitialContext.java:411)
at acodyn_gui.CoreConnection.lookupGetQueueInfoBean(CoreConnection.java:185)
at acodyn_gui.Acodyn_GUI.main(Acodyn_GUI.java:47)
Caused by: javax.naming.NamingException: Unable to acquire SerialContextProvider for SerialContext[myEnv={org.omg.CORBA.ORBInitialPort=8080, java.naming.factory.initial=com.sun.enterprise.naming.SerialInitContextFactory, org.omg.CORBA.ORBInitialHost=10.1.15.202, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is org.omg.CORBA.COMM_FAILURE: Fein: 00410008: Connection abort vmcid: OMG minor code: 8 completed: Maybe]
at com.sun.enterprise.naming.impl.SerialContext.getProvider(SerialContext.java:334)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:477)
... 4 more
Caused by: org.omg.CORBA.COMM_FAILURE: Fein: 00410008: Connection abort vmcid: OMG minor code: 8 completed: Maybe
at $Proxy17.connectionAbort(Unknown Source)
at com.sun.corba.ee.impl.transport.ConnectionImpl.doOptimizedReadStrategy(ConnectionImpl.java:1425)
at com.sun.corba.ee.impl.transport.ConnectionImpl.doWork(ConnectionImpl.java:984)
at com.sun.corba.ee.impl.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:497)
at com.sun.corba.ee.impl.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:540)
Caused by: org.omg.CORBA.COMM_FAILURE: Fein: 00410011: IOException received when reading from connection SocketOrChannelConnectionImpl[ java.nio.channels.SocketChannel[connected local=/127.0.0.1:1560 remote=10.1.15.202/10.1.15.202:8080] ESTABLISHED true true] vmcid: OMG minor code: 11 completed: No
at $Proxy17.ioexceptionWhenReadingConnection(Unknown Source)
at com.sun.corba.ee.impl.transport.ConnectionImpl.nonBlockingRead(ConnectionImpl.java:1600)
at com.sun.corba.ee.impl.transport.ConnectionImpl.doOptimizedReadStrategy(ConnectionImpl.java:1379)
... 3 more
Caused by: java.io.IOException: End-of-stream
at com.sun.corba.ee.impl.transport.ConnectionImpl.nonBlockingRead(ConnectionImpl.java:1593)
... 4 more
BUILD SUCCESSFUL (total time: 52 seconds)
=======================================
I've experimented serveral hours with different settings. Now i don't know what to do.
As far as I know is the error message very similar to the one you receive when you forget to add the gf-client.jar to the classpath of your Client. I get this message even after adding it (I added the one from my local glassfish installation). Am i not allowed to use port 8080 for EJB Lookup? When using 3700 i dont get an answer at all.
Could somebody give me a hint? Thank you very much in advance!