[omniORB] How to resolve which parameter is causing: omniORB.BAD_PARAM_WrongPythonType

Duncan Grisby duncan at grisby.org
Thu Apr 9 10:14:07 BST 2009


On Friday 27 March, "Belser, Ted" wrote:

> I am attempting to invoke an object operation and I am receiving the following
> exception:
> 
> BAD_PARAM: CORBA.BAD_PARAM(omniORB.BAD_PARAM_WrongPythonType,
> CORBA.COMPLETED_NO)
> 
> I understand that I’ve used the wrong python type somewhere in the input
> arguments. The problem is that my input arguments consist of a couple
> structures of ~10 and ~50 parameters (some of those parameters are structures
> of ~5 parameters).  Is there some way to receive debug information on which
> parameter specifically is incorrect?  I already tried increasing the
> traceLevel to 10 (and 40) in the hope that I would receive more information,
> without luck.

I'm afraid there isn't a particularly good way. The code doesn't track
exactly which part of the data it is marshalling, because to do so would
really devastate performance.

What you can do is run with -ORBtraceExceptions 1 (or traceLevel >= 10)
which will show you where in the C++ code the exception is thrown.
You'll see a line like:

omniORB: throw BAD_PARAM from pyMarshal.cc:616 (NO,BAD_PARAM_WrongPythonType)

If you then go and look at line 616 of pyMarshal.cc, you'll see that
it's in the code that's checking for a string, which tells you that
something that was a string in IDL is some other type in your data. Then
of course, the challenge is to track it down.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --



More information about the omniORB-list mailing list