Unable to register MBean [HikariDataSource (HikariPool-2)] with key ‘dataSource‘

       在服务器上部署项目时,启动tomcat失败,查看报错日志时主要显示如下:

org.springframework.jmx.export.UnableToRegisterMBeanException: Unable to register MBean [HikariDataSource (HikariPool-2)] with key 'dataSource';  nested exception is javax.management.InstanceAlreadyExistsException: com.zaxxer.hikari:name=dataSource,type=HikariDataSource

       查询后得知在tomcat的安装目录中webapps下可能存在多个项目实例,如果仅需要一个,那么删除其它的即可。

       最后重新启动项目即可。 

猜你喜欢

转载自blog.csdn.net/m0_56426418/article/details/131311942