Is this a bug?
Eoin Carroll
ewc@orl.co.uk
Tue, 21 Oct 1997 15:41:54 +0100 (BST)
Hi,
> I have the following interface:
>
> ----------------------------------------------
> typedef sequence<string> StringSeq;
> typedef sequence<StringSeq> Table;
>
> interface SQLBroker {
>
> exception BadConnection { };
>
> void openConnection(in string dbName) raises(BadConnection);
> string execQuery(in string mesg);
> void closeConnection();
> string readItem(in long row, in long col);
> StringSeq readRow(in long row);
> Table readAll();
> string fieldName(in long fieldIndex);
> string fieldType(in long fieldIndex);
> long fieldSize(in long fieldIndex);
>
> readonly attribute long nRows;
> readonly attribute long nColumns;
> };
> ---------------------------------------------------
>
> The ID of the exception is: "IDL:SQLBroker/BadConnection:1.0", which is 32
> byte long.
>
> In the file sqlbrokerSK.cc (generated by omniidl2), I have found:
>
> line 911: _msgsize += 39;
> line 914: CORBA::ULong _len = 35;
> line 916: _s.put_char_array((CORBA::Char*)
> SQLBroker_BadConnection_IntfRepoID,35);
>
> With these values the java client doesn't recognize the exception as a
> BadConnection exception, because of the 3 undefined bytes in the ID
> string.
>
> Changing the 3 lines above with:
>
> _msgsize += 36;
>
> CORBA::ULong _len = 32;
>
> and
>
> _s.put_char_array((CORBA::Char *)SQLBroker_BadConnection_IntfRepoID,32);
>
> everything works fine.
>
> Is this a bug, or am I doing something wrong?
>
It is a bug, and has been fixed in the upcoming release (2.4.0). We have put
up a list of bugs that have been fixed in the next release on the omniORB
news page ( http://www.orl.co.uk/omniORB/omniORBNews.html ).
Regards,
Eoin.
--
Eoin Carroll ewc@orl.co.uk
Research Engineer
Olivetti & Oracle Research Lab
Cambridge, UK