Bug 558542
Summary: | NPE when trying to start CLI under openjdk on RHEL | ||||||
---|---|---|---|---|---|---|---|
Product: | [Other] RHQ Project | Reporter: | Corey Welton <cwelton> | ||||
Component: | CLI | Assignee: | Filip Drabek <fdrabek> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Mike Foley <mfoley> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | high | ||||||
Version: | 1.3.1 | CC: | ccrouch, dbhole, fdrabek, jvanek, loleary | ||||
Target Milestone: | --- | Keywords: | Reopened | ||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | 1.3.1 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2013-09-02 07:15:00 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 557793 | ||||||
Attachments: |
|
Description
Corey Welton
2010-01-25 16:01:20 UTC
Created attachment 388849 [details]
Quick test for RHQ CLI dependency
Quick test for RHQ CLI dependency
This is a java/jre/jdk release problem. The scripting package is completely missing from the rt.jar library for some RHEL instances(Ex. rlx-0-12.rhndev.redhat.com). We can put better defensive code on the CLI side to tell them i) we can't proceed ii) they need to try a later JDK. In addition the attached file should be compiled (javac TestScript) and run (java TestScript) on each JDK version to quickly check that the CLI prerequisites(existing in a sound JDK) are indeed there. The right solution to this problem is to determine the minimum level of OpenJDK (32 and 64 bit and RHEL/Fedora) that this problem does not occur in and document in the release notes for the CLI. *Note: We're probably building the OpenJDK for both RHEL and Fedora so we should verify both and their 32 and 64 bit versions as well.* Looks like it works on: java-1.6.0-openjdk-1.6.0.0-29.b16.fc11.x86_64 java-1.6.0-openjdk-1.6.0.0-30.b16.fc11.x86_64 and NOT on: java-1.6.0-openjdk-1.6.0.0-1.7.b09.el5 Confirmed that it does fail on RHEL i386 and x86_64 arches. Discussion continues on what the real solution to this problem should be. The issue is more widespread than initially thought. The following bug reports that appear related to this issue are listed below: i) https://enterprise.redhat.com/issue-tracker/?module=issues&action=view&tid=470313 ii) http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=179 There are some indications that the required libraries may have been removed from the RHEL distribution due to licensing concerns. Charles is investigating this aspect. Provided there are no licensing/business reasons why openjdk cannot be patched or made to work with alternative scripting engines out of the box, Ian Springer has proposed the following potential workarounds to get the CLI working on OpenJdk. Further research, testing and management guidance would be needed to choose the best alternatives to proceed with: --------------------------------------------------------------------------- ############# mail post/excerpt from Ian Springer -- 2/5/10 --############# I did some research on this a couple days ago to help Simeon out. From what I gathered, the newer versions of openjdk that support jscript out-of-box as long as the rhino package is installed, do so by automatically adding /usr/share/java/js.jar to the JVM's bootclasspath. So knowing this, I think we might be able to get Rhino installed using a few potential methods: 1) Append the following option to the CLI java command line: -Xbootclasspath/p:/opt/rhq-cli/lib/js-1.7R2.jar (which will prepend /opt/rhq-cli/lib/js-1.7R2.jar to the beginning of the bootclasspath) This would work for either an older openjdk version or a newer one. For the newer ones, it would allow us to put out own newer js.jar ahead of whatever /usr/share/java/js.jar the user has installed as part of the rhino package. Or if a newer openjdk is detected but the rhino package is not installed, we have a couple other options: 2) yum install rhino This assumes the latest version of rhino that's available from the default RHEL repos will work for the CLI, which sounds like it may not be the case. 3) rpm -i /opt/rhq-cli/etc/rhino-1.7-1.r2.6.jpp5.noarch.rpm 4) ln -s /opt/rhq-cli/lib/js-1.7R2.jar /usr/share/java/js.jar ############# mail post/excerpt from Ian Springer -- 2/5/10 --############# --------------------------------------------------------------------------- If the correct Rhino installation is not actually bundled with OpenJDK, then the working solution for correct script engine usage on openjdk goes outside of the normal java usage pattern. For most java applications, the JVM is the only core dependency and application specific dependencies are taken care of by the application developer at install time. Making the JDK itself depend(for correct operation) upon an external version of a platform specific library like Rhino is an exceptionally bad idea as it ignores one of java's central tenets of uniform cross platform operation. Closing this issue for now and we can revisit testing RHQ CLI support when RHEL includes a version of openjdk which includes rhino. Re-opening to investigate RHEL version support rhino has made it into the OpenJDK package for RHEL 5.6.z (http://rhn.redhat.com/errata/RHEA-2011-0485.html). Specific RPM it made it into is: java-1.6.0-openjdk-1.6.0.0-1.21.b17.el5.x86_64.rpm. Since the package is now available in RHEL5.6, I'm pushing this ON-QA for testing. The test from https://bugzilla.redhat.com/show_bug.cgi?id=558542#c8 should now pass and any CLI script should now be executable from an up to date RHEL5.6 instance. Bulk closing of issues that were VERIFIED, had no target release and where the status changed more than a year ago. |