Bug 979431

Summary: Inconsistent error logging behaviour
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: kconner
Component: PicketLinkAssignee: Peter Skopek <pskopek>
Status: CLOSED CURRENTRELEASE QA Contact: Josef Cacek <jcacek>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.1.0CC: fbogyai, jcacek, myarboro
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-14 08:32:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.