Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
Our Java 8 application (not yet ported to Java 11) uses jna.
Installed it from jna rpm. Get this...
java.lang.UnsupportedClassVersionError: com/sun/jna/Library has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0
... i.e. jna in the rpm is only compatible with Java 9, not java 8.
java-1.8.0-openjdk is (apparently) still supported in el9, so the jna rpm should contain a jar with Java 8 compatibility. It doesn't.
Version-Release number of selected component (if applicable):
Name : jna
Version : 5.6.0
Release : 6.el9
Architecture : x86_64
Size : 279 k
Source : jna-5.6.0-6.el9.src.rpm
Repository : rhel-9-for-x86_64-appstream-rpms
How reproducible:
Always
Steps to Reproduce:
1. install jna rpm on RHEL9
2. install java-1.8.0-openjdk (etc)
3. run Java application using jna in java-1.8.0
Actual results:
java.lang.UnsupportedClassVersionError: com/sun/jna/Library has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0
Expected results:
Application runs normally, without error
Additional info:
I got jna-5.6.0-6.el9.src.rpm and rebuilt it, sure enough it goes...
-dynamic-properties:
...
[echo] Java version 11.0.18, compatibility: 9, ant: 11
[echo] JNA version 5.6.0, native 6.1.0, android 5060099
[echo] OpenJDK 64-Bit Server VM (Red Hat, Inc., 11.0.18+10-LTS)
build.xml includes this...
<condition property="compatibility" value="1.6" else="9">
<matches pattern="^1\.\d+$" string="${ant.java.version}"/>
</condition>
Java 11 should be able to produce 1.6 compatible Jars, yea?
So that regex is wrong, for Java version 11.0.18 it should be selecting 1.6, not 9, so that it builds a jar that's still compatible with the (still supported) Java 8.
Comment 1Zuzana Miklankova
2023-01-23 14:34:55 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (jna bug fix and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2023:2394
Description of problem: Our Java 8 application (not yet ported to Java 11) uses jna. Installed it from jna rpm. Get this... java.lang.UnsupportedClassVersionError: com/sun/jna/Library has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0 ... i.e. jna in the rpm is only compatible with Java 9, not java 8. java-1.8.0-openjdk is (apparently) still supported in el9, so the jna rpm should contain a jar with Java 8 compatibility. It doesn't. Version-Release number of selected component (if applicable): Name : jna Version : 5.6.0 Release : 6.el9 Architecture : x86_64 Size : 279 k Source : jna-5.6.0-6.el9.src.rpm Repository : rhel-9-for-x86_64-appstream-rpms How reproducible: Always Steps to Reproduce: 1. install jna rpm on RHEL9 2. install java-1.8.0-openjdk (etc) 3. run Java application using jna in java-1.8.0 Actual results: java.lang.UnsupportedClassVersionError: com/sun/jna/Library has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0 Expected results: Application runs normally, without error Additional info: I got jna-5.6.0-6.el9.src.rpm and rebuilt it, sure enough it goes... -dynamic-properties: ... [echo] Java version 11.0.18, compatibility: 9, ant: 11 [echo] JNA version 5.6.0, native 6.1.0, android 5060099 [echo] OpenJDK 64-Bit Server VM (Red Hat, Inc., 11.0.18+10-LTS) build.xml includes this... <condition property="compatibility" value="1.6" else="9"> <matches pattern="^1\.\d+$" string="${ant.java.version}"/> </condition> Java 11 should be able to produce 1.6 compatible Jars, yea? So that regex is wrong, for Java version 11.0.18 it should be selecting 1.6, not 9, so that it builds a jar that's still compatible with the (still supported) Java 8.