Bug 733784 - ResourceContainer may not reset Thread ContextClassLoader (TCCL)
Summary: ResourceContainer may not reset Thread ContextClassLoader (TCCL)
Keywords:
Status: NEW
Alias: None
Product: RHQ Project
Classification: Other
Component: Plugin Container
Version: unspecified
Hardware: Unspecified
OS: Unspecified
medium
high vote
Target Milestone: ---
: ---
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
URL: https://na7.salesforce.com/500A000000...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-26 20:25 UTC by Brad Maxwell
Modified: 2018-11-14 12:44 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
JBoss EAP 5.1.0
Last Closed:


Attachments (Terms of Use)

Description Brad Maxwell 2011-08-26 20:25:20 UTC
Description of problem:

org.rhq.core.pc.inventory.ResourceContainer

In this code, the unlock() api [1] says it can throw an unchecked exception which would cause the TCCL to not be reset. 

if (this.lock != null) {
 this.lock.unlock();
}
Thread.currentThread().setContextClassLoader(originalContextClassLoader);

[1] http://download.oracle.com/javase/1,5.0/docs/api/java/util/concurrent/locks/Lock.html#unlock%28%29

We are seeing an issue which maybe be caused by this bug. JBoss server is started and there are some failed services that do not start when the server is started.  The application seems to run fine with these failed services.  After some unpredictable time, it seems the Admin Console tries to inventory services and hits these failed services which seems to be the precursor to the NoClassDef / ClassNotFound exceptions.

We are trying to get test results with the admin console and failed services removed.

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

JBoss EAP 5.1.0 

deploy/admin-console.war/WEB-INF/lib/rhq-core-plugin-container.jar/org/rhq/core/pc/inventory/ResourceContainer.class 

From rhq-core-plugin-container.jar manifest: 

Implementation-Title: RHQ Plugin Container
Implementation-Version: 3.0.0.EmbJopr2
Os-Version: 2.6.18-194.8.1.el5

How reproducible:

Failed services such as HornetQ when starting JBoss. System runs for a while running tests against it.  After some time, it seems the Admin Console tries to inventory services which we believe is the cause.

If anyone knows how we might invoke inventory or try to trigger this, then we could confirm this is the issue.


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