WARN-无法获取导入的游标游标先前已释放并且不可用 [英] WARN - Failed to getImportedKeys The cursor has been previously released and is unavailable
问题描述
我在相当笨重的Informix 12.10模式上运行SchemaSpy v6.1.0-SNAPSHOT,但收到错误消息警告-未能getImportedKeys游标先前已释放并且不可用."
I'm running SchemaSpy v6.1.0-SNAPSHOT on a fairly hefty Informix 12.10 schema, and I get the error "WARN - Failed to getImportedKeys The cursor has been previously released and is unavailable."
我对Java一无所知,但是我注意到Liquibase(也是用Java编写)的一个非常类似的错误,我想知道:
I know nothing about Java, but I've noticed a very similar error with Liquibase (also written in Java) and I wondered:
- 如果我不想特别学习Java,那么是否有人可以建议我导致此错误的原因以及如何避免/解决该错误,
- 这是特定于Informix还是在其他数据库中也可以看到?
推荐答案
The liquidbase stack trace you had in How do I use --logLevel in Liquibase actually gives us a hint, but took me a while to work out what is likely happening. There we can see liquibase using a cached resultset. Caching ResultSets (cursors) are dangerous as the Informix JDBC driver does not hold cursors over commits. So there is a good chance that the software opened a resultset (cursor) did some other operation which caused Informix/JDBC to close the cursor, then it tried to use the already closed cursor which causes your error.
有一个API可以强制JDBC使游标保持打开状态:
connection.setHoldability(ResultSet.HOLD_CURSORS_OVER_COMMIT)
There is an API to force JDBC to keep the cursors open:
connection.setHoldability(ResultSet.HOLD_CURSORS_OVER_COMMIT)
但是我猜测您没有能力在这些产品中影响此功能以进行尝试.遗憾的是,Informix不允许在URL中进行此设置.应该添加的功能:)
But I'm guessing you don't have an ability to affect this inside these products to try it. Informix sadly does not allow this setting to happen in the URL. A feature that should be added :)
我针对schemaspy对我的一个数据库(22个表,126列)进行了测试,而最新的Informix JDBC驱动程序4.10.JC12W1则没有问题.确切的问题可能是需要复制,以供支持团队确定.
I tested against schemaspy against one of my databases (22 tables, 126 columns) with no issues with the latest Informix JDBC driver 4.10.JC12W1. The exact problem might be something that needs a reproduction for a support team to figure out for sure.
这篇关于WARN-无法获取导入的游标游标先前已释放并且不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!