Support for Java17

Hi team,

Any idea on Keycloak support for Java 17.

Thanks!!

Have you tried it? There are not “officially supported” versions of Java/DB/etc. for Keycloak, just minimums. If it works, you should be fine.

haven’t tried it yet… wanted to check if keycloak has any plans supporting it.

@xgp - What Latest Java version does Keycloak support?

currently, in Keycloak 15 Version I still see it support Java 8 JDK
https://www.keycloak.org/docs/latest/server_installation/index.html#system-requirements

As I said, I don’t believe there are any “officially supported” versions. You can buy commercial support for the Redhat SSO product, and I’m sure they’d be happy to tell you which JDK versions are supported. This board is more of a community where we share our experiences.

I personally have run the current Keycloak on JDK 8 and 11 in production. I just downloaded and tried it on JDK 17 and it seems to work just fine. However, if you are planning to use it in production, I’d recommend testing it out yourself, and sharing any problems here for the benefit of the community.

Thank you @xgp this helps us to go on the right path now. I appreciate your quick responses.

It would be more help full if you could review the question posted below and let us know your inputs.

There is no great guide for large upgrades like that. Couple of thoughts:

  1. Read the official upgrade documentation: Upgrading Guide
  2. With your data from production, test incremental upgrades between versions. I.e. you might be able to upgrade from 3.4.0 to X.0.0, but it also might break something unexpected. If you go one major version at a time, it will be more likely to succeed. However test the upgrade version steps before you do it in production. There have been problems reported here and the mailing list about huge upgrades like this. You want to be sure, with your real data, before running it in prod.

Thank you @xgp for your quick response :slight_smile:
Is there any Stable Version that we need to consider to upgrade like 15.0 minus 2 version or should we jump on directly to Latest Version.

That’s up to you and your testing. However, I’m aware of people running 15.0.2 in production with no problems.

KeyCloak is backed by WildFly, that, currently, is officially supported in Java 8 and 11. Major versions is confirmed to run with some issues.

Keycloak.X is backed by Quarkus, I can’t say anything about it.

Wildfly Team will probably upgrade to Java 17, as it is new LTS version, but it is not an easy path.

Thank you @xgp and @claudioweiler for your suggestion.

Can you please help me out on this, when you get a chance… let me know if you need more details…

Update:
I could able to resolve this issue when I place the JAR file into KEYCLOAK_HOME/standalone/deployments/ jar file here
instead of "KEYCLOAK_HOME/providers/
Here is the references,
https://www.keycloak.org/docs/latest/server_development/#using-the-keycloak-deployer

In the older version of Keycloak 3.4.0.FINAL version, the “TokenIntrospectProviderFactory” used to recognize at run time.

after that I also faced one issue that I was seeing " ERROR [org.keycloak.services.error.KeycloakErrorHandler]"

I resolved this issue by adding the below plugin in POM.xml file,
http://docs.wildfly.org/17/Developer_Guide.html#ear-class-loading

	<build>
<plugins>
	<plugin>
		<groupId>org.apache.maven.plugins</groupId>
		<artifactId>maven-jar-plugin</artifactId>
		<configuration>
			<archive>
				<manifestEntries>
					<Dependencies>org.keycloak.keycloak-services</Dependencies>
				</manifestEntries>
			</archive>
		</configuration>
	</plugin>
</plugins>
	</build>