lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <>
Subject Java 9 build 118 is hiding some documented & public classes from unnamed module
Date Mon, 16 May 2016 14:28:15 GMT

the Lucene team installed JDK9 build 118 today and this failed our build during some checks.
The reason is that some classes are missing from the unnamed module (standard Java 8 classpath-only
application). Just try this test:

public class Test {
  public static void main(String... args) throws Exception {

$ javac
$ java Test
Exception in thread "main" java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter
        at jdk.internal.loader.BuiltinClassLoader.loadClass(java.base@9-ea/
        at jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(java.base@9-ea/
        at java.lang.ClassLoader.loadClass(java.base@9-ea/
        at java.lang.Class.forName0(java.base@9-ea/Native Method)
        at java.lang.Class.forName(java.base@9-ea/
        at Test.main(

$ java -version
java version "9-ea"
Java(TM) SE Runtime Environment (build 9-ea+118)
Java HotSpot(TM) 64-Bit Server VM (build 9-ea+118, mixed mode)

This works with build 116 and Java 8.

This is not the only class that’s missing at runtime, there are more: I do not have the
complete list, but our checks using the forbiddenapis Ant/Maven/Gradle plugin fails to load
classes around JAXB/XML (javax.xml.bind.*, javax.jws.*) and CORBA (org.omg.CORBA.*), but also
"javax.activation.ActivationDataFlavor". But there may be more packages missing.

It looks like some module exports are missing because the classes are all listed on the JDK
I'd suggest to add a check in the packaging that validates that all classes also visible in
the Javadocs are visible at runtime from applications not using the module system.

Should I open bug report or can we shortcut this through the mailing list?

Greetings from the Lucene team,

Uwe Schindler 
ASF Member, Apache Lucene PMC / Committer
Bremen, Germany

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message