Bug 979431 - Inconsistent error logging behaviour
Summary: Inconsistent error logging behaviour
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: PicketLink
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Peter Skopek
QA Contact: Josef Cacek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-28 13:53 UTC by kconner
Modified: 2014-10-25 12:36 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-14 08:32:31 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description kconner 2013-06-28 13:53:12 UTC
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 13:53:52 UTC
Logged in the community as https://issues.jboss.org/browse/PLINK-209

Comment 5 FIlip Bogyai 2014-08-14 08:32:31 UTC
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.