473,789 Members | 2,422 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Simple omniORBpy example throws exception with error 0x41540002

Hi,

I am trying to get the files from this tutorial to work:
http://www.grisby.org/presentations/py10code.html

Direct link to the files:
http://www.grisby.org/presentations/py10code/adder.idl
http://www.grisby.org/presentations/...adderServer.py

It produces the following error:

$ omniidl -bpython adder.idl && python adderServer.py
Traceback (most recent call last):
File "adderServer.py ", line 23, in <module>
nameRoot = nameRoot._narro w(CosNaming.Nam ingContext)
File "/usr/lib/python2.5/site-packages/omniORB/CORBA.py", line 667,
in _narrow
return _omnipy.narrow( self, dest._NP_Reposi toryId)
omniORB.CORBA.T RANSIENT: Minor: 0x41540002, COMPLETED_NO.

According to Google this might mean "Connect failed", however, I don't
understand why the server would open a connection. I expected it to
simply listen on a socket, but I probably just don't understand how it
works.

Can anyone please explain this?

-Samuel

May 22 '07 #1
6 3233
Samuel wrote:
Hi,

I am trying to get the files from this tutorial to work:
http://www.grisby.org/presentations/py10code.html

Direct link to the files:
http://www.grisby.org/presentations/py10code/adder.idl
http://www.grisby.org/presentations/...adderServer.py

It produces the following error:

$ omniidl -bpython adder.idl && python adderServer.py
Traceback (most recent call last):
File "adderServer.py ", line 23, in <module>
nameRoot = nameRoot._narro w(CosNaming.Nam ingContext)
File "/usr/lib/python2.5/site-packages/omniORB/CORBA.py", line 667,
in _narrow
return _omnipy.narrow( self, dest._NP_Reposi toryId)
omniORB.CORBA.T RANSIENT: Minor: 0x41540002, COMPLETED_NO.

According to Google this might mean "Connect failed", however, I don't
understand why the server would open a connection. I expected it to
simply listen on a socket, but I probably just don't understand how it
works.

Can anyone please explain this?
It indeed does open a connection - because it wants to register with a
NameServer.

This is basically a bootstrapping-problem. You have to somehow distribute
object references to connect clients to servers. You can do so by using
persistent IORs and configure these for the client. You can also place them
on a network-location somehow.

Or you can configure a name-server for your ORB, and if that name-server is
the same for the server, you can look-up an object reference there. This is
what the example-code tries to do.

So - the easiest solution for now would be to start the omniORB nameserver.
On my ubuntu, that's a matter of installing it via apt.

Diez
May 22 '07 #2
On May 22, 1:54 pm, "Diez B. Roggisch" <d...@nospam.we b.dewrote:
It indeed does open a connection - because it wants to register with a
NameServer.
Ah, I see now how this works. I happen to run Ubuntu here, so I tried
the following:

