Closed ebremer closed 2 years ago
You have to change <mode>native-agent</mode>
to <mode>native</mode>
in your pom.xml
files. See this documentation.
Then #1576 will pop up:
org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is java.lang.NoSuchMethodError: io.undertow.util.FastConcurrentDirectDeque.<init>()
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:163) ~[keycloak:2.6.6]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:577) ~[keycloak:5.3.18]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) ~[keycloak:2.6.6]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:740) ~[keycloak:2.6.6]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:415) ~[keycloak:2.6.6]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) ~[keycloak:2.6.6]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1312) ~[keycloak:2.6.6]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301) ~[keycloak:2.6.6]
at com.github.thomasdarimont.keycloak.embedded.runner.Main.main(Main.java:11) ~[keycloak:999-SNAPSHOT]
Caused by: java.lang.NoSuchMethodError: io.undertow.util.FastConcurrentDirectDeque.<init>()
at io.undertow.util.ConcurrentDirectDeque.<clinit>(ConcurrentDirectDeque.java:45) ~[keycloak:2.2.16.Final]
at io.undertow.server.handlers.cache.LRUCache.<init>(LRUCache.java:67) ~[na:na]
at io.undertow.servlet.handlers.ServletPathMatches.<init>(ServletPathMatches.java:82) ~[keycloak:2.2.16.Final]
at io.undertow.servlet.core.DeploymentImpl.<init>(DeploymentImpl.java:95) ~[na:na]
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:151) ~[na:na]
at org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory.createManager(UndertowServletWebServerFactory.java:330) ~[keycloak:2.6.6]
at org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory.getWebServer(UndertowServletWebServerFactory.java:299) ~[keycloak:2.6.6]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:182) ~[keycloak:2.6.6]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:160) ~[keycloak:2.6.6]
But you apparently solved that already?
Yeah, I thought I did and I missed the subtle difference between "native-agent" and "native". Once I made the above change this came back:
Spring Boot Version: (v2.6.6)
Keycloak Version: (v@keycloak.version@)
2022-04-14 09:37:21.893 INFO 8098 --- [ main] c.g.t.keycloak.embedded.runner.Main : Starting Main v999-SNAPSHOT using Java 17.0.3 on Corsair with PID 8098 (/mnt/d/projects/embedded-spring-boot-keycloak-server/embedded-keycloak-server-plain/target/keycloak started by erich in /mnt/d/projects/embedded-spring-boot-keycloak-server/embedded-keycloak-server-plain)
2022-04-14 09:37:21.893 INFO 8098 --- [ main] c.g.t.keycloak.embedded.runner.Main : No active profile set, falling back to 1 default profile: "default"
2022-04-14 09:37:22.060 WARN 8098 --- [ main] w.s.c.ServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is java.lang.NoSuchMethodError: io.undertow.util.FastConcurrentDirectDeque.<init>()
2022-04-14 09:37:22.063 ERROR 8098 --- [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is java.lang.NoSuchMethodError: io.undertow.util.FastConcurrentDirectDeque.<init>()
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:163) ~[keycloak:2.6.6]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:577) ~[keycloak:5.3.18]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) ~[keycloak:2.6.6]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:740) ~[keycloak:2.6.6]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:415) ~[keycloak:2.6.6]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) ~[keycloak:2.6.6]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1312) ~[keycloak:2.6.6]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301) ~[keycloak:2.6.6]
at com.github.thomasdarimont.keycloak.embedded.runner.Main.main(Main.java:11) ~[keycloak:999-SNAPSHOT]
Caused by: java.lang.NoSuchMethodError: io.undertow.util.FastConcurrentDirectDeque.<init>()
at io.undertow.util.ConcurrentDirectDeque.<clinit>(ConcurrentDirectDeque.java:45) ~[keycloak:2.2.16.Final]
at io.undertow.server.handlers.cache.LRUCache.<init>(LRUCache.java:67) ~[na:na]
at io.undertow.servlet.handlers.ServletPathMatches.<init>(ServletPathMatches.java:82) ~[keycloak:2.2.16.Final]
at io.undertow.servlet.core.DeploymentImpl.<init>(DeploymentImpl.java:95) ~[na:na]
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:151) ~[na:na]
at org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory.createManager(UndertowServletWebServerFactory.java:330) ~[keycloak:2.6.6]
at org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory.getWebServer(UndertowServletWebServerFactory.java:299) ~[keycloak:2.6.6]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:182) ~[keycloak:2.6.6]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:160) ~[keycloak:2.6.6]
... 8 common frames omitted
Then i'll reopen #1576 and close this one.
Project compiles using Ubuntu 20.X
reproduce with
throws the error