Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plain application fails to start when built with Jetty profile #28

Closed
nigredo-tori opened this issue Aug 18, 2020 · 3 comments
Closed

Comments

@nigredo-tori
Copy link

I build the project with the jetty profile, and run the resulting plain JAR:

$ mvn -P jetty clean install -DskipTests
$ java -jar ./embedded-keycloak-server-plain/target/embedded-keycloak-server-plain-jetty-2.4.0-SNAPSHOT.jar

The server fails to start, producing this log. AFAICT, this is the important part:

Caused by: javax.naming.NameNotFoundException: spring is not bound
  at org.eclipse.jetty.jndi.local.localContextRoot.getContext(localContextRoot.java:177) ~[jetty-jndi-9.4.29.v20200521.jar!/:9.4.29.v20200521]
  at org.eclipse.jetty.jndi.local.localContextRoot.lookup(localContextRoot.java:370) ~[jetty-jndi-9.4.29.v20200521.jar!/:9.4.29.v20200521]
  at org.eclipse.jetty.jndi.local.localContextRoot.lookup(localContextRoot.java:379) ~[jetty-jndi-9.4.29.v20200521.jar!/:9.4.29.v20200521]
  at java.naming/javax.naming.InitialContext.lookup(InitialContext.java:409) ~[na:na]
  at org.springframework.jndi.JndiTemplate.lambda$lookup$0(JndiTemplate.java:157) ~[spring-context-5.2.7.RELEASE.jar!/:5.2.7.RELEASE]
  at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:92) ~[spring-context-5.2.7.RELEASE.jar!/:5.2.7.RELEASE]
  at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:157) ~[spring-context-5.2.7.RELEASE.jar!/:5.2.7.RELEASE]
  at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:179) ~[spring-context-5.2.7.RELEASE.jar!/:5.2.7.RELEASE]
  at com.github.thomasdarimont.keycloak.embedded.support.InfinispanCacheManagerProvider.getCacheManager(InfinispanCacheManagerProvider.java:18) ~[embedded-keycloak-server-spring-boot-support-2.4.0-SNAPSHOT.jar!/:2.4.0-SNAPSHOT]
  ... 59 common frames omitted

However, I have too little experience with Spring and JNDI to figure out who should have bound spring, and why that didn't happen.

@nigredo-tori
Copy link
Author

nigredo-tori commented Aug 18, 2020

This seems to be caused by spring-projects/spring-boot#22241. Upgrading Spring Boot helps.

@thomasdarimont
Copy link
Owner

Could you try this again with the latest master or the latest release 2.4.0?

@nigredo-tori
Copy link
Author

The server starts OK with 2.4.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants