Mantis - Resin
Viewing Issue Advanced Details
5940 minor always 08-24-15 23:50 11-13-15 12:21
anton_kg  
ferg  
normal  
closed 4.0.44  
fixed  
none    
none 4.0.47  
0005940: Resin requires JDK 8 to compile
It came as a surprise after a minor update from 4.0.42 to 4.0.44 that the newer version requires a class which is available in the JDK8 only.

That eventually broke a stable version in Gentoo Linux, see the following bug report for more details:
https://bugs.gentoo.org/show_bug.cgi?id=558442 [^]

It is not specified in the documentation (http://caucho.com/resin-4.0/admin/starting-resin-install.xtp) [^] either.

Is this class really unavoidable? I suggest to find a workaround and not to raise the requirement unnecessarily.
module:
    [mkdir] Created dir: /var/tmp/portage/www-servers/resin-4.0.44/work/resin-4.0.44/modules/kernel/classes
     [copy] Copying 9 files to /var/tmp/portage/www-servers/resin-4.0.44/work/resin-4.0.44/modules/kernel/classes
    [javac] Compiling 1394 source files to /var/tmp/portage/www-servers/resin-4.0.44/work/resin-4.0.44/modules/kernel/classes
    [javac] /var/tmp/portage/www-servers/resin-4.0.44/work/resin-4.0.44/modules/kernel/src/com/caucho/config/reflect/VarType.java:36: error: cannot find symbol
    [javac] import java.lang.reflect.AnnotatedType;
    [javac] ^
    [javac] symbol: class AnnotatedType
    [javac] location: package java.lang.reflect
    [javac] /var/tmp/portage/www-servers/resin-4.0.44/work/resin-4.0.44/modules/kernel/src/com/caucho/config/reflect/VarType.java:193: error: cannot find symbol
    [javac] public AnnotatedType[] getAnnotatedBounds() {
    [javac] ^
    [javac] symbol: class AnnotatedType
    [javac] location: class VarType<D>
    [javac] where D is a type-variable:
    [javac] D extends GenericDeclaration declared in class VarType
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 2 errors

Notes
(0006650)
kazssym   
09-19-15 22:07   
I worked around by introducing a version of TypeVariable compatible with Java 7. See <https://bitbucket.org/kazssym/quercus/commits/8f112f7ce220ed54cda21b75906702d6cf571cf1> [^]
(0006655)
anton_kg   
10-17-15 18:09   
Apparently, it's other way around. Resin44 does support java7 but fails to compile with java8.

Gentoo devs has introduced a patch (https://gitweb.gentoo.org/repo/gentoo.git/diff/www-servers/resin/files/4.0.44/VarType.java.patch?h=project/libressl&id=57db769be72ea2e2de2fc479202a4708a9c1e24f) [^] and it broke java7 support.

They apply the patch optionally after the bug report.
(0006656)
Joseq   
10-19-15 19:50   
Anton is correct, and I don't know what I'm talking about. Ignore my original message below.


No, that's incorrect. The patch introduced by Patrice Clement into the portage tree makes it so that Resin 4.0.44 will compile with JDK 7.

I did not say "fixes" because the nicest thing I can say about that patch is that it's probably harmless.

It might also cause null pointer exceptions under some circumstances. I wouldn't run it in a production environment.