[omniORB] Issue while generating IOR

Shriram Gopalakrishnan shriram.g at photoninfotech.net
Tue Aug 4 18:45:30 BST 2009


I have issue while consuming cobra services using the IOR as generated by
the code below:

*public* *static* String generateIOR(String ipAddress, String portNo)
                *throws* Exception {
        String ior = "";
        DataInputStream data = *null*;
        Process p = *null*;
        String methodName = "generateIOR";
        String IOR_CMD = "genior IDL:DCM\\DeviceControl:1.0 " + ipAddress +" "+
                         portNo; // - Linux
        System.out.println("Generating IOR Using:" + IOR_CMD);
        *try* {
                Runtime r = Runtime.getRuntime();
                p = r.exec(IOR_CMD);
                data = *new* DataInputStream(p.getInputStream());
                *int* c;
                StringBuffer buf = *new* StringBuffer();
                *while* ((c = data.read()) != -1) {
                        buf.append((*char*) c);
                }
                ior = buf.toString();
                } *catch* (Exception e) {
                System.out.println(e);
        } *finally* {
                *if* (data != *null*)
                        data.close();
                *if* (p != *null*)
                        p.destroy();
        }
        *return* ior;


Code which uses the above IOR to access the CORBA API

*try* {
                this.serverVO = serverVO;
                String arg[] = { "-ORBInitialHost", serverVO.getServerIP(),
                                "-ORBInitialPort", "5003",
                                "-ORBGIOPVersion", "1.1" };
                orb = ORB.init(arg,*null*);
                obj = orb.string_to_object(serverVO.getDcmIOR().trim());
                deviceControlImpl = DeviceControlHelper.narrow(obj);
        } *catch* (Exception e) {
                System.out.println(e);}


Exception message is given below:

WARNING: "IOP00410210: (COMM_FAILURE) Received a GIOP MessageError,
indicating header corruption or version mismatch"
org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 210  completed: No
        at com.sun.corba.se.impl.logging.ORBUtilSystemException.recvMsgError(ORBUtilSystemException.java:2456)
        at com.sun.corba.se.impl.logging.ORBUtilSystemException.recvMsgError(ORBUtilSystemException.java:2478)
        at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:832)
        at com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase.callback(MessageBase.java:918)
        at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:694)
        at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:451)
        at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1213)
        at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:471)
        at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:500)
Unable to connect to DCM Server null</b> with ip 172.26.64.62
 Exception:org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 210
completed: Maybe
c


Quick help will be really appreciated. Thanks in advance

-- 
Thanks & Regards
G. Shriram
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20090804/7d7d5887/attachment.htm


More information about the omniORB-list mailing list