I am getting below error in prod mode for (Java8+Oauth2+MySql+Hazelcast+no clustered http sessions) combination. Dev mode has worked fine.
Unable to register MBe
This seems like your application is re-deploying, but when it un-deployed the container did not call the close()
or shutdown()
method on the HikariDataSource
. Spring should have a "destroy" property (or something akin) that can be set for un-deployment.
Also, make sure that you are using the latest version of HikariCP (2.2.5) if possible, I believe an old version did not unregister MBeans properly.
EDIT: if you have two WARs in the same VM that need HikariCP, and you want to register MBeans, you need to set each one to use a different poolName
. I see it is using the default pool name of HikariPool-0
.