Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#79554 - [openapi-generator] uses wrong Java Version
Attached to Project:
Arch Linux
Opened by Stefan Zanko (SZanko) - Sunday, 03 September 2023, 17:50 GMT
Last edited by David Runge (dvzrv) - Sunday, 03 September 2023, 23:29 GMT
Opened by Stefan Zanko (SZanko) - Sunday, 03 September 2023, 17:50 GMT
Last edited by David Runge (dvzrv) - Sunday, 03 September 2023, 23:29 GMT
|
DetailsDescription:
The shell script from the package is hard coded to use java 8 however the package is build with java 11 which results in java.lang.UnsupportedClassVersionError To fix this error the shell script should be updated from: #!/usr/bin/env sh PATH="/usr/lib/jvm/java-8-openjdk/bin:${PATH}" java -jar /usr/share/java/openapi-generator/openapi-generator-cli.jar "$@" to: #!/usr/bin/env sh PATH="/usr/lib/jvm/java-11-openjdk/bin:${PATH}" java -jar /usr/share/java/openapi-generator/openapi-generator-cli.jar "$@" however it would be better to not hardcode the java version and use instead the system java version which is set with the archlinux-java script Additional info: * package version(s) * config and/or log files etc. * link to upstream bug report, if any Steps to reproduce: pacman -S openapi openapi-generator --help which results in: Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.UnsupportedClassVersionError: org/openapitools/codegen/OpenAPIGenerator has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:756) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:473) at java.net.URLClassLoader.access$100(URLClassLoader.java:74) at java.net.URLClassLoader$1.run(URLClassLoader.java:369) at java.net.URLClassLoader$1.run(URLClassLoader.java:363) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:362) at java.lang.ClassLoader.loadClass(ClassLoader.java:418) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352) at java.lang.ClassLoader.loadClass(ClassLoader.java:351) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:621) |
This task depends upon
Closed by David Runge (dvzrv)
Sunday, 03 September 2023, 23:29 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed with openapi-generator 7.0.0-2
Sunday, 03 September 2023, 23:29 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed with openapi-generator 7.0.0-2
Comment by David Runge (dvzrv) -
Sunday, 03 September 2023, 23:21 GMT
@SZanko: Thanks for the ticket! I'll try to come up with something that prevents this from happening in the future.