I’m trying to run an example of CORBA in C++ on Ubuntu 12.04:
http://www.yolinux.com/TUTORIALS/CORBA.html
and I still have an error when I’m trying to run:
$ ./Server
'IOR:010000001600000049444c3a446174612f53657276696365413a312e3000000001000000000000006800000001010200100000003139322e3136382e3135392e31323900b1aa00000e000000fe4ba4015100001a19000000000000000200000000000000080000000100000000545441010000001c00000001000000010001000100000001000105090101000100000009010100'
Caught CORBA::SystemException.
before starting Server I generated a log file:
omniNames -start 2812 -logdir ~/Desktop -errlog ~/Desktop/omniNamesError.txt
which gave me a file ~/Desktop/omniNamesError.txt as below:
Thu Jan 24 22:54:34 2013:
Starting omniNames for the first time.
Wrote initial log file.
Read log file successfully.
Root context is IOR:010000002b00000049444c3a6f6d672e6f72672f436f734e616d696e672f4e616d696e67436f6e746578744578743a312e30000001000000000000007400000001010200100000003139322e3136382e3135392e31333000fd0a00000b0000004e616d6553657276696365000300000000000000080000000100000000545441010000001c0000000100000001000100010000000100010509010100010000000901010003545441080000009aad015101004982
Checkpointing Phase 1: Prepare.
Checkpointing Phase 2: Commit.
Checkpointing completed.
Next I added at the file:
/etc/omniORB.cfg
line from the generated file:
InitRef = NameService=IOR:000100010000000100010509010100010000000901010003545\
441080000005ea5015101002002010000002b00000049444c3a6f6d672e6f72672f436f734e61\
6d696e672f4e616d696e67436f6e746578744578743a312e30000001000000000000007400000\
001010200100000003139322e3136382e3135392e31333000fd0a00000b0000004e616d655365\
7276696365000300000000000000080000000100000000545441010000001c000000010000000\
1000100010000000100010509010100010000000901010003545441080000009aad0151010049\
82
I also set environment variable:
$ export OMNIORB_CONFIG=/etc/omniORB.cfg
everything as it is written at tutorial, files compiled (after 2 modifications:
I added: #include at CRequestServiceA.cpp
and I changed $(CC) $(CPPFLAGS) $(INCLUDES) DataSK.cc into $(CC) $(CPPFLAGS) $(INCLUDES) DataSK.cc && mv DataSK.o Data.o in MakeServer) but I still have an error as I told.
Please help me with the problem, I was learning from many CORBA C++ tutorials and no effects
Those backslashes in your config file might be causing the problem. To avoid problems with pasting a lengthy IOR (that will change) into your config file, try setting your
InitRefas follows in your config file (assuming your are running the name service on the same machine as your test program).Or you could try pasting the IOR as one line (don’t break the line up or add backslashes).
Or you could run your server like this:
Or
If you do use the IOR string, please realize it will almost certainly change every time you run the naming service, so make sure you are using the most current one.
Please see the omniORB documentation for more information.
Edit after seeing your comment:
The tutorial might be old and out of date. Try changing this line:
to this
You may also wish to work through the Echo example in the omniORB documentation.