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

NPE from SpringBootPlatformProvider startup() #49

Open
edrik opened this issue Jun 30, 2021 · 1 comment
Open

NPE from SpringBootPlatformProvider startup() #49

edrik opened this issue Jun 30, 2021 · 1 comment

Comments

@edrik
Copy link

edrik commented Jun 30, 2021

Trying to get a setup deployed as a tomcat war and not a standalone boot app. But running in to a type of race condition regarding startup of Springs app context and the HttpServlet30Dispatcher.

But now I'm starting to suspect that I'm missing something fundamental to how the SpringBootPlatformProvider is initiated?

So basically the Runnable onStartup is null when the SpringBootPlatformProvider.onApplicationEvent() triggers the startup() call and tries to:

    protected void startup() {
        tmpDir = createTempDir();
        onStartup.run();
    }

So when running as a tomcat war it looks like the EmbeddedKeycloakApplication is initiated after the ApplicationReadyEvent is triggered ?

So how how does this wiring actually work as a standalone boot app 🤔

@Shryne
Copy link

Shryne commented Jun 24, 2022

I have the same problem and I didn't manage to fix this behaviour. However, there's an alternative: https://www.baeldung.com/keycloak-embedded-in-spring-boot-app
Using this, I managed to get keycloak running in tomcat.

Still, it would be nice, if this issue would be fixed.

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

No branches or pull requests

2 participants