Bug 797247

Summary: Apache plug-in should work in Java 5 or Java 6 but contains Java 6 API dependencies
Product: [JBoss] JBoss Operations Network Reporter: Larry O'Leary <loleary>
Component: Plugin -- ApacheAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED WONTFIX QA Contact: Mike Foley <mfoley>
Severity: high Docs Contact:
Priority: medium    
Version: JON 2.4.1CC: hrupp, lkrejci
Target Milestone: ER01   
Target Release: JON 2.4.3   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-19 21:22:21 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 Larry O'Leary 2012-02-24 16:52:10 UTC
The Apache plug-in requires a Java 6 JRE however the agent should be supported under a Java 5 JRE. 

The following errors appear when attempting to use Java 5 with the Apache plug-in:


cannot find symbol
   symbol  : method isEmpty()
   location: class java.lang.String

cannot find symbol
   symbol  : class Deque
   location: package java.util

cannot find symbol
   symbol  : class ArrayDeque
   location: package java.uti


The following files appear to be the violators:

   modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/RuntimeApacheConfiguration.java
   modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceDiscoveryComponent.java


At run-time, the following error appears in the agent log:
WARN  [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Failure during discovery for [Apache HTTP Server] Resources - failed after 642 ms.
java.lang.Exception: Discovery component invocation failed.
        at org.rhq.core.pc.util.DiscoveryComponentProxyFactory$ComponentInvocationThread.call(DiscoveryComponentProxyFactory.java:283)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
        at java.util.concurrent.FutureTask.run(FutureTask.java:123)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.NoClassDefFoundError: java/util/Deque
        at org.rhq.plugins.apache.util.RuntimeApacheConfiguration.extract(RuntimeApacheConfiguration.java:265)
        at org.rhq.plugins.apache.ApacheServerDiscoveryComponent.discoverSingleProcess(ApacheServerDiscoveryComponent.java:316)
        at org.rhq.plugins.apache.ApacheServerDiscoveryComponent.discoverResources(ApacheServerDiscoveryComponent.java:238)
        at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.rhq.core.pc.util.DiscoveryComponentProxyFactory$ComponentInvocationThread.call(DiscoveryComponentProxyFactory.java:279)
        ... 5 more

Comment 1 Mike Foley 2012-02-27 17:00:38 UTC
triage mfoley, crouch, loleary, asantos ... JON 3.1

Comment 2 Lukas Krejci 2012-03-14 11:57:27 UTC
I was not aware of this requirement for JON3 and I am quite sure we are going to hit problems in more plugins and in plugin container.

I'm going to add the java5 API checks to all plugins and core modules using the http://mojo.codehaus.org/animal-sniffer/ and we'll see what comes out...

Comment 7 Larry O'Leary 2013-07-19 21:22:21 UTC
Red Hat JBoss Operations Network 2.4 is end-of-life as of 07/01/2013 as per support life-cycle[1]

If this issue still exists in the latest release of Red Hat JBoss Operations Network, please capture a new BZ against the later version or contact Red Hat Global Support Services using the Customer Portal[2].

[1]: https://access.redhat.com/support/policy/updates/jboss_notes/
[2]: https://access.redhat.com/support/