Read only archive ; use https://github.com/JacORB/JacORB/issues for new issues
Bug 978 - Request for non_existent() call on a dead object to not generate an error level log message
Summary: Request for non_existent() call on a dead object to not generate an error lev...
Status: RESOLVED FIXED
Alias: None
Product: JacORB
Classification: Unclassified
Component: ORB (show other bugs)
Version: 3.4
Hardware: All All
: P5 enhancement
Assignee: Mailinglist to track bugs
URL:
Depends on:
Blocks:
 
Reported: 2014-02-26 17:38 UTC by Richard G. Hash
Modified: 2014-03-21 05:37 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard G. Hash 2014-02-26 17:38:24 UTC
Note: entering this to capture email discussion with Nick.

Currently in 3.4 calling non_existent() on a dead object generates an error level log message with a stack trace. Very old versions of JacORB (e.g. 2.3.1) just silently threw the exception and let the caller deal with it).

This is happening in the orb.Delegate, servant_preinvoke(), which throws a OBJECT_NOT_EXIST, but the outer catch{} block is calling
   logger.error("unexpected exception during servant_preinvoke", e);
before it re-throws the exception.

Basically we think that a OBJ_NOT_EXISTS on a non_existent should just silently return 'false' (without error level logging).

Suggestion from Nick:
########################
So we would have
   public ServantObject servant_preinvoke( org.omg.CORBA.Object self,
               String operation,
               @SuppressWarnings("rawtypes") Class expectedType ) and
/**
  * Only called by servant_preinvoke. Special case method used by non_existent to disable logging for object not exist
  */
private ServantObject servant_preinvoke( org.omg.CORBA.Object self,
                String operation,
                @SuppressWarnings("rawtypes") Class expectedType,
		boolean logObjectNotExist )

The test case could do something similar to org.jacorb.test.util.JDKLoggerTest where it checks the file contents for the log file. And the actual test could reuse orb.NonExistentLocalTest.
Comment 1 Nick Cross 2014-03-21 05:37:09 UTC
Fixed instead by changing the logging level inside preinvoke for simplicity.

SHA f049e37ff187fc908172312e01f48f49b6b67745