- sudo apt-get install orbit-name-server-2
- orbit-name-server-2 &
- Add to /etc/omniORB4.cfg:
InitRef = NameService=IOR :010000002b0000 00...
(where everything starting from "IOR:" is the output given by orbit-
name-server-2.

However, this does not seem to change the behavior. Any hints?

Thanks,
-Samuel

May 22 '07 #3
Samuel wrote:
On May 22, 1:54 pm, "Diez B. Roggisch" <d...@nospam.we b.dewrote:
>It indeed does open a connection - because it wants to register with a
NameServer.

Ah, I see now how this works. I happen to run Ubuntu here, so I tried
the following:

- sudo apt-get install orbit-name-server-2
- orbit-name-server-2 &
- Add to /etc/omniORB4.cfg:
InitRef = NameService=IOR :010000002b0000 00...
(where everything starting from "IOR:" is the output given by orbit-
name-server-2.

However, this does not seem to change the behavior. Any hints?
Not really. You might try the omniORB mailing list. I've used to be
subscribed there when my CORBA-using project was under active development.
It's a really helpful place, and not too busy so you won't get overwhelmed.

diez
May 22 '07 #4
On May 22, 1:54 pm, "Diez B. Roggisch" <d...@nospam.we b.dewrote:
It indeed does open a connection - because it wants to register with a
NameServer.
Ah, I see now how this works. I happen to run Ubuntu here, so I tried
the following:

- sudo apt-get install orbit-name-server-2
- orbit-name-server-2 &
- Add to /etc/omniORB4.cfg:
InitRef = NameService=IOR :010000002b0000 00...
(where everything starting from "IOR:" is the output given by orbit-
name-server-2.

However, this does not seem to change the behavior. Any hints?

Thanks,
-Samuel

May 22 '07 #5
In article <11************ **********@z24g 2000prd.googleg roups.com>,
Samuel <kn******@gmail .comwrote:

[...]
>Ah, I see now how this works. I happen to run Ubuntu here, so I tried
the following:

- sudo apt-get install orbit-name-server-2
- orbit-name-server-2 &
- Add to /etc/omniORB4.cfg:
InitRef = NameService=IOR :010000002b0000 00...
(where everything starting from "IOR:" is the output given by orbit-
name-server-2.

However, this does not seem to change the behavior. Any hints?
I think ORBit is configured to only listen on its proprietary Unix
domain socket protocol by default, not TCP, so omniORB doesn't know
how to talk to it. You should either tell ORBit to listen on TCP
(Google for how), or use omniORB's naming service, which listens on
TCP by default.

Alternatively, you don't particularly need to use a naming service if
you don't want to. You can modify the example to output an IOR string
for the object reference rather than trying to register it in the
naming service. Print the result of orb.object_to_s tring(adderObjr ef)
rather than the naming service stuff.

The example you are looking at was given as a tutorial with me
speaking, so it's a bit light on details of what's going on. You might
find the introduction in the omniORBpy manual more useful:

http://omniorb.sourceforge.net/omnip...iORBpy002.html

or chapter 2 in the PDF version:

http://omniorb.sourceforge.net/omnipy3/omniORBpy.pdf
Cheers,

Duncan.

--
-- Duncan Grisby --
-- du****@grisby.o rg --
-- http://www.grisby.org --
May 22 '07 #6
On May 22, 6:53 pm, Duncan Grisby <duncan-n...@grisby.org wrote:
I think ORBit is configured to only listen on its proprietary Unix
domain socket protocol by default, not TCP, so omniORB doesn't know
how to talk to it. You should either tell ORBit to listen on TCP
(Google for how), or use omniORB's naming service, which listens on
TCP by default.
Yay, after replacing orbit2-nameserver by omniorb4-nameserver
everything works fine.

Thanks a lot for your comment!

-Samuel

May 24 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1227
by: gerald.maher | last post by:
Hi, I just want to execute a script that used omniORB, omniORBpy Python, Here are the version that I Tried, is this correct ? omniORBpy 2.5 omniORB 4.0.5 Python 2.4.1 The script is below:
18
3043
by: Q. John Chen | last post by:
I have Vidation Controls First One: Simple exluce certain special characters: say no a or b or c in the string: * Second One: I required date be entered in "MM/DD/YYYY" format: //+4 How ??
1
2113
by: OlafMeding | last post by:
How do I compile omniORBpy 3.0 on Windows? The readme.txt file seems to talk only about how to do this on Unix. Unfortenuately, I can not use the binary because I need to use Python 2.3.5. (and the binary requires that I use Python 2.4). I tried to copy the omniORBpy 3.0 source code to top\src\lib of omniORB 4.1 and then tried to execute a "make export" in top\src (this did not compile omniORBpy). I also tried a "make export" in...
1
5337
by: dev24 | last post by:
Hi all, I am writing a simple method which when entered with an Int parameter performs an sql query, creates a result set, uses that resultset to get values from the object created by another method and display the result as an arraylist. The method and the object are as below: public static ArrayList getProjects(int userID) throws SQLException, Exception { ArrayList arrayList = null; ...
6
4197
by: dev24 | last post by:
Hi all, I am writing a simple method which when entered with an Int parameter performs an sql query, creates a result set, uses that resultset to get values from the object created by another method and display the result as an arraylist. The method and the object are as below: public static ArrayList getProjects(int userID) throws SQLException, Exception { ArrayList arrayList = null; getProjectsStmt.setInt(1, userID);
2
1359
by: Samuel | last post by:
Hi, I am trying to get the files from this tutorial to work: http://www.grisby.org/presentations/py10code.html Direct link to the files: http://www.grisby.org/presentations/py10code/adder.idl http://www.grisby.org/presentations/py10code/adderServer.py It produces the following error:
0
1095
by: Duncan Grisby | last post by:
I am pleased to announce that omniORB 4.1.1 and omniORBpy 3.1 are now available. omniORB is a robust, high performance CORBA implementation for C++; omniORBpy is a version for Python. You can download them in source and Windows binary forms from SourceForge: http://sourceforge.net/project/showfiles.php?group_id=51138&package_id=44914&release_id=544978...
3
1287
by: Ilan | last post by:
Hello, My apologies if this is not the correct forum for thses quiestions, by I'm rather new to python+CORBA Has anyone used omniORBpy as CORBA implementation? are there any drawbacks? Does omniORBpy 3.2 supports the Dynamic Invocation Interface? Thanks.
16
5065
by: john6630 | last post by:
Coming from the .Net world, I am used to the try...catch...finally approach to error handling. And PHP 5 now supports this approach. But I am not clear what happens to unhandled errors/exceptioins? Do I define a default error handler as well as do my try/catch? Can I mix error handling with the exceptions? Is one approach better than the other? TIA John
0
9663
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10404
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10195
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9016
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7525
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6765
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5415
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3695
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2906
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.