corba client using erlang

Niclas Eklund <>
Fri Apr 21 09:53:46 CEST 2006


Hello!

I cannot tell why the omniORB-application throws that exception. Make sure
that an IOR or NamingContext is registered as "A_B" in the omniORB
nameservice.

Don't confuse 'missing_node' with an Erlang-node (it's just one out of
three reasons, missing_node, not_context and not_object, why the request
to the nameservice failed. Hence, sname will make no difference. What you
can do after you've started Orber and omniORB, is to use:

 erl> orber_diagnostics:nameservice().

or:

 erl> orber_diagnostics:nameservice(16#01).

This will show wwhat's stored in the remote nameservice.

You can also switch to more verbose built-in interceptor to get more
information (see for example the Debugging chapter in Orber's User's
Guide).

Is there a special reason why the interface is set to?
 
  Interface(s)..................: ["127.0.1.1"]

I assume that you intend to run Orber as a pure client-side ORB.

/Nick

PS The NameService is registered in the IFR when invoking
orber:install(..). But you must remember to register the
IDL-specifications you've written (e.g. os_MyModule:oe_register()). DS


On Thu, 20 Apr 2006, Igor Goryachev wrote:
> Hello.
> 
> I am erlang newbie and trying to write corba client using orber
> interface for using in the omniORB environment. I have already read
> orber users guide, but it did not help me match. Something still
> goes wrong.
> 
> The steps I perform:
> 
> % erl -mnesia dir '"mnesia.orberdb"'
> 
> :~/corba/idl% erl -mnesia dir '"mnesia.orberdb"'
> Erlang (BEAM) emulator version 5.4.13 [source] [hipe] [threads:0]
> [kernel-poll]
> 
> Eshell V5.4.13  (abort with ^G)
> 1> mnesia:create_schema([node()]).
> ok
> 2> mnesia:start().
> ok
> 3> corba:orb_init([{domain, "MyDiscSingleNodeORB"},{orbInitRef,"NameService=corbaloc:iiop:192.168.2.10:2809/NameService"},{interceptors, {native,[orber_iiop_tracer_stealth]}},{orber_debug_level, 10}]).
> ok
> 4> orber:install([node()],[{ifr_storage_type,disc_copies},{nameservice_storage_type, disc_copies}]).
> ok
> 5> orber:start().
> ok
> 6> NS = corba:resolve_initial_references("NameService").
> 
> =INFO REPORT==== 20-Apr-2006::18:38:52 ===
> =============== new_out_connection =======
> Node      : 
> >From      : 192.168.1.53:41010
> To        : 192.168.2.10:2809
> ==========================================
> 
> =INFO REPORT==== 20-Apr-2006::18:38:52 ===
> =============== out_request ==============
> Connection: {"192.168.2.10",2809,"192.168.1.53",41010}
> Operation : '_non_existent'
> ==========================================
> 
> =INFO REPORT==== 20-Apr-2006::18:38:52 ===
> =============== in_reply =================
> Connection: {"192.168.2.10",2809,"192.168.1.53",41010}
> Operation : '_non_existent'
> ==========================================
> {'IOP_IOR',"IDL:omg.org/CosNaming/NamingContext:1.0",
>            [{'IOP_TaggedProfile',0,
>                                  {'IIOP_ProfileBody_1_0',
>                                      {'IIOP_Version',1,0},
>                                      "192.168.2.10",
>                                      2809,
>                                      "NameService"}}]}
> 7> NC = lname_component:set_id(lname_component:create(), "A_B").
> {'CosNaming_NameComponent',"A_B",[]}
> 8> N = lname:insert_component(lname:create(), 1, NC).
> [{'CosNaming_NameComponent',"A_B",[]}]
> 9> 'CosNaming_NamingContext':resolve(NS, N).  
> 
> 
> =INFO REPORT==== 20-Apr-2006::18:40:00 ===
> =============== out_request ==============
> Connection: {"192.168.2.10",2809,"192.168.1.53",41010}
> Operation : resolve
> ==========================================
> 
> =INFO REPORT==== 20-Apr-2006::18:40:00 ===
> =============== in_reply =================
> Connection: {"192.168.2.10",2809,"192.168.1.53",41010}
> Operation : resolve
> ==========================================
> ** exited: {{nocatch,{'EXCEPTION',{'CosNaming_NamingContext_NotFound',
>                                       "IDL:omg.org/CosNaming/NamingContext/NotFound:1.0",
>                                       missing_node,
>                                       [{'CosNaming_NameComponent',"A_B",[]}]}}},
>             [{corba,raise,1},{shell,exprs,6},{shell,eval_loop,3}]} **
> 
> =ERROR REPORT==== 20-Apr-2006::18:40:00 ===
> Error in process <0.31.0> with exit value:
> {{nocatch,{'EXCEPTION',{'CosNaming_Naming
> Context_NotFound',"IDL:omg.org/CosNaming/NamingContext/NotFound:1.0",missing_node,[{
> 'CosNaming_NameComponent',"A_B",[]}]}}},[{corba,raise,1},{shell,exprs,6},{shell,eval_loop,3}]}
> 
> 
> Here is orber:info() output:
> 
> =INFO REPORT==== 20-Apr-2006::18:48:13 ===
> ======= Orber Execution Environment ======
> Orber version.................: 3.6.2
> Orber domain..................: MyDiscSingleNodeORB
> IIOP port number..............: 4001
> IIOP NAT port number..........: 4001
> Interface(s)..................: ["127.0.1.1"]
> Interface(s) NAT..............: ["127.0.1.1"]
> Local Interface (default).....: []
> Nodes in domain...............: []
> GIOP version (default)........: 1.1
> IIOP out timeout..............: infinity msec
> IIOP out connection timeout...: infinity msec
> IIOP setup connection timeout.: infinity msec
> IIOP out ports................: 0
> IIOP out connections..........: []
> IIOP out connections (pending): []
> IIOP in connections...........: []
> IIOP in connection timeout....: infinity msec
> IIOP max fragments............: infinity
> IIOP max in requests..........: infinity
> IIOP max in connections.......: infinity
> IIOP backlog..................: 5
> IIOP ACL......................: []
> IIOP maximum packet size......: infinity
> Object Keys GC interval.......: infinity
> Using Interceptors............: {native,[orber_iiop_tracer_stealth]}
> Using Local Interceptors......: false
> Debug Level...................: 10
> orbInitRef....................: "NameService=corbaloc:iiop:192.168.2.10:2809/NameService"
> orbDefaultInitRef.............: undefined
> System Flags Set..............: -
> =========================================
> 
> What is my mistake? What additional information should I provide?
> 
> Thank you very much for the attention.
> 
> 
> -- 
>     Igor Goryachev              E-Mail/Jabber: 





More information about the erlang-questions mailing list