[jacorb-developer] Unexpected exception on local calls interceptions

Hugo Roenick hroenick at gmail.com
Tue Apr 15 14:54:45 CEST 2014


Hi, all.

I've experienced an unexpected behaviour while implementing a handshake protocol using CORBA interceptors and forward request.

I built a small example to illustrate the problem that I'm experiencing. In this example my protocol defines that the server side will only accepts calls from who attaches a correct secret to requests. If a wrong secret is attached, then the server throws a NO_PERMISSION exception. On the client side, the interceptor knows that if it gets a NO_PERMISSION then he can retry the request attaching the correct secret. Forward Request is used by the client interceptor to retry the request.

In this example the client will call "sayHello" to server, which print the hello message but he will also try to say goodbye, calling "sayGoodbye" to himself (emulating the local call) through a CORBA reference of him self.

Running this demo we can see that the client reaches de server, the server prints the Hello message, but an exception occurs while checking if the CORBA reference to him self does exists.

Here is the output from the server side:

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/hroenick/Development/jacorb/3.4/lib/slf4j-jdk14-1.6.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/hroenick/.m2/repository/org/slf4j/slf4j-jdk14/1.6.4/slf4j-jdk14-1.6.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
INFO Initialising ORB with ID: 
INFO InterceptorManager started with 1 Server Interceptors, 1 Client Interceptors and 0 IOR Interceptors
INFO oid: 00 01 0F 2D 0B 1F 04 02 0F 2C 1E 28 10 06 30 46 38 14 14 1B ...-.....,.(..0F8...48 4C 1B                                                    HL.object is activated
INFO Using server ID (5631190032) for transient POA
INFO ORB run
INFO Opened new server-side TCP/IP transport to 192.168.0.103:56885
INFO Closed server-side transport to 192.168.0.103:56885
INFO Opened new server-side TCP/IP transport to 192.168.0.103:56886
INFO Closed server-side transport to 192.168.0.103:56886
INFO Opened new server-side TCP/IP transport to 192.168.0.103:56887
INFO Closed server-side transport to 192.168.0.103:56887
INFO Opened new server-side TCP/IP transport to 192.168.0.103:56888
Hello, World!
INFO ClientConnectionManager: created new ClientGIOPConnection to 192.168.0.103:56882 (39b8d6f7)
SEVERE rid: 0 opname: sayHello invocation: throwable was thrown.
java.lang.NullPointerException
	at org.jacorb.orb.Delegate.servant_postinvoke(Delegate.java:2561)
	at org.jacorb.orb.Delegate.non_existent(Delegate.java:2205)
	at org.omg.CORBA.portable.ObjectImpl._non_existent(ObjectImpl.java:61)
	at demo.HelloImpl.sayHello(HelloImpl.java:15)
	at demo.HelloPOA._invoke(HelloPOA.java:54)
	at org.jacorb.poa.RequestProcessor.invokeOperation(RequestProcessor.java:350)
	at org.jacorb.poa.RequestProcessor.process(RequestProcessor.java:672)
	at org.jacorb.poa.RequestProcessor.run(RequestProcessor.java:830)
INFO Closed server-side transport to 192.168.0.103:56888

Is this a bug of JacORB when dealing with local calls?

PS: demo's source is attached to the mail.

Regards,
-- Hugo



More information about the jacorb-developer mailing list