ClassNotFoundException on WildFly 19.1 with Java 14: java. security.acl.Group
I migrated a web application from WildFly 17 on Java 11 to the latest version of both: WildFly 19 on Java 14. I ended up with a ClassNotFoundException: java.security.acl.Group
, probably because the web application uses JAAS.
Note that building a similar web application after a tutorial of my own works fine, but it does not use JAAS. This is related to the package java.security.acl
that makes me think JAAS is relevant.
I searched online and found issue WFCORE-4282 at WildFly’s JIRA, which seems to mean that although they know this The java.security.acl.Group
class was deprecated over a year ago, but WildFly 19 still needs it and Java 14 does remove it, resulting in ClassNotFoundException
for me.
Is my explanation correct? Is WildFly 19 + Java 14 + JAAS = ClassNotFoundException
inevitable or has anyone managed to make it work? Or am I doing something wrong? In my opinion, JBoss overlooked such a big problem on WildFly….
Update: I removed Java 14, installed Java 13, reinstalled Eclipse and WildFly, and redeployed the application and it works fine, so WildFly 19 + Java 13 + JAAS = OK!
Solution
This issue was fixed at the end of 2021 (better late than never!). As a result, you can now use JDK 17+ in combination with WildFly 26+. Note, however, that you have to make important moves from:
<subsystem xmlns="urn:jboss:domain:security:1.2">
...
<login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule" flag="required">
...
</login-module>
</subsystem>
… to….
<subsystem xmlns="urn:wildfly:elytron:15.0">
...
<security-realms>
<jdbc-realm>
...
</jdbc-realm>
</security-realms>
</subsystem>
YMMV depends on your architecture, but basically you have to embrace Elytron.