Details

    • Type: Sub-task
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2.1.0.CR1
    • Fix Version/s: 3.0.0.Alpha1
    • Component/s: Remoting
    • Labels:
      None
    • Environment:

      JDK9 Jigsaw

      Description

      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:

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                ctomc Tomaž Cerar
                Reporter:
                ctomc Tomaž Cerar
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: