Persons who use Orber for the first time may find it hard to tell what goes wrong when trying to setup communication between an Orber-ORB and ORB:s supplied by another vendor or another Orber-ORB. The purpose of this chapter is to inform about the most common mistakes and what tools one can use to overcome these problems.
To begin with, Orber can be configured to run in debug mode. There are four ways to set this parameter:
When Orber runs i debug mode, printouts will be generated if anything abnormal occurs (not necessarily an error). An error message typically looks like:
=ERROR REPORT==== 29-Nov-2001::14:09:55 ===
=================== Orber =================
[410] corba:common_create(orber_test_server, [{pseudo,truce}]);
not a boolean(truce).
===========================================
In the example above, we tried to create an object with an incorrect option (i.e. should
have been
If you are not able to solve the problem, you should include all generated reports when contacting support or using the erlang-questions mailing list.
It is easy to forget to, for example, set all fields in a struct, which one may not discover when developing an application using Orber. When using a typed language, such faults would cause a compile time error. To avoid these mistakes, Orber allows the user to activate automatic typechecking of all local invocations of CORBA Objects. For this feature to be really useful, the user must create test suites which cover as much as possible. For example, invoking an operation with invalid or incorrect arguments should also be tested. This option can be activated for one object or all object via:
If incorrect data is passed or returned, Orber uses the
=ERROR REPORT==== 10-Jul-2002::12:36:09 ===
========= Orber Typecheck Request =========
Invoked......: MyModule_MyInterface:foo/1
Typecode.....: [{tk_enum,"IDL:MyModule/enumerant:1.0",
"enumerant",
["one","two"]}]
Arguments....: [three]
Result.......: {'EXCEPTION',{'MARSHAL',[],102,'COMPLETED_NO'}}
===========================================
Note, that the arity is equivalent to the IDL-file. In the example above,
an undefined enumerant was used. In most cases, it is useful to set the
configuration parameter
It is also possible to trace all communication between an Orber-ORB and, for example,
a Java-ORB, communicating via IIOP. All you need to do is to activate an
Logging all traffic is expensive. Hence, only use the supplied interceptors during test and development.
The
erl> error_logger:tty(false).
erl> error_logger:logfile({open, "/tmp/IIOPTrace"}).
The
=INFO REPORT==== 13-Jul-2005::18:22:39 ===
=============== new_out_connection =======
Node : myNode@myHost
From : 192.0.0.10:47987
To : 192.0.0.20:4001
==========================================
=INFO REPORT==== 29-Nov-2001::15:26:28 ===
=============== out_request ==============
Connection: {"192.0.0.20",4001,"192.0.0.10",47987}
Operation : resolve
Parameters: [[{'CosNaming_NameComponent',
"AIK","SwedishIcehockeyChampions"}]]
Context : [{'IOP_ServiceContext',1,
{'CONV_FRAME_CodeSetContext',65537,65801}}]
==========================================
The
It is also possible to active and deactivate an interceptor during
run-time, but this will only affect currently existing connections.
For more information, consult Orber's Reference Manual regarding the
operations
Q: When my client, typically written in C++ or Java, invoke narrow on an Orber object reference it fails?
A: You must register your application in the IFR by invoking
A: Confirm, by consulting the IDL specifications, that the received object reference really inherit from the interface you are trying to narrow it to.
Q: I am trying to register my application in the IFR but it fails. Why?
A: If one, or more, interface in your IDL-specification inherits from other interface(s), you must register them before registering your application. Note, this also apply when you inherit interfaces supported by a COS-application. Hence, they must be installed prior to registration of your application.
Q: I have a Orber client and server residing on two different Orber instances but I only get the 'OBJECT_NOT_EXIST' exception, even though I am sure that the object is still alive?
A: If the two Orber-ORB's are not intended to be a part of multi-node ORB, make sure that the
two Orber-ORB's have different domain names set (see
Q: When I'm trying to install and/or start Orber it fails?
A: Make sure that no other Orber-ORB is already running on the same node. If so,
change the
Q: My Orber server is invoked via IIOP but Orber cannot marshal the reply?
A: Consult your IDL file to confirm that your replies are of the correct type. If it is correct and the return type is, for example, a struct, make sure you have set every field in the struct. If you do not do that it will be set to the atom 'undefined', which most certainly is not correct.
A: Check that you handle
Q: I cannot run Orber as a multi-node ORB?
A: Make sure that the Erlang distribution have been started for each
node and the