@Override
        public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
            if ("close".equals(method.getName())) {
                connectionHandler.registerCloseStatement();
            }
            try {
                return method.invoke(stmt, args);
            } catch (InvocationTargetException ex) {
                throw ex.getTargetException();
            }
        }
Oracle was getting angry about too many open cursors because of the large number of prepared statements being created and cached indefinitely.
core/src/test/java/org/jdbi/v3/core/TestTooManyCursors.java