Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#909040: davmail: A JNI error has occurred

72 views
Skip to first unread message

Philipp Marek

unread,
Sep 17, 2018, 3:20:03 PM9/17/18
to
Package: davmail
Version: 4.9.0.2652-1
Severity: normal

Just running it after installaion gives me

Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/debian/javatools/CheckProperty has been compiled by a more recent version of the Java Runtime (class file version 54.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:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495)
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: davmail/DavGateway has been compiled by a more recent version of the Java Runtime (class file version 54.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:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495)

This is with "java" being /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java.


-- System Information:
Debian Release: buster/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'testing-debug'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.18.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=de_AT.UTF-8, LC_CTYPE=de_AT.UTF-8 (charmap=UTF-8), LANGUAGE=de_AT:de (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages davmail depends on:
ii adduser 3.117
ii default-jre-headless [java10-runtime-headless] 2:1.10-68
ii jarwrapper 0.64
ii libcommons-codec-java 1.11-1
ii libcommons-httpclient-java 3.1-14
ii libcommons-logging-java 1.2-2
ii libhtmlcleaner-java 2.21-3
ii libjackrabbit-java 2.14.4-1
ii libjcifs-java 1.3.19-2
ii liblog4j1.2-java 1.2.17-8
ii libmail-java 1.6.1-3
ii libservlet3.1-java 8.5.34-1
ii libslf4j-java 1.7.25-3
ii libstax2-api-java 4.1-1
ii libwoodstox-java 1:5.1.0-2
ii logrotate 3.14.0-4
ii lsb-base 9.20170808
ii openjdk-10-jre-headless [java10-runtime-headless] 10.0.2+13-1

davmail recommends no packages.

Versions of packages davmail suggests:
ii libswt-cairo-gtk-4-jni 4.6.3-2
ii libswt-gtk-4-java 4.6.3-2

-- no debconf information

--

Alexandre Rossi

unread,
Sep 17, 2018, 5:40:03 PM9/17/18
to
Hi,

Thanks for reporting.

Debian buster has java10 as default java. I cannot make davmail run
with java8 and java10 and at the same time compile it with java10. I'm
seeking advice for now about how to solve.

You can work around the bug by running davmail with java10:
$ sudo update-alternatives --config java
or
$ /usr/lib/jvm/java-10-openjdk-amd64/bin/java -jar
/usr/share/java/davmail.jar /etc/davmail.properties

Thanks,

Alex

Emmanuel Bourg

unread,
Sep 17, 2018, 7:10:03 PM9/17/18
to
Control: reassign -1 jarwrapper
Control: affects -1 davmail

This is a jarwrapper bug, the CheckProperty class was compiled without
specifying the source/target level, thus defaulting to Java 10 bytecode
(version 54.0).

Alexandre Rossi

unread,
Sep 18, 2018, 3:40:02 PM9/18/18
to
Hi,

> This is a jarwrapper bug, the CheckProperty class was compiled without
> specifying the source/target level, thus defaulting to Java 10 bytecode
> (version 54.0).

Thanks but the second part of the stacktrace is still on davmail.

I need to investigate between these options:
1) make the binary package use java10 but this will require an upload
when java11 is out
2) wrapper script to force the user to use java10
3) make it possible to compile davmail with target=1.8 and thus
without --add-exports

I'd be happy to get advice on this. I think I'll try 3) first.

Alex
0 new messages