[jboss-jira] [JBoss JIRA] (WFCORE-1431) Look into loading Sasl providers on jigsaw

Darran Lofthouse (JIRA) issues at jboss.org
Wed Apr 20 12:27:00 EDT 2016


    [ https://issues.jboss.org/browse/WFCORE-1431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13194695#comment-13194695 ] 

Darran Lofthouse commented on WFCORE-1431:
------------------------------------------

If there are easy solutions for this go ahead and fix them but be aware a lot of this is about to be replaced anyway so it may be that we need to solve this elsewhere.

> Look into loading Sasl providers on jigsaw
> ------------------------------------------
>
>                 Key: WFCORE-1431
>                 URL: https://issues.jboss.org/browse/WFCORE-1431
>             Project: WildFly Core
>          Issue Type: Sub-task
>          Components: Remoting
>    Affects Versions: 2.1.0.CR1
>         Environment: JDK9 Jigsaw
>            Reporter: Tomaz Cerar
>            Assignee: Tomaz Cerar
>
> With JDK9 jigsaw builds remoting and most tests related to it fail.
> {noformat}
> 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 at 9-ea/Reflection.java:411)
> 	at sun.reflect.Reflection.throwIllegalAccessException(java.base at 9-ea/Reflection.java:402)
> 	at sun.reflect.Reflection.ensureMemberAccess(java.base at 9-ea/Reflection.java:99)
> 	at java.lang.Class.newInstance(java.base at 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 at 9-ea/Reflection.java:411)
> 	at sun.reflect.Reflection.throwIllegalAccessException(java.base at 9-ea/Reflection.java:402)
> 	at sun.reflect.Reflection.ensureMemberAccess(java.base at 9-ea/Reflection.java:99)
> 	at java.lang.Class.newInstance(java.base at 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 at 9-ea/Reflection.java:411)
> 	at sun.reflect.Reflection.throwIllegalAccessException(java.base at 9-ea/Reflection.java:402)
> 	at sun.reflect.Reflection.ensureMemberAccess(java.base at 9-ea/Reflection.java:99)
> 	at java.lang.Class.newInstance(java.base at 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 at 9-ea/Reflection.java:411)
> 	at sun.reflect.Reflection.throwIllegalAccessException(java.base at 9-ea/Reflection.java:402)
> 	at sun.reflect.Reflection.ensureMemberAccess(java.base at 9-ea/Reflection.java:99)
> 	at java.lang.Class.newInstance(java.base at 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)
> {noformat}
> 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 
> {noformat}
> -XaddExports:java.security.sasl/com.sun.security.sasl.digest=ALL-UNNAMED,java.security.sasl/com.sun.security.sasl=ALL-UNNAMED
> {noformat}
> but we should have proper solution.
> The stack trace we see on JDK9 is:



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list