Problem:
- Product Name: VisiBroker for Java
- Product Versions: 4.x, 5.x, 6.x
- Platform: All
This article discusses how to diagnose the CORBA.UNKNOWN exception.
Resolution:
When a client application receives a CORBA.UNKNOWN exception the problem is usually due to an error in the server side. Java Runtime exceptions and UserExceptions not specified in the IDL definition for an operation will be caught by the ORB runtime and will be sent as a CORBA.UNKNOWN exception back to the client.
An example might be when a server method throws a NullPointerException due to a programming error. This exception will get sent back to the client as a CORBA.UNKNOWN exception. In order to isolate the problem in the SERVER it is important to know which exception is actually being thrown, and where the error occurs.
A useful technique is to run the SERVER with the vbroker.orb.warn property set to a value of 2 ("-Dvbroker.orb.warn=2"). When "vbroker.orb.warn" is set to level 2 the server will show the underlying exception which is being converted to a CORBA.UNKNOWN.
For example:
vbj -Dvbroker.orb.warn=2 Server
The stack trace for the real exception should be printed in the diagnostic output, which should provide both the type of the exception and location in the call stack where the exception was thrown. Usually this will be in the implementation code, which the programmer will be able to diagnose and correct. In some rare cases this may be in the skeleton or orb code. The source of the error will almost always be traceable to an error in the user code that has just completed executing.
Another technique to obtain this information is to run the server with the "vbroker.orb.debug" property.
For example:
vbj -Dvbroker.orb.debug=true Server
Also please be aware that for an applet the "server" might be the gatekeeper proxy. If the server does not show any errors in the "vbroker.orb.warn" or "vbroker.orb.debug" output, but the client receives a CORBA.UNKNOWN, then the problem may be occurring in the gatekeeper. In this situation the gatekeeper should also be run with the "vbroker.orb.debug" set to "true" or the "vbroker.orb.warn" property set in the configuration file.
The techniques described in this article apply to Java servers. The client which receives the exception may however be written in either C or Java, but the properties discussed are only available for a Java server.
#logging
#VisiBroker
#debugging
#Security
#Java
#unknown




