-
Sub-task
-
Resolution: Done
-
Major
-
2.1.0.CR1
-
None
With JDK9 jigsaw builds remoting and most tests related to it fail.
java.lang.IllegalAccessException: class org.xnio.sasl.SaslUtils cannot access class com.sun.security.sasl.ntlm.FactoryImpl (in module java.security.sasl) because module java.security.sasl does not export com.sun.security.sasl.ntlm to unnamed module @a67c67e at sun.reflect.Reflection.throwIllegalAccessException(java.base@9-ea/Reflection.java:411) at sun.reflect.Reflection.throwIllegalAccessException(java.base@9-ea/Reflection.java:402) at sun.reflect.Reflection.ensureMemberAccess(java.base@9-ea/Reflection.java:99) at java.lang.Class.newInstance(java.base@9-ea/Class.java:545) at org.xnio.sasl.SaslUtils.getFactories(SaslUtils.java:138) at org.xnio.sasl.SaslUtils.getSaslServerFactories(SaslUtils.java:87) at Test.main(Test.java:3) java.lang.IllegalAccessException: class org.xnio.sasl.SaslUtils cannot access class com.sun.security.sasl.digest.FactoryImpl (in module java.security.sasl) because module java.security.sasl does not export com.sun.security.sasl.digest to unnamed module @a67c67e at sun.reflect.Reflection.throwIllegalAccessException(java.base@9-ea/Reflection.java:411) at sun.reflect.Reflection.throwIllegalAccessException(java.base@9-ea/Reflection.java:402) at sun.reflect.Reflection.ensureMemberAccess(java.base@9-ea/Reflection.java:99) at java.lang.Class.newInstance(java.base@9-ea/Class.java:545) at org.xnio.sasl.SaslUtils.getFactories(SaslUtils.java:138) at org.xnio.sasl.SaslUtils.getSaslServerFactories(SaslUtils.java:87) at Test.main(Test.java:3) java.lang.IllegalAccessException: class org.xnio.sasl.SaslUtils cannot access class com.sun.security.sasl.ServerFactoryImpl (in module java.security.sasl) because module java.security.sasl does not export com.sun.security.sasl to unnamed module @a67c67e at sun.reflect.Reflection.throwIllegalAccessException(java.base@9-ea/Reflection.java:411) at sun.reflect.Reflection.throwIllegalAccessException(java.base@9-ea/Reflection.java:402) at sun.reflect.Reflection.ensureMemberAccess(java.base@9-ea/Reflection.java:99) at java.lang.Class.newInstance(java.base@9-ea/Class.java:545) at org.xnio.sasl.SaslUtils.getFactories(SaslUtils.java:138) at org.xnio.sasl.SaslUtils.getSaslServerFactories(SaslUtils.java:87) at Test.main(Test.java:3) java.lang.IllegalAccessException: class org.xnio.sasl.SaslUtils cannot access class com.sun.security.sasl.gsskerb.FactoryImpl (in module jdk.security.jgss) because module jdk.security.jgss does not export com.sun.security.sasl.gsskerb to unnamed module @a67c67e at sun.reflect.Reflection.throwIllegalAccessException(java.base@9-ea/Reflection.java:411) at sun.reflect.Reflection.throwIllegalAccessException(java.base@9-ea/Reflection.java:402) at sun.reflect.Reflection.ensureMemberAccess(java.base@9-ea/Reflection.java:99) at java.lang.Class.newInstance(java.base@9-ea/Class.java:545) at org.xnio.sasl.SaslUtils.getFactories(SaslUtils.java:138) at org.xnio.sasl.SaslUtils.getSaslServerFactories(SaslUtils.java:87) at Test.main(Test.java:3)
Problem is in org.xnio.sasl.SaslUtil.getFactories()
Which doesn't work correctly on Jigsaw as it prevents us form loading classes from java base image as they are not exported.
as workaround we have
-XaddExports:java.security.sasl/com.sun.security.sasl.digest=ALL-UNNAMED,java.security.sasl/com.sun.security.sasl=ALL-UNNAMED
but we should have proper solution.
The stack trace we see on JDK9 is: