Discussion:
[omniORB] Issue while generating IOR
Shriram Gopalakrishnan
2009-08-04 18:16:04 UTC
Permalink
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
Duncan Grisby
2009-08-11 22:06:04 UTC
Permalink
I have issue while consuming cobra services using the IOR as generated by the
[... lots of Java ...]
WARNING: "IOP00410210: (COMM_FAILURE) Received a GIOP MessageError, indicating header corruption or version mismatch"
[...]
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
It's far from clear what you are trying to achieve, and what it has to
do with omniORB. The way you are using genior means that it will be
generating its own object key, which probably isn't what you intend.

If anyone is going to be able to help you, you will have to explain what
you are doing and why, what things work, and where exactly the problem
occurs.

Duncan.
--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --
Shriram Gopalakrishnan
2009-08-12 18:01:14 UTC
Permalink
Duncan - Thanks for replying, Initially I was generating IOR using genior in
windows with below syntax on OmniORB4.1.3. The generated IOR would be used
as harded value in my application to consume CORBA API services. Since IP
Address/Port No forms an important ingredient in the below syntax to
generate IOR, there were high possibility that this IP gets changed which
would mean that I have to re-generate IOR on fly which the same syntax as
below on LINUX platform.
Although the IOR is generated by errors out indicating header corruption
expection as mentioned below. Point to be noted is that I do not use object
key in syntax below which works in windows generated IOR but gives problem
in LINUX generated IOR.
genior "IDL:DCM/DeviceControl:1.0" "172.26.64.62" "5003"
Thanks & Regards
G.Shriram
Post by Shriram Gopalakrishnan
I have issue while consuming cobra services using the IOR as generated by
the
[... lots of Java ...]
Post by Shriram Gopalakrishnan
WARNING: "IOP00410210: (COMM_FAILURE) Received a GIOP MessageError,
indicating header corruption or version mismatch"
[...]
Post by Shriram Gopalakrishnan
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
It's far from clear what you are trying to achieve, and what it has to
do with omniORB. The way you are using genior means that it will be
generating its own object key, which probably isn't what you intend.
If anyone is going to be able to help you, you will have to explain what
you are doing and why, what things work, and where exactly the problem
occurs.
Duncan.
--
-- Duncan Grisby --
-- http://www.grisby.org --
--
Thanks & Regards
G. Shriram
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20090812/41ca77c6/attachment.htm
Loading...