Using the Liquibase Servlet Listener integration with Embedded Derby I’m observing:
java.sql.SQLNonTransientConnectionException: No current connection
(a Maven WAR project):
The issue appears aided by the Tomcat JDBC Connection Pool default setup:
... Default value is false
The obvious workaround is to configure the Datasource to detect invalid connections immediately and reconnect which would reboot the Embedded Derby instance.
The workaround might be considered suboptimal (for performance reasons) and to avoid general confusion by the errors seen with some default settings, I think Liquibase should not shut Embedded Derby down in LiquibaseServletListener.contextInitialized() but possibly in LiquibaseServletListener.contextDestroyed() (as courtesy to the users):
(At very least the documentation could be updated to give heads up on this issue.)