我在Spring工具套件上运行JHispter应用程序。我已经在我的本地系统上导入了该应用程序。导入应用程序后,我尝试使用spring启动工具运行应用程序。它抛出了这个例外。
liquibase.exception.DatabaseException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.
at liquibase.database.jvm.JdbcConnection.setAutoCommit(JdbcConnection.java:363) ~[liquibase-core-3.4.2.jar:na]
at liquibase.database.AbstractJdbcDatabase.close(AbstractJdbcDatabase.java:1176) ~[liquibase-core-3.4.2.jar:na]
at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:400) ~[liquibase-core-3.4.2.jar:na]
at com.incyyte.app.config.liquibase.AsyncSpringLiquibase.initDb(AsyncSpringLiquibase.java:63) ~[classes/:na]
at com.incyyte.app.config.liquibase.AsyncSpringLiquibase.lambda$0(AsyncSpringLiquibase.java:49) ~[classes/:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[na:1.8.0_71]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[na:1.8.0_71]
at java.lang.Thread.run(Unknown Source) ~[na:1.8.0_71]
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_71]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[na:1.8.0_71]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[na:1.8.0_71]
at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[na:1.8.0_71]
at com.mysql.jdbc.Util.handleNewInstance(Util.java:404) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.Util.getInstance(Util.java:387) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:917) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:896) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:885) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:860) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.ConnectionImpl.throwConnectionClosedException(ConnectionImpl.java:1235) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.ConnectionImpl.checkClosed(ConnectionImpl.java:1230) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.mysql.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:4833) ~[mysql-connector-java-5.1.38.jar:5.1.38]
at com.zaxxer.hikari.proxy.ConnectionProxy.setAutoCommit(ConnectionProxy.java:334) ~[HikariCP-2.4.1.jar:na]
at com.zaxxer.hikari.proxy.HikariConnectionProxy.setAutoCommit(HikariConnectionProxy.java) ~[HikariCP-2.4.1.jar:na]
at liquibase.database.jvm.JdbcConnection.setAutoCommit(JdbcConnection.java:361) ~[liquibase-core-3.4.2.jar:na]
... 7 common frames omitted
请告诉我这里有什么问题。
答案 0 :(得分:0)
从Eclipse运行时遇到同样的错误。我从后端数据库中删除了所有表,然后运行gradlew bootRun
并且空白应用程序启动正常。然后,我可以毫无问题地从Eclipse运行应用程序。