Discussion:
[omniORB] How to resolve which parameter is causing: omniORB.BAD_PARAM_WrongPythonType
Belser, Ted
2009-03-27 21:20:50 UTC
Permalink
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.



Thanks,
Von

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20090327/8bfec8ac/attachment.htm
Duncan Grisby
2009-04-09 14:14:09 UTC
Permalink
I am attempting to invoke an object operation and I am receiving the following
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 --
-- ***@grisby.org --
-- http://www.grisby.org --
Loading...