FS#27480 - [ca-certificates-java] Does not work with openjdk6

Attached to Project: Arch Linux
Opened by Rik (Rik_Roos) - Wednesday, 07 December 2011, 01:28 GMT
Last edited by Pierre Schmitz (Pierre) - Wednesday, 01 February 2012, 08:46 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Pierre Schmitz (Pierre)
Architecture i686
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 6
Private No

Details

L.S.

Description:

See also: https://bbs.archlinux.org/viewtopic.php?pid=1025567#p1025567

Installation of OPENJDK6 exists with an error:
"Exception in thread "main" java.lang.UnsupportedClassVersionError: UpdateCertificates : Unsupported major.minor version 51.0
..
..
..
Could not find the main class: UpdateCertificates. Program will exit.
"

I am able to locate the file UpdateCertificates.class afterwards the failed installation.
I've googled a lot on this issue without any reward.
It seems that the class file /usr/share/ca-certificates-java/UpdateCertificates.class is not in sync with the pacman-package?

Output pacman:

sudo pacman -S openjdk6
resolving dependencies...
looking for inter-conflicts...

Targets (2): ca-certificates-java-20110912-1 openjdk6-6.b22_1.10.4-1

Total Download Size: 29.82 MB
Total Installed Size: 117.36 MB

Proceed with installation? [Y/n] y
:: Retrieving packages from extra...
openjdk6-6.b22_1.1... 29.8M 59.0K/s 00:08:37 [######################] 100%
(2/2) checking package integrity [######################] 100%
(2/2) checking for file conflicts [######################] 100%
(1/2) installing ca-certificates-java [######################] 100%
(2/2) installing openjdk6 [######################] 100%
Exception in thread "main" java.lang.UnsupportedClassVersionError: UpdateCertificates : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: UpdateCertificates. Program will exit.
done.
when you use a non-reparenting window manager
set _JAVA_AWT_WM_NONREPARENTING=1 in
/etc/profile.d/openjdk6.sh
Optional dependencies for openjdk6
icedtea-web: web browser plugin + Java Web Start
alsa-lib: for sound
giflib: for gif format support



Additional info:
* package version(s)
OpenJDk6 (trial installation date is 5-DEC-2011)
* config and/or log files etc.


Steps to reproduce:
install OpenJDK6: #pacman -S openjdk6

Kind regards,
Rik Roos

This task depends upon

Closed by  Pierre Schmitz (Pierre)
Wednesday, 01 February 2012, 08:46 GMT
Reason for closing:  Fixed
Comment by Jan de Groot (JGC) - Wednesday, 07 December 2011, 13:35 GMT
  • Field changed: Summary (Pacman reports error on installation OPENJDK6 → [ca-certificates-java] Does not work with openjdk6)
  • Field changed: Status (Unconfirmed → Assigned)
  • Task assigned to Pierre Schmitz (Pierre)
The classfile in ca-certificates-java is probably compiled for java7 instead of java6. IMHO this should be compiled in a way that it works with both 6 and 7 (5 is ancient, so forget about older versions).
Comment by Adam Reichold (adamreichold) - Monday, 30 January 2012, 11:20 GMT
I checked out the PKGBUILD using SVN and modified the makedepends to use "java-environment>=6" and added the argument "-target 6" to the invocation of javac. This seems to solve the problem.

I also noticed that the Debian package referred to in the PKGBUILD is outdated and changed the version accordingly. I'm not sure how to continue from here, i.e. how to get this fix into Arch Linux. Anyway, I'm attaching the modified PKGBUILD and a diff to this post.

Regards, Adam.

P.S.: Should I flag the package as outdated because of the newer Debian package in testing?

Loading...