keycloakify / keycloakify-starter

🔑 Keycloakify Projects Starter Template
http://keycloakify.dev
MIT License
238 stars 184 forks source link

Error on account theme with multiple pages in local keycloak container #35

Closed deincodeverbesserer93 closed 1 month ago

deincodeverbesserer93 commented 1 month ago

Hello @garronej , sorry that i have another error :). I want to test my keycloakify theme in my own local docker keycloak engine. Not yours with npx keycloakify start-keycloak.

I have the following error, when i login to the "account-theme". The login works but the error occurs on the account

In the browser

Bildschirmfoto 2024-09-23 um 18 34 38

In Keycloak console

backend-keycloak-1  | 2024-09-23 16:29:27,613 ERROR [org.keycloak.services.error.KeycloakErrorHandler] (executor-thread-5) Uncaught server error: java.lang.NoClassDefFoundError: org/keycloak/services/ForbiddenException
backend-keycloak-1  |   at org.keycloak.services.resources.account.AccountFormServiceFactory.create(AccountFormServiceFactory.java:47)
backend-keycloak-1  |   at org.keycloak.services.resources.account.AccountFormServiceFactory.create(AccountFormServiceFactory.java:21)
backend-keycloak-1  |   at org.keycloak.services.DefaultKeycloakSession.getProvider(DefaultKeycloakSession.java:195)
backend-keycloak-1  |   at org.keycloak.models.KeycloakBeanProducer_ProducerMethod_getKeycloakSession_XoSEUTXOsE3bpqXlGMAykCiECUM_ClientProxy.getProvider(Unknown Source)
backend-keycloak-1  |   at org.keycloak.services.resources.account.AccountLoader.getAccountResourceProvider(AccountLoader.java:172)
backend-keycloak-1  |   at org.keycloak.services.resources.account.AccountLoader.getAccountService(AccountLoader.java:86)
backend-keycloak-1  |   at org.keycloak.services.resources.account.AccountLoader$quarkusrestinvoker$getAccountService_265aa1aaf86cc2a5ca4d1c819f2a826c7dc11dc0.invoke(Unknown Source)
backend-keycloak-1  |   at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:29)
backend-keycloak-1  |   at io.quarkus.resteasy.reactive.server.runtime.QuarkusResteasyReactiveRequestContext.invokeHandler(QuarkusResteasyReactiveRequestContext.java:141)
backend-keycloak-1  |   at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:147)
backend-keycloak-1  |   at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:582)
backend-keycloak-1  |   at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
backend-keycloak-1  |   at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
backend-keycloak-1  |   at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
backend-keycloak-1  |   at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
backend-keycloak-1  |   at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
backend-keycloak-1  |   at java.base/java.lang.Thread.run(Thread.java:1583)
backend-keycloak-1  | Caused by: java.lang.ClassNotFoundException: org.keycloak.services.ForbiddenException
backend-keycloak-1  |   at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
backend-keycloak-1  |   at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
backend-keycloak-1  |   at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
backend-keycloak-1  |   at io.quarkus.bootstrap.runner.RunnerClassLoader.loadClass(RunnerClassLoader.java:115)
backend-keycloak-1  |   at io.quarkus.bootstrap.runner.RunnerClassLoader.loadClass(RunnerClassLoader.java:65)
backend-keycloak-1  |   ... 17 more
backend-keycloak-1  | 

Thats my changes:

Have you any ideas?

garronej commented 1 month ago

Hello again @deincodeverbesserer93,

Any new ideas?

Unfortunately, no :(

Since it works with the testing container and for everyone else, I assume there's something specific in your configuration that's triggering the bug.
If you can reproduce the issue in the testing container, I'll be able to fix it. Otherwise, I'm not sure how to proceed.

By the way, the title of the issue seems unrelated to the description. You might want to update it for clarity.

deincodeverbesserer93 commented 1 month ago

Hello, you are right it was my docker-compose.yml. My volumes has 2 lines. One with the v11 and one with v9. The Path with v9 ends with ..theme.v2.1.0.0.jar. And occurs on the docker-compose up an error. And only in the account theme.

volumes:
- "../v11/dist_keycloak/keycloak-theme-for-kc-25-and-above.jar:/opt/keycloak/providers/..theme.v25.0.1.jar"
- "../v9/dist_keycloak/keycloak-theme.v9.jar:/opt/keycloak/providers/..theme.v2-keycloak-theme-1.0.0.jar"

Do you have an idea why?

garronej commented 1 month ago

Cool that you found the error!
I don't understand though.
The two dots look very sketch to me. Where did you get thoses?

deincodeverbesserer93 commented 1 month ago

I think java has at the end has problems with the naming changes on underscore and a dot.