users@glassfish.java.net

SerialContextProvider

From: <glassfish_at_javadesktop.org>
Date: Tue, 10 Jul 2007 15:34:33 PDT

I am trying to lookup EJB Bean but I am getting following error:

Jul 10, 2007 3:28:28 PM com.sun.corba.ee.impl.protocol.giopmsgheaders.MessageBas
e readGIOPHeader
WARNING: "IOP00710220: (INTERNAL) Error in GIOP magic"
org.omg.CORBA.INTERNAL: vmcid: SUN minor code: 220 completed: Maybe
        at com.sun.corba.ee.impl.logging.ORBUtilSystemException.giopMagicError(O
RBUtilSystemException.java:4324)
        at com.sun.corba.ee.impl.logging.ORBUtilSystemException.giopMagicError(O
RBUtilSystemException.java:4338)
        at com.sun.corba.ee.impl.protocol.giopmsgheaders.MessageBase.readGIOPHea
der(MessageBase.java:163)
        at com.sun.corba.ee.impl.transport.CorbaContactInfoBase.createMessageMed
iator(CorbaContactInfoBase.java:153)
        at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.readBit
s(SocketOrChannelConnectionImpl.java:325)
        at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.handleE
vent(SocketOrChannelConnectionImpl.java:1171)
        at com.sun.corba.ee.impl.transport.SelectorImpl.run(SelectorImpl.java:27
5)
Jul 10, 2007 3:28:28 PM com.sun.corba.ee.spi.logging.LogWrapperBase doLog
INFO: "IOP00710299: (INTERNAL) Successfully created IIOP listener on the specifi
ed host/port: all interfaces/1600"
javax.naming.CommunicationException: Can't find SerialContextProvider [Root exce
ption is org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 208 completed: Ma
ybe]
        at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.jav
a:135)
        at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288
)
        at javax.naming.InitialContext.lookup(Unknown Source)
        at com.intuit.ejb.client.test.SlessJavaClient.main(Unknown Source)
Caused by: org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 208 completed:
Maybe
        at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectionAbort(
ORBUtilSystemException.java:2429)
        at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectionAbort(
ORBUtilSystemException.java:2447)
        at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.readBit
s(SocketOrChannelConnectionImpl.java:371)
        at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.handleE
vent(SocketOrChannelConnectionImpl.java:1171)
        at com.sun.corba.ee.impl.transport.SelectorImpl.run(SelectorImpl.java:27
5)
Caused by: org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 211 completed:
 No
        at com.sun.corba.ee.impl.logging.ORBUtilSystemException.ioexceptionWhenR
eadingConnection(ORBUtilSystemException.java:2513)
        at com.sun.corba.ee.impl.logging.ORBUtilSystemException.ioexceptionWhenR
eadingConnection(ORBUtilSystemException.java:2531)
        at com.sun.corba.ee.impl.protocol.giopmsgheaders.MessageBase.readGIOPHea
der(MessageBase.java:123)
        at com.sun.corba.ee.impl.transport.CorbaContactInfoBase.createMessageMed
iator(CorbaContactInfoBase.java:153)
        at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.readBit
s(SocketOrChannelConnectionImpl.java:325)
        ... 2 more
Caused by: java.io.IOException: An established connection was aborted by the sof
tware in your host machine
        at sun.nio.ch.SocketDispatcher.read0(Native Method)
        at sun.nio.ch.SocketDispatcher.read(Unknown Source)
        at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
        at sun.nio.ch.IOUtil.read(Unknown Source)
        at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
        at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.readFul
ly(SocketOrChannelConnectionImpl.java:643)
        at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.read(So
cketOrChannelConnectionImpl.java:541)
        at com.sun.corba.ee.impl.protocol.giopmsgheaders.MessageBase.readGIOPHea
der(MessageBase.java:119)
        ... 4 more

What could be the problem ? Code is as follows:
            Properties 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");

            // optional. Defaults to localhost. Only needed if web server is running
            // on a different host than the appserver
            props.setProperty("org.omg.CORBA.ORBInitialHost", "localhost");

            // optional. Defaults to 3700. Only needed if target orb port is not 3700.
            props.setProperty("org.omg.CORBA.ORBInitialPort", "1099");
            
            /*Hashtable env = new Hashtable();
            env.put(Context.INITIAL_CONTEXT_FACTORY,
       "com.sun.enterprise.naming.SerialInitContextFactory");
               // -- assuming you're application server is running --
               // -- on localhost:1099 --
            env.put(Context.PROVIDER_URL, "iiop://localhost:1099");*/


            InitialContext ic = new InitialContext(props);


            
            Sless sless = (Sless) ic.lookup("EJB3Test/SlessBean/remote");
            System.out.println("Sless bean says : " + sless.hello());
[Message sent by forum member 'mohitanchlia' (mohitanchlia)]

http://forums.java.net/jive/thread.jspa?messageID=226078