open-liberty: NPE in LTPAConfigurationImpl.loadConfig
I’ve owned a simple Stock Trader application for the past couple of years. Almost all of the microservices run on Liberty in Docker containers on Kubernetes (I’ve run it in ICP, IKS, and OCP). All has been fine as I moved up to each new Liberty release, until the new 19.0.0.4 came out last week. First a tech sales guy reported it, then I reproduced the problem myself. All I have to do is build the Docker container for my trader UI microservice against 19.0.0.4, and the server will fail to start, with an NPE early on as the security service tries to initialize. If I go back to 19.0.0.3, all is fine. The log output is as follows:
[INFO ] CWWKS0007I: The security service is starting...
[ERROR ] CWWKE0701E: bundle com.ibm.ws.security.token.ltpa:1.0.27.cl190420190419-0642 (67)[com.ibm.ws.security.token.ltpa.LTPAConfiguration(156)] : The activate method has thrown an exception java.lang.NullPointerException
at com.ibm.ws.security.token.ltpa.internal.LTPAConfigurationImpl.loadConfig(LTPAConfigurationImpl.java:115)
at [internal classes]
I’ll attach the full messages.log, a trace.log with *=info:com.ibm.ws.security.*=all:com.ibm.ws.webcontainer.security.*=all, and my server.xml (the full code is in GitHub at https://github.com/IBMStockTrader/trader). Note my app actually uses JWT, not LTPA, but it appears Liberty loads the LTPA stuff whenever the security service starts. Please let me know if any other traces or other info are needed. I’m holding off on pushing 19.0.0.4-based images to DockerHub until this is fixed, so that at least the people just using the pre-built images are OK - but some people prefer to build it themselves, and they will be broken now.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 19 (8 by maintainers)
Commits related to this issue
- Workaround Liberty bug https://github.com/OpenLiberty/open-liberty/issues/7448 — committed to IBMStockTrader/trader by deleted user 8 years ago
Add the following to the end of your
Dockerfileto work around:RUN server start --clean && server stopThis also has the added benefit of doing some work in your docker build to cache the configuration changes of your application so it doesn’t have to happen each time you start a new container based on your image.