[omniORB] Object reference Nil

Rama rrach001 at fiu.edu
Thu Aug 28 22:41:53 BST 2003


I am not sure why this happens
when i set the InitRef in OmniOrb.cfg

InitRef=corbaname::SERVERIP:PORT/NameService#vts/soa/ConnectionFactory/1966
OR
InitRef=corbaname::SEVERIP:PORT
OR when i call
CORBA::Object_ptr obj=orb->string_to_object("corbaname::SERVERIP:PORT/NameService#vts/soa/ConnectionFactory/1966")

I always get a COMM_FAILURE error 

But when i run the OmniNames with the above settings and then copy the IOR string generated on my DOS output to the OmniOrb.cfg file and comment the previous Initref value with this new IOR i dont get any COMM_FAILURE ERROR, i can see from the trace that i am able to connect to the server, but my OBJECT REFERENCE is always NIL while narrowing the context to the factory object.
Pl find attached the trace log and the sample of the code is shown below

CORBA::Object_var obj = orb->resolve_initial_references("NameService");
CosNaming::NamingContext_var rootContext;
rootContext=CosNaming::NamingContext::_narrow(obj);

 if (CORBA::is_nil(rootContext)){
    MessageBox("Cannot narrow references to type  NameContext","Error",MB_ICONSTOP | MB_OK); orb->destroy();
 return;
 }
 VtsSoaApi::VtsSoaConnectionFactory_var connectionRef=VtsSoaApi::VtsSoaConnectionFactory::_narrow(obj);
          
 if (CORBA::is_nil(connectionRef)){
       MessageBox("Cannot narrow references to type NameContext","Error",MB_ICONSTOP | MB_OK);
		  orb->destroy();
		  return;

		 }

	 

-------------- next part --------------

Starting omniNames for the first time.
omniORB: AsyncInvoker: thread id = 1 has started. Total threads = 1
omniORB: giopRendezvouser task execute for giop:tcp:10.1.0.150:2809
Wrote initial log file.
omniORB: Adding key<0x4e616d6553657276696365> (activating) to object t
omniORB: State key<0x4e616d6553657276696365> (activating) -> active
Read log file successfully.
omniORB: Creating ref to local: key<0x4e616d6553657276696365>
 target id      : IDL:omg.org/CosNaming/NamingContextExt:1.0
 most derived id: IDL:omg.org/CosNaming/NamingContextExt:1.0
Root context is IOR:010000002b00000049444c3a6f6d672e6f72672f436f734e61
4e616d696e67436f6e746578744578743a312e30000001000000000000006000000001
000031302e312e302e3135300000f90a00000b0000004e616d65536572766963650002
0000080000000100000000545441010000001c00000001000000010001000100000001
01000100000009010100
Checkpointing Phase 1: Prepare.
Checkpointing Phase 2: Commit.
Checkpointing completed.
omniORB: Server accepted connection from giop:tcp:10.1.0.150:1392
omniORB: AsyncInvoker: thread id = 2 has started. Total threads = 3
omniORB: AsyncInvoker: thread id = 3 has started. Total threads = 3
omniORB: Scavenger task execute.
omniORB: giopWorker task execute.
omniORB: Accepted connection from giop:tcp:10.1.0.150:1392 because of
 "* unix,ssl,tcp"
omniORB: inputMessage: from giop:tcp:10.1.0.150:1392 126 bytes
omniORB:
4749 4f50 0102 0100 7200 0000 0200 0000 GIOP....r.......
0300 0000 0000 cdcd 0b00 0000 4e61 6d65 ............Name
5365 7276 6963 65cd 0600 0000 5f69 735f Service....._is_
6100 cdcd 0100 0000 0100 0000 0c00 0000 a...............
0100 0000 0100 0100 0901 0100 cdcd cdcd ................
2a00 0000 4944 4c3a 5674 7353 6f61 4170 *...IDL:VtsSoaAp
692f 5674 7353 6f61 436f 6e6e 6563 7469 i/VtsSoaConnecti
6f6e 4661 6374 6f72 793a 312e 3000      onFactory:1.0.
omniORB:  recieve codeset service context and set TCS to (ISO-8859-1,U
omniORB: Dispatching remote call '_is_a' to: key<0x4e616d6553657276696
ve)
omniORB: sendChunk: to giop:tcp:10.1.0.150:1392 25 bytes
omniORB:
4749 4f50 0102 0101 0d00 0000 0200 0000 GIOP............
0000 0000 0000 0000 00                  .........
omniORB: Scan for idle connections (1062095047,942000000)
omniORB: Scavenger reduce idle count for strand 00338BB8 to 35
omniORB: Scan for idle connections done (1062095047,942000000).
omniORB: Scan for idle connections (1062095054,361000000)
omniORB: Scavenger reduce idle count for strand 00338BB8 to 34
omniORB: Scan for idle connections done (1062095054,361000000).
omniORB: Scan for idle connections (1062095059,368000000)
omniORB: Scavenger reduce idle count for strand 00338BB8 to 33
omniORB: Scan for idle connections done (1062095059,368000000).
omniORB: Scan for idle connections (1062095064,375000000)
omniORB: Scavenger reduce idle count for strand 00338BB8 to 32
omniORB: Scan for idle connections done (1062095064,375000000).
omniORB: inputMessage: from giop:tcp:10.1.0.150:1392 12 bytes
omniORB:
4749 4f50 0102 0105 0000 0000           GIOP........
omniORB: throw giopStream::CommFailure from giopImpl12.cc:1242(0,NO,CO
_UnMarshalArguments)
omniORB: Server connection refcount = 1
omniORB: Server connection refcount = 0
omniORB: Server close connection from giop:tcp:10.1.0.150:1392
omniORB: Scan for idle connections (1062095069,392000000)
omniORB: Scan for idle connections done (1062095069,392000000).
omniORB: Scan for idle connections (1062095074,440000000)
omniORB: Scan for idle connections done (1062095074,440000000).


More information about the omniORB-list mailing list