newbie orber question

Lonnie Smith lonnie_smith@REDACTED
Mon Dec 26 07:01:40 CET 2005


Hi -

I recently began experimenting with CORBA in Erlang, and I'm having some
trouble with a pretty basic step: resolving an initial NameService
reference. I've tried to follow the instructions in Orber manual, but so
far am having no luck.

$ erl -mnesia dir '"/usr/local/dbs/mnesia.orberdb"'
Erlang (BEAM) emulator version 5.4.10 [source] [hipe] [threads:0]
[kernel-poll]

Eshell V5.4.10  (abort with ^G)
1> mnesia:create_schema([node()]).
ok
2> mnesia:start().
ok
3> corba:orb_init([{domain, "MyDiscSingleNodeORB"}, {orbInitRef,
"NameService=corbaname::vbox:21012"}, {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_reference("NameService").  

=ERROR REPORT==== 25-Dec-2005::21:47:50 ===
Error in process <0.30.0> with exit value:
{undef,[{corba,resolve_initial_reference,["NameService"]},{erl_eval,do_apply,5},{erl_eval,expr,5},{shell,exprs,6},{shell,eval_loop,3}]}

** exited: {undef,[{corba,resolve_initial_reference,["NameService"]},
                   {erl_eval,do_apply,5},
                   {erl_eval,expr,5},
                   {shell,exprs,6},
                   {shell,eval_loop,3}]} **
7> corba:list_initial_services().                                        
["NameService","NameService"]

It seems a bit odd that two "NameServices" are listed. If I call
corba:list_initial_services() before starting the orber application,
only one NameService is listed. If I don't specify an orbInitRef
argument to the corba:orb_init() call, there is only one NameService
listed, but I get the same error:

$ erl -mnesia dir '"/usr/local/dbs/mnesia.orberdb"' 
Erlang (BEAM) emulator version 5.4.10 [source] [hipe] [threads:0]
[kernel-poll]

Eshell V5.4.10  (abort with ^G)
1> mnesia:start().
ok
2>  corba:orb_init([{domain, "MyDiscSingleNodeORB"}, {orber_debug_level,
10}]). 
ok
3> corba:list_initial_services().
[]
4> orber:start().
ok
5> corba:list_initial_services().
["NameService"]
6> NS = corba:resolve_initial_reference("NameService").

=ERROR REPORT==== 25-Dec-2005::21:52:44 ===
Error in process <0.30.0> with exit value:
{undef,[{corba,resolve_initial_reference,["NameService"]},{erl_eval,do_apply,5},{erl_eval,expr,5},{shell,exprs,6},{shell,eval_loop,3}]}

** exited: {undef,[{corba,resolve_initial_reference,["NameService"]},
                   {erl_eval,do_apply,5},
                   {erl_eval,expr,5},
                   {shell,exprs,6},
                   {shell,eval_loop,3}]} **

I should add that I'm fairly new to Erlang, so I might be making some
other mistakes as well. As I understand it, the orber-app/corba module
is going to try to contact the OMG compliant Name Service at the
specified host and port number. If I'm running an omniORB's omniNames
server listening on vbox:21012, the orber-app/corba-module should be
able to use that Name Service, right?

I'd like to be able to begin using Erlang in a C++/Python omniORB
environment, but so far I'm not getting stuck on the first step. Thanks
for any thoughts or suggestions.

Lonnie
-- 
  Lonnie Smith
  lonnie_smith@REDACTED

-- 
http://www.fastmail.fm - Accessible with your email software
                          or over the web




More information about the erlang-questions mailing list