History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: RHQ-3
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Ian Springer
Reporter: John Mazzitelli
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
RHQ Project

Have agent support Java 6

Created: 22/Feb/08 04:41 PM   Updated: 30/Sep/08 03:29 PM
Component/s: Agent
Fix Version/s: 1.1

Time Tracking:
Not Specified

Issue Links:
Relation

Resolution Date: 26/Jun/08 10:45 AM
Date of First Response: 22/Apr/08 06:25 PM
Tester: Jeff Weiss
VCS Revision: 934


 Description  « Hide
Right now, the agent is required to run on Java 5. Running on Java 6, the plugin descriptors failed to parse. We should investigate what it would take to get the agent to run inside a Java 6 JRE.

Here's the stack when running on Java 6:

14:03:53,334 ERROR [main] (rhq.core.pc.plugin.PluginManager)- Plugin at [file:/root/rhq-agent/plugins/rhq-database-plugin-2.0.0-SNAPSHOT.jar] could not be loaded and will therefore not be deployed.
java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/root/rhq-agent/lib/jaxb-impl-2.1.6.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.1 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. (See http://java.sun.com/j2se/1.5.0/docs/guide/standards/)
        at com.sun.xml.bind.v2.model.impl.ModelBuilder.<clinit>(ModelBuilder.java:173)
        at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:422)
        at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:286)
        at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:139)
        at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:117)
        at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:188)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at javax.xml.bind.ContextFinder.newInstance(Unknown Source)
        at javax.xml.bind.ContextFinder.find(Unknown Source)
        at javax.xml.bind.JAXBContext.newInstance(Unknown Source)
        at javax.xml.bind.JAXBContext.newInstance(Unknown Source)
        at javax.xml.bind.JAXBContext.newInstance(Unknown Source)
        at org.rhq.core.pc.plugin.PluginEnvironment.initializeDescriptor(PluginEnvironment.java:162)

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
John Mazzitelli - 06/Mar/08 10:07 AM
see forum thread

http://forums.rhq-project.org/viewtopic.php?f=5&t=15

running standalone agent is fine with JDK6. Looks like embedded agent has the problem, which is to be expected because its running in the RHQ Server/JBossAS 4.2 and thus can't run on JDK6 due to the limitation placed on us by JBossAS 4.2.

John Mazzitelli - 06/Mar/08 10:11 AM
hmm... the stack trace in this jira shows that it was a standalone agent... see the error message where this is:

/root/rhq-agent/lib/...

so unsure what is different that caused this error to appear.

Greg Hinkle - 22/Apr/08 06:25 PM - edited
This should be easy to fix. We use a newer version of JAXB than ships with the JVM. (2.1 vs. 2.0)

We can just mkdir lib/endorsed and move the two jaxb jars there from the lib dir... then startup the agent with either of the following for rhq-agent.bat and .sh respectively
-Djava.endorsed.dirs=%RHQ_AGENT_HOME%\lib\endorsed
-Djava.endorsed.dirs=$RHQ_AGENT_HOME/lib/endorsed


(incidentally, i tested this fix and it worked fine... just didn't integrate it into the build system)

Ian Springer - 05/Jun/08 08:46 AM
Done, as specified by Greg. - r928.


Ian Springer - 05/Jun/08 12:48 PM
activation-1.1.jar also needed to be moved to the endorsed dir, so it gets loaded in the same classloader as JAXB - r934.


Jeff Weiss - 11/Jun/08 09:41 AM
This defect was accidentally marked 'qa in progress', pushing back to resolved.

Ian Springer - 11/Jun/08 03:26 PM
Note, this should be tested in conjunction with http://jira.rhq-project.org/browse/RHQ-542. Here are the permutations that should be tested:

1) Server on JDK 5, Agent on JDK 5
2) Server on JDK 5, Agent on JDK 6
3) Server on JDK 6, Agent on JDK 5
4) Server on JDK 6, Agent on JDK 6

I'd suggest running the GUI test suite against the above four cases, and also checking the Server and Agent logs for any errors.

Jeff Weiss - 12/Jun/08 08:23 AM
I started the agent and server under sun jdk6u6, and then ran the automated UI regression suite, which passed.

I will continue to run other tests under java 6 and open any issues I find.

Ian Springer - 12/Jun/08 08:44 AM
Did you try permutations 1, 2, and 3 from my previous comment?

Jeff Weiss - 12/Jun/08 09:12 AM
I ran the automation on all four combos (serv/agent, 1.5/1.6), all passed.

Heiko W. Rupp - 26/Jun/08 10:27 AM
Lets reopen and do some more testing in the 2.1 cycle

Jeff Weiss - 30/Sep/08 03:29 PM
I've tested this extensively with jdk1.6 and haven't seen any jdk related problems. Closing.