IllegalAccessError: class com.sun.xml.wss.impl.SecurableSoapMessage exception in Web Service
Issue
-
After migrating the web services client application to JDK 17, it fails to load classes with the following exception.
Exception in thread "main" java.lang.IllegalAccessError: class com.sun.xml.wss.impl.SecurableSoapMessage (in unnamed module @0x0000x000) cannot access class com.sun.org.apache.xml.internal.security.Init (in module java.xml.crypto) because module java.xml.crypto does not export com.sun.org.apache.xml.internal.security to unnamed module @0x0000x000
Environment
- Red Hat OpenJDK
- 11
- 17
- 21
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.