Bug 979431 - Inconsistent error logging behaviour
Inconsistent error logging behaviour
Status: CLOSED CURRENTRELEASE
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: PicketLink (Show other bugs)
6.1.0
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Peter Skopek
Josef Cacek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-28 09:53 EDT by kconner
Modified: 2014-10-25 08:36 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-08-14 04:32:31 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description kconner 2013-06-28 09:53:12 EDT
Description of problem:

We came across a strange logging error while testing SOA and it has been tracked down to the combination being used in picketlink.  We see this error when DEBUG is enabled even though it is being logged at ERROR level.

The code in question is as below.

In ProvidersUtil.addJceProvider
           try {
               // Class<? extends Provider> clazz = Loader.loadClass(className, false, Provider.class);
               Class<? extends Provider> clazz = Class.forName(className).asSubclass(Provider.class);
               Provider provider = clazz.newInstance();
               return addJceProvider(name, provider);
           } catch (Throwable t) {
===>            if (logger.isDebugEnabled()) {
                   logger.jceProviderCouldNotBeLoaded(name, t);
               }
               return null;
           }

In PicketLinkLoggerMessages

==> @LogMessage(level = Level.ERROR)
   @Message(id = 259, value = "The provider %s could not be added")
   void jceProviderCouldNotBeLoaded(String name, @Cause Throwable t);

Version-Release number of selected component (if applicable):

picketlink-core-2.1.6.Final-redhat-2.jar

How reproducible:

Every time

Steps to Reproduce:
1. Clean installation of EAP with SOA 6 alpha 2 installed
2. Change root logger from INFO to DEBUG
3. Start server

Actual results:

When DEBUG is enabled you will see

14:43:41,481 ERROR [org.picketlink.identity.federation] (ServerService Thread Pool – 74) PLFED000259: The provider BC could not be added: java.lang.ClassNotFoundException: org.bouncycastle.jce.provider.BouncyCastleProvider from [Module "org.picketlink:main" from local module loader @1b7ae22 (finder: local module finder @951a0 (roots: /Users/kevin/soa/jboss-eap-6.1/modules,/Users/kevin/soa/jboss-eap-6.1/modules/system/layers/soa,/Users/kevin/soa/jboss-eap-6.1/modules/system/layers/base))]

When INFO is enabled there is no output.

Expected results:

If this truly is an error then it should always be logged at ERROR level, regardless of whether DEBUG is enabled or not.  If this is truly a debug then it should be logged at DEBUG.

Additional info:
Comment 1 kconner 2013-06-28 09:53:52 EDT
Logged in the community as https://issues.jboss.org/browse/PLINK-209
Comment 5 FIlip Bogyai 2014-08-14 04:32:31 EDT
This issue reported against older version, cannot be reproduced against latest 6.3.0. bits, which means it was fixed earlier. Therefore, we are closing this bug. Thank you for reporting this issue.

Note You need to log in before you can comment on or make changes to this bug.