users@glassfish.java.net

Re: minimal client setup for EJB call

From: <thomas_at_randspringer.de>
Date: Wed, 4 Aug 2010 17:36:49 +0200 (CEST)

Hi,
 
I found a solution. I had an entry in my /etc/hosts at server side:
 
127.0.0.2      porschberg.osp-dd.de porschberg
 
After I commented out this entry it works now.
Can this someone explain?
 
Thomas
 

"thomas_at_randspringer.de" <thomas_at_randspringer.de> hat am 4. August 2010 um 17:05 geschrieben:

> Still an addition: After I set the loglevel from javax.enterprise.resource.corba to FINEST I see the following in the server.log:
>
> >snip
>  
> [#|2010-08-04T17:02:12.864+0200|FINE|glassfish3.0.1|javax.enterprise.resource.corba.ee.S1AS-ORB.rpc.transport|_ThreadID=34;_ThreadName=Thread-1;ClassName=com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl;MethodName=blockingRead;|"IOP00410234: (COMM_FAILURE) Received java.io.IOException: End-of-Stream, in a blocking read on connection, SocketOrChannelConnectionImpl[ java.nio.channels.SocketChannel[connected local=/172.29.101.158:20001 remote=/172.29.100.112:3875] ESTABLISHED true true], because an end of stream was detected"
> org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 234  completed: No
>         at com.sun.corba.ee.impl.logging.ORBUtilSystemException.blockingReadEndOfStream(ORBUtilSystemException.java:4364)
>         at com.sun.corba.ee.impl.logging.ORBUtilSystemException.blockingReadEndOfStream(ORBUtilSystemException.java:4388)
>         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.blockingRead(SocketOrChannelConnectionImpl.java:1785)
>         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doOptimizedReadStrategy(SocketOrChannelConnectionImpl.java:1671)
>         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1216)
>         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:492)
>         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:528)
> |#]
>
> [#|2010-08-04T17:02:12.864+0200|FINE|glassfish3.0.1|javax.enterprise.resource.corba.ee.S1AS-ORB.rpc.transport|_ThreadID=34;_ThreadName=Thread-1;ClassName=com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl;MethodName=doOptimizedReadStrategy;|"IOP00410208: (COMM_FAILURE) Connection abort"
> org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 208 completed: Maybe
>         at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectionAbort(ORBUtilSystemException.java:3603)
>         at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectionAbort(ORBUtilSystemException.java:3621)
>         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doOptimizedReadStrategy(SocketOrChannelConnectionImpl.java:1726)
>         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1216)
>         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:492)
>         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:528)
> Caused by: org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 234  completed: No
>         at com.sun.corba.ee.impl.logging.ORBUtilSystemException.blockingReadEndOfStream(ORBUtilSystemException.java:4364)
>         at com.sun.corba.ee.impl.logging.ORBUtilSystemException.blockingReadEndOfStream(ORBUtilSystemException.java:4388)
>         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.blockingRead(SocketOrChannelConnectionImpl.java:1785)
>         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doOptimizedReadStrategy(SocketOrChannelConnectionImpl.java:1671)
>         ... 3 more
> |#]
>
> [#|2010-08-04T17:02:12.866+0200|FINE|glassfish3.0.1|javax.enterprise.resource.corba.ee.S1AS-ORB.rpc.transport|_ThreadID=34;_ThreadName=Thread-1;ClassName=com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl;MethodName=doOptimizedReadStrategy;|"IOP00410228: (COMM_FAILURE) Throwable received in doOptimizedReadStrategy"
> org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 228  completed: No
>         at com.sun.corba.ee.impl.logging.ORBUtilSystemException.throwableInDoOptimizedReadStrategy(ORBUtilSystemException.java:4189)
>         at com.sun.corba.ee.impl.logging.ORBUtilSystemException.throwableInDoOptimizedReadStrategy(ORBUtilSystemException.java:4207)
>         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doOptimizedReadStrategy(SocketOrChannelConnectionImpl.java:1735)
>         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1216)
>         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:492)
>         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:528)
> Caused by: org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 234  completed: No
>         at com.sun.corba.ee.impl.logging.ORBUtilSystemException.blockingReadEndOfStream(ORBUtilSystemException.java:4364)
>         at com.sun.corba.ee.impl.logging.ORBUtilSystemException.blockingReadEndOfStream(ORBUtilSystemException.java:4388)
>         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.blockingRead(SocketOrChannelConnectionImpl.java:1785)
>         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doOptimizedReadStrategy(SocketOrChannelConnectionImpl.java:1671)
>         ... 3 more
> |#]
> >snip
>
>  
> ?!
> Thomas
>  
>
> "thomas_at_randspringer.de" <thomas_at_randspringer.de> hat am 4. August 2010 um 15:45 geschrieben:
>
> > I have a remark to my second question:
> >  
> > First I looked up the context with:
> >  
> > props.setProperty("org.omg.CORBA.ORBInitialHost", "porschberg.osp-dd.de");
> > props.setProperty("org.omg.CORBA.ORBInitialPort", "20001");
> > bean = (TraceEJBRemote) new InitialContext(props).lookup("de.otto.cobra.business.TraceEJB");
> >  
> > Now I use the default constructor -->
> > bean = (TraceEJBRemote) new InitialContext().lookup("de.otto.cobra.business.TraceEJB");
> >  
> > and start the client with
> > -Dorg.omg.CORBA.ORBInitialHost=porschberg.osp-dd.de -Dorg.omg.CORBA.ORBInitialPort=20001
> >  
> > This lead not to a solution on the bluebird non-local machine but to a new kind of error on client side-->
> >  
> > >snip
> > org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 208 completed: Maybe
> >         at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectionAbort(ORBUtilSystemException.java:3603)
> > >snip
> >  
> > In the server.log I see no output.
> >  
> > Any ideas?
> >  
> > Thomas
> >  
> >  
> >
> > "thomas_at_randspringer.de" <thomas_at_randspringer.de> hat am 4. August 2010 um 14:45 geschrieben:
> >
> > > Hi,
> > >  
> > > I wrote a tiny SWING-GUI which calls an EJB in my glassfish server.
> > > On the SWING-GUI machine I have no glassfish installation so I started the GUI in this way:
> > >  
> > > #from my shell skript
> > >  
> > > >snip
> > >  
> > > BASE=`pwd`/lib
> > > java -cp $BASE/gf-client.jar:$BASE/trace-minimal-01.jar:. SwingMeetsGlassfish
> > >  
> > > >snip
> > >  
> > > I had to create a directory "modules" parallel to "lib" which contains the jars referenced from MANIFEST.MF in gf-client.jar.
> > >  
> > > This works on my machine.
> > >  
> > > My fist question is: Is this the preferred way to start a client which communicates with a glassfish server?
> > >  
> > >  
> > > I have a further question:
> > > I copied this client-installation to another machine say bluebird and called the script from there. I get an
> > > Exception in thread "main" javax.naming.NamingException: Lookup failed for 'de.otto.cobra.business.TraceEJB' in SerialContext targetHost=porschberg.osp-dd.de,targetPort=3700,orb'sInitialHost=localhost,orb'sInitialPort=3700 [Root exception is javax.naming.NameNotFoundException: de.otto.cobra.business.TraceEJB not found]
> > >         at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:442)
> > >  
> > > porschberg.osp-dd.de is the glassfish server.
> > > Why does it work on my own machine but not from another? I could do a "telnet porschberg.osp-dd.de 3700" from this bluebird machine.
> > >  
> > > Any ideas?
> > >  
> > > Thomas
> > >