Bug 797247 - Apache plug-in should work in Java 5 or Java 6 but contains Java 6 API dependencies
Summary: Apache plug-in should work in Java 5 or Java 6 but contains Java 6 API depend...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Plugin -- Apache
Version: JON 2.4.1
Hardware: All
OS: All
medium
high
Target Milestone: ER01
: JON 2.4.3
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-24 16:52 UTC by Larry O'Leary
Modified: 2018-11-26 17:15 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-07-19 21:22:21 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 797252 0 high CLOSED Java API version must be enforced/tested at build and/or release time 2021-02-22 00:41:40 UTC

Internal Links: 797252

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/


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