NoClassDefFoundError after migrate

Hy!

I have migrated from Keycloak 6.0 to 14.0, Wildfly 16 to 23, and the kc adapter to 23.
The keycloak migration was successfull, I can communicate and authenticate myself via REST api.

But when the Java EE application wants to communicate with Keycloak I get the follwing exception:

Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.keycloak.representations.idm.RealmRepresentation

Sometimes I get this:

Caused by: java.lang.ClassNotFoundException: org.jboss.logging.Logger from [Module “org.keycloak.keycloak-core” version 14.0.0 from local module loader @6155d082 (finder: local module finder @3a5ecce3 (roots: /opt/wildfly/modules,/opt/wildfly/modules/system/layers/base,/opt/wildfly/modules/system/add-ons/keycloak))]

I also updated the dependencies inside the application, to the latest 14.0.0 version.

What am I missing? Any ideas?

Thanks!

It works well with the 13.0.1 keycloak adapter.

hi, in my case is equal , I was doing a new instalation, with wildfly 23.0.2.final and keycloak 14.0.0.

in console from eclipse, receve the folling error:

Caused by: java.lang.ClassNotFoundException: org.jboss.logging.Logger from [Module “org.keycloak.keycloak-core” version 14.0.0 from local module loader @740d2e78 (finder: local module finder @1c481ff2 (roots: /opt/wildfly/wildfly/modules,/opt/wildfly/wildfly/modules/system/layers/base,/opt/wildfly/wildfly/modules/system/add-ons/keycloak))]

to solve,

in file {work_dir}/modules/system/add-ons/keycloak/org/keycloak/keycloak-core/main/module.xml, inside tag <dependencies>, i add the module org.jboss.logging, and It worked!

sorry my inglês, it can be bad.

Thanks, you saved my day.
After added org.jboss.logging dependency into …/module.xml it worked.

I was upgrading to Keycloak 14.