首先,我不是Java开发人员。但是,我有一个用Java开发的服务,一直到今天都能正常工作。我们的数据库服务器得到一个磁盘错误,所以我们返回VMVare备份。
我的服务在不同的机器上,没有像预期的那样工作(或者看起来工作但不工作)。
上一个Java代码是在一年多前开发的。因此,任何配置都已更改。我拿到了那根木头,我被挤压了。
Java版本: 1.8.0_151
Microsoft SQL Server: 2012企业版
DEBUG 28/05/2019 12:26:55 [main] [] [] [] Checking 0 named HQL queries
DEBUG 28/05/2019 12:26:55 [main] [] [] [] Checking 0 named SQL queries
DEBUG 28/05/2019 12:26:55 [main] [] [] [] Initializing SessionFactoryRegistry : org.hibernate.internal.SessionFactoryRegistry@3f06ebe0
DEBUG 28/05/2019 12:26:55 [main] [] [] [] Registering SessionFactory: aa73b978-22f9-4309-b9f3-e07d951dbd50 ()
DEBUG 28/05/2019 12:26:55 [main] [] [] [] Not binding SessionFactory to JNDI, no JNDI name configured
INFO 28/05/2019 12:26:56 [main] [] [] [] BatchDML Bean afterPropertiesSet
INFO 28/05/2019 12:26:56 [main] [] [] [] HazelcastCache is initiated amr_common
INFO 28/05/2019 12:26:56 [main] [] [] [] HazelcastCache initializing in afterPropertiesSet.
DEBUG 28/05/2019 12:27:21 [springHikariCP housekeeper] [] [] [] springHikariCP - Before cleanup stats (total=5, active=0, idle=5, waiting=0)
DEBUG 28/05/2019 12:27:21 [springHikariCP housekeeper] [] [] [] springHikariCP - After cleanup stats (total=5, active=0, idle=5, waiting=0)
DEBUG 28/05/2019 12:27:51 [springHikariCP housekeeper] [] [] [] springHikariCP - Before cleanup stats (total=5, active=0, idle=5, waiting=0)
DEBUG 28/05/2019 12:27:51 [springHikariCP housekeeper] [] [] [] springHikariCP - After cleanup stats (total=5, active=0, idle=5, waiting=0)
DEBUG 28/05/2019 12:28:21 [springHikariCP housekeeper] [] [] [] springHikariCP - Before cleanup stats (total=5, active=0, idle=5, waiting=0)
DEBUG 28/05/2019 12:28:21 [springHikariCP housekeeper] [] [] [] springHikariCP - After cleanup stats (total=5, active=0, idle=5, waiting=0)
DEBUG 28/05/2019 12:28:51 [springHikariCP housekeeper] [] [] [] springHikariCP - Before cleanup stats (total=5, active=0, idle=5, waiting=0)
DEBUG 28/05/2019 12:28:51 [springHikariCP housekeeper] [] [] [] springHikariCP - After cleanup stats (total=5, active=0, idle=5, waiting=0)
DEBUG 28/05/2019 12:28:58 [main] [] [] [] HHH000031: Closing
TRACE 28/05/2019 12:28:58 [main] [] [] [] Cleaning QueryPlan Cache
TRACE 28/05/2019 12:28:58 [main] [] [] [] Registering external cascade style [persist : STYLE_PERSIST]
DEBUG 28/05/2019 12:28:58 [main] [] [] [] External cascade style regsitration [persist : STYLE_PERSIST] overrode base registration [STYLE_PERSIST_SKIPLAZY]
DEBUG 28/05/2019 12:28:58 [main] [] [] [] Implicitly destroying ServiceRegistry on de-registration of all child ServiceRegistries
DEBUG 28/05/2019 12:28:58 [main] [] [] [] Implicitly destroying Boot-strap registry on de-registration of all child ServiceRegistries
INFO 28/05/2019 12:28:58 [main] [] [] [] springHikariCP - Shutdown initiated...
DEBUG 28/05/2019 12:28:58 [main] [] [] [] springHikariCP - Before shutdown stats (total=5, active=0, idle=5, waiting=0)
DEBUG 28/05/2019 12:28:58 [springHikariCP connection closer] [] [] [] springHikariCP - Closing connection net.sourceforge.jtds.jdbc.ConnectionJDBC3@4a1c0752: (connection evicted)
DEBUG 28/05/2019 12:28:58 [springHikariCP connection closer] [] [] [] springHikariCP - Closing connection net.sourceforge.jtds.jdbc.ConnectionJDBC3@6c2336cd: (connection evicted)
DEBUG 28/05/2019 12:28:58 [springHikariCP connection closer] [] [] [] springHikariCP - Closing connection net.sourceforge.jtds.jdbc.ConnectionJDBC3@62e4d539: (connection evicted)
DEBUG 28/05/2019 12:28:58 [springHikariCP connection closer] [] [] [] springHikariCP - Closing connection net.sourceforge.jtds.jdbc.ConnectionJDBC3@66db5dbd: (connection evicted)
DEBUG 28/05/2019 12:28:58 [springHikariCP connection closer] [] [] [] springHikariCP - Closing connection net.sourceforge.jtds.jdbc.ConnectionJDBC3@23d9df02: (connection evicted)
DEBUG 28/05/2019 12:28:58 [main] [] [] [] springHikariCP - After shutdown stats (total=0, active=0, idle=0, waiting=0)
INFO 28/05/2019 12:28:58 [main] [] [] [] springHikariCP - Shutdown completed.发布于 2019-05-28 17:52:15
这里没有错误,至少在Hikari的意义上没有错误。日志所说的是您的基于spring的应用程序正在关闭,这在这里是可见的:
DEBUG 28/05/2019 12:28:58 [main] [] [] [] HHH000031: Closing
DEBUG 28/05/2019 12:28:58 [main] [] [] [] Implicitly destroying Boot-strap registry on de-registration of all child ServiceRegistriesSpring正在关闭其应用程序上下文中的所有bean。作为一个副作用,你还会在你的连接池上得到一个shutdown命令。但这不仅仅是连接池。这就是一切。
从我在关闭spring服务之前的日志中可以看到,您的hibernate会话已经关闭。这在您的日志中的前一行中可见。
你需要弄清楚为什么你的spring应用程序要关闭,为什么你的hibernate会话被关闭,Hikari关闭只是一个副作用。
https://stackoverflow.com/questions/56339406
复制相似问题