cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carlos Abad (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-9608) Support Java 9
Date Mon, 11 Jul 2016 22:52:11 GMT


Carlos Abad commented on CASSANDRA-9608:

Carlos Abad here from the Intel Java team.

I've been able to build Cassandra with JDK9 (build 125) applying the modifications noted below.

However the build only pass 70% of the Unit tests.

*At least Apache Ant version 1.9.7 is required for JDK9. Previous version are unable to load
the JavaScript script engine manager in JDK9.

*Generating Bytecode for Java 9. Source is still written for Java 8. 
*Java 9 removed -Xbootclasspath/p command option. Without this option Cassandra will depend
on the given Java classpath to include the CRC32 class
*To avoid "Annotation generator had thrown the exception. java.lang.NoClassDefFoundError:
javax/annotation/Generated" need to add "-addmods java.annotations.common" to the javac task
of the "build-test" target.

*Stream.of() throws an exception now, need to be captured.

*sun.misc.unsafe is going away. Fortunately cassandra.utils.concurrent.Locks is only used
in one place (db/partitions/AtomicBTreePartition, see below). It'll be enough to modify AtomicBTreePartitions
and remove this class.

*This is the only place where the class cassandra.utils.concurrent.Locks is used. We'll modify
it to use Java's ReentrantLock instead.

> Support Java 9
> --------------
>                 Key: CASSANDRA-9608
>                 URL:
>             Project: Cassandra
>          Issue Type: Task
>            Reporter: Robert Stupp
>            Priority: Minor
> This ticket is intended to group all issues found to support Java 9 in the future.
> From what I've found out so far:
> * Maven dependency {{com.sun:tools:jar:0}} via cobertura cannot be resolved. It can be
easily solved using this patch:
> {code}
> -        <dependency groupId="net.sourceforge.cobertura" artifactId="cobertura"/>
> +        <dependency groupId="net.sourceforge.cobertura" artifactId="cobertura">
> +          <exclusion groupId="com.sun" artifactId="tools"/>
> +        </dependency>
> {code}
> * Another issue is that {{sun.misc.Unsafe}} no longer contains the methods {{monitorEnter}}
+ {{monitorExit}}. These methods are used by {{o.a.c.utils.concurrent.Locks}} which is only
used by {{o.a.c.db.AtomicBTreeColumns}}.
> I don't mind to start working on this yet since Java 9 is in a too early development

This message was sent by Atlassian JIRA

View raw message