SQLNonTransientConnectionException: No current connection, in my application while interacting with Derby database

坚强是说给别人听的谎言 提交于 2019-11-29 06:57:49

Found this via Google.

I had the same problem and found my answer in this sample application: http://db.apache.org/derby/docs/10.4/devguide/rdevcsecure26537.html

// force garbage collection to unload the EmbeddedDriver
// so Derby can be restarted
System.gc();

Works perfectly now.

Bryan Pendleton

What is Connection.createNewConnection? I've never heard of such a method on java.sql.Connection, and I can't find it in any of the docs.

I always use DriverManager.getConnection to establish my Derby database connections.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!