Uploaded image for project: 'Keycloak'
  1. Keycloak
  2. KEYCLOAK-13690

Tomcat adapter uses java/security/acl/Group which was removed in OpenJDK 14

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Duplicate Issue
    • Affects Version/s: 9.0.2
    • Fix Version/s: None
    • Component/s: Adapter - JEE
    • Labels:
    • Steps to Reproduce:
      Hide

      Create a Spring Boot project with version 2.2.6.RELEASE and Java 14.

      Use the following dependencies:

      <dependency>
      <groupId>org.keycloak</groupId>
      <artifactId>keycloak-spring-security-adapter</artifactId>
      <version>9.0.2</version>
      </dependency>
      <dependency>
      <groupId>org.keycloak</groupId>
      <artifactId>keycloak-spring-boot-starter</artifactId>
      <version>9.0.2</version>
      </dependency>

      Show
      Create a Spring Boot project with version 2.2.6.RELEASE and Java 14. Use the following dependencies: <dependency> <groupId>org.keycloak</groupId> <artifactId>keycloak-spring-security-adapter</artifactId> <version>9.0.2</version> </dependency> <dependency> <groupId>org.keycloak</groupId> <artifactId>keycloak-spring-boot-starter</artifactId> <version>9.0.2</version> </dependency>
    • Docs QE Status:
      NEW
    • QE Status:
      NEW

      Description

      We are running Keycloak 9.0.2 on Java 13. Today I was trying to update to Java 14 and got the following exception when sending and http request to the server:

      java.lang.NoClassDefFoundError: java/security/acl/Group
      	at org.keycloak.adapters.tomcat.KeycloakAuthenticatorValve.createPrincipalFactory(KeycloakAuthenticatorValve.java:96)
      	at org.keycloak.adapters.tomcat.AbstractKeycloakAuthenticatorValve.createSessionTokenStore(AbstractKeycloakAuthenticatorValve.java:262)
      	at org.keycloak.adapters.tomcat.AbstractKeycloakAuthenticatorValve.getTokenStore(AbstractKeycloakAuthenticatorValve.java:251)
      	at org.keycloak.adapters.tomcat.KeycloakAuthenticatorValve.getTokenStore(KeycloakAuthenticatorValve.java:106)
      	at org.keycloak.adapters.tomcat.AbstractKeycloakAuthenticatorValve.checkKeycloakSession(AbstractKeycloakAuthenticatorValve.java:228)
      	at org.keycloak.adapters.tomcat.AbstractKeycloakAuthenticatorValve.invoke(AbstractKeycloakAuthenticatorValve.java:180)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
      	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373)
      	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
      	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1594)
      	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      	at java.base/java.lang.Thread.run(Thread.java:832)
      Caused by: java.lang.ClassNotFoundException: java.security.acl.Group
      	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602)
      	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
      	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
      

      Looks like the class was marked as deprecated and was removed now. https://bugs.openjdk.java.net/browse/JDK-8217101

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              dennisg87 Dennis Griese (Inactive)
              Votes:
              8 Vote for this issue
              Watchers:
              16 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: