Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Byte buddy dependency

7 views
Skip to first unread message

Francis Augusto Medeiros

unread,
Oct 25, 2024, 4:13:24 AM10/25/24
to Keycloak Dev
Hi,

I am building a new extension to keycloak. It works fine on 26.0.0. But, when I build it for version 25.0.4 and deploy it, keycloak fails with this error:



ERROR: java.util.concurrent.ExecutionException: org.hibernate.bytecode.enhance.spi.EnhancementException: Failed to enhance class org.keycloak.models.jpa.entities.ClientScopeAttributeEntity
ERROR: org.hibernate.bytecode.enhance.spi.EnhancementException: Failed to enhance class org.keycloak.models.jpa.entities.ClientScopeAttributeEntity
ERROR: Failed to enhance class org.keycloak.models.jpa.entities.ClientScopeAttributeEntity
ERROR: Java 23 (67) is not supported by the current version of Byte Buddy which officially supports Java 22 (66) - update Byte Buddy or set net.bytebuddy.experimental as a VM property

But I didn’t include Byte Buddy on my dependencies. See below.

<packaging>jar</packaging>

<dependencies>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-core</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
<version>3.6.0.Final</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-services</artifactId>
<version>${version.keycloak}</version>
<exclusions>
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</exclusion>
<exclusion>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
</dependency>

</dependencies>

<build>
<finalName>uio-2fa</finalName>
<!--
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.4.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
-->
</build>

Any clue for what can be wrong here?

Best,
Francis

Thomas Darimont

unread,
Oct 25, 2024, 4:56:33 AM10/25/24
to Keycloak Dev
Hello Francis,

Keycloak 25.0.4 uses net.bytebuddy.byte-buddy-1.14.11.jar which appently does not support Java 23. I think if you build and run your extensions with JDK21 it should work.

Cheers,
Thomas

Reply all
Reply to author
Forward
0 new messages