<i id='8GmgV'><tr id='8GmgV'><dt id='8GmgV'><q id='8GmgV'><span id='8GmgV'><b id='8GmgV'><form id='8GmgV'><ins id='8GmgV'></ins><ul id='8GmgV'></ul><sub id='8GmgV'></sub></form><legend id='8GmgV'></legend><bdo id='8GmgV'><pre id='8GmgV'><center id='8GmgV'></center></pre></bdo></b><th id='8GmgV'></th></span></q></dt></tr></i><div id='8GmgV'><tfoot id='8GmgV'></tfoot><dl id='8GmgV'><fieldset id='8GmgV'></fieldset></dl></div>

    1. <small id='8GmgV'></small><noframes id='8GmgV'>

      1. <tfoot id='8GmgV'></tfoot>
          <bdo id='8GmgV'></bdo><ul id='8GmgV'></ul>
        <legend id='8GmgV'><style id='8GmgV'><dir id='8GmgV'><q id='8GmgV'></q></dir></style></legend>
      2. db2jcc4.jar 无效参数:未知列名

        db2jcc4.jar Invalid parameter: Unknown column name(db2jcc4.jar 无效参数:未知列名)

          <tbody id='tdw9F'></tbody>

            <bdo id='tdw9F'></bdo><ul id='tdw9F'></ul>
          • <i id='tdw9F'><tr id='tdw9F'><dt id='tdw9F'><q id='tdw9F'><span id='tdw9F'><b id='tdw9F'><form id='tdw9F'><ins id='tdw9F'></ins><ul id='tdw9F'></ul><sub id='tdw9F'></sub></form><legend id='tdw9F'></legend><bdo id='tdw9F'><pre id='tdw9F'><center id='tdw9F'></center></pre></bdo></b><th id='tdw9F'></th></span></q></dt></tr></i><div id='tdw9F'><tfoot id='tdw9F'></tfoot><dl id='tdw9F'><fieldset id='tdw9F'></fieldset></dl></div>
              <legend id='tdw9F'><style id='tdw9F'><dir id='tdw9F'><q id='tdw9F'></q></dir></style></legend>

              <small id='tdw9F'></small><noframes id='tdw9F'>

            • <tfoot id='tdw9F'></tfoot>

                  本文介绍了db2jcc4.jar 无效参数:未知列名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我之前问过以下问题:DB2查询未知列名ERRORCODE=-4460, SQLSTATE=null

                  我们已经了解到,从 db2jcc4.jar (JCC) 更改为 db2jcc.jar (UNIVERSAL) 可以解决我们开发环境中的问题.问题是那个不起作用的是较新的.我们不想在没有真正正当理由的情况下倒退我们的司机.但是上面链接中的查询在新驱动中无效的原因我不明白.

                  We have since learned that changing from db2jcc4.jar (JCC) from db2jcc.jar (UNIVERSAL) solves the issue in our development environment. The problem is that the one tha tdoesn't work is the newer one. We don't want to step backwards on our driver without really good cause. But the reason why the query in the above link is invalid in the new driver is not understood by me.

                  我们知道它就是那一列...如果我们通过强制一个空白将其从结果中取出,一切正常(除了我们没有得到数据).该查询在其他环境中运行良好.

                  We know it is that column...if we take it out of the results by forcing an empty space, everything works (except we don't get the data). The query works fine in other environments.

                  我看到一些帖子暗示这个错误与结果集元数据 getColumn() 方法在 JDBC3 和 JDBC4 之间不一致有关.但是我们没有在这个查询中做任何其他查询中没有做的特殊事情,至少据我们所知没有.

                  I have seen some posts implying that this error is related to the result set meta data getColumn() method being inconsistent between JDBC3 and JDBC4. But we're not doing anything special in this query that isn't being done in many other queries, at least not as far as we can tell.

                  有谁知道这个查询可能会引起什么问题?是否有解决此问题的方法...一些设置或解决方法,或者新的驱动程序?

                  Does anyone know what about this query might be setting things off? Is there a fix for this behavior...either some setting or workaround, or a new driver?

                  完整的例外:

                  com.ibm.db2.jcc.a.SqlException:[jcc][10150][10300][4.3.111] 无效参数:未知>列名 FILTER_VALUE_DECODE.错误代码=-4460,SQLSTATE=null在 com.ibm.db2.jcc.a.dd.a(dd.java:660)在 com.ibm.db2.jcc.a.dd.a(dd.java:60)在 com.ibm.db2.jcc.a.dd.a(dd.java:103)在 com.ibm.db2.jcc.a.ib.a(ib.java:1674)在 com.ibm.db2.jcc.a.yl.a(yl.java:1625)在 com.ibm.db2.jcc.a.yl.getString(yl.java:1468)在 com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.getString(WSJdbcResultSet.java:2467)在 org.hibernate.type.StringType.get(StringType.java:41)在 org.hibernate.type.NullableType.nullSafeGet(NullableType.java:184)在 org.hibernate.type.NullableType.nullSafeGet(NullableType.java:210)在 org.hibernate.loader.custom.CustomLoader$ScalarResultColumnProcessor.extract(CustomLoader.java:501)在 org.hibernate.loader.custom.CustomLoader$ResultRowProcessor.buildResultRow(CustomLoader.java:447)在 org.hibernate.loader.custom.CustomLoader.getResultColumnOrRow(CustomLoader.java:344)在 org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:647)在 org.hibernate.loader.Loader.doQuery(Loader.java:745)在 org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:270)在 org.hibernate.loader.Loader.doList(Loader.java:2294)... 64 更多

                  com.ibm.db2.jcc.a.SqlException: [jcc][10150][10300][4.3.111] Invalid parameter: Unknown >column name FILTER_VALUE_DECODE. ERRORCODE=-4460, SQLSTATE=null at com.ibm.db2.jcc.a.dd.a(dd.java:660) at com.ibm.db2.jcc.a.dd.a(dd.java:60) at com.ibm.db2.jcc.a.dd.a(dd.java:103) at com.ibm.db2.jcc.a.ib.a(ib.java:1674) at com.ibm.db2.jcc.a.yl.a(yl.java:1625) at com.ibm.db2.jcc.a.yl.getString(yl.java:1468) at com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.getString(WSJdbcResultSet.java:2467) at org.hibernate.type.StringType.get(StringType.java:41) at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:184) at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:210) at org.hibernate.loader.custom.CustomLoader$ScalarResultColumnProcessor.extract(CustomLoader.java:501) at org.hibernate.loader.custom.CustomLoader$ResultRowProcessor.buildResultRow(CustomLoader.java:447) at org.hibernate.loader.custom.CustomLoader.getResultColumnOrRow(CustomLoader.java:344) at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:647) at org.hibernate.loader.Loader.doQuery(Loader.java:745) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:270) at org.hibernate.loader.Loader.doList(Loader.java:2294) ... 64 more

                  推荐答案

                  您可能正在使用 Hibernate 3.x.Hibernate 3.x 尝试通过列的 columnName(即列的原始名称的 ResultSetMetaData 属性)检索列的值,而 JDBC 要求(按规范)它们由 columnLabel(AS 别名的属性,或者如果未指定原始列名)检索.

                  You are probably using Hibernate 3.x. Hibernate 3.x tries to retrieve values of columns by their columnName (that is the ResultSetMetaData property for the original name of the column), while JDBC requires (by specification) that they are retrieved by columnLabel (the property for the AS alias, or if that isn't specified the original columnname).

                  旧版本的 JDBC 并不完全清楚 columnNamecolumnLabel 之间的区别,因此实现驱动程序要么为两个属性返回相同的值,要么期望 columnNamecolumnLabelcode>columnName 检索值.

                  Older versions of JDBC weren't entirely clear about the distinction between columnName and columnLabel, so implementing Drivers either returned the same value for both properties, or expected the columnName to retrieve values.

                  IBM 更改了此行为以符合 DB2 9.5 驱动程序中的 JDBC 规范,请参阅 本文档.要恢复到旧行为,您需要将连接属性 useJDBC4ColumnNameAndLabelSemantics 指定为 DB2BaseDataSource.NO(其值为 2):

                  IBM changed this behavior to conform to the JDBC specification in the DB2 9.5 driver, see this document. To revert to the old behavior, you need to specify the connection property useJDBC4ColumnNameAndLabelSemantics to DB2BaseDataSource.NO (which has the value 2):

                  分辨率
                  如果您无法更改应用程序以符合新的 ResultSetMetaData 行为,但需要 JDBC 4.0 的其他功能,请将 useJDBC4ColumnNameAndLabelSemantics Connection 或 DataSource 属性设置为 DB2BaseDataSource.NO (2) 保持旧的行为.

                  Resolution
                  If you cannot change your applications to conform to the new ResultSetMetaData behavior but you need other features of JDBC 4.0, set the useJDBC4ColumnNameAndLabelSemantics Connection or DataSource property to DB2BaseDataSource.NO (2) to keep the old behavior.

                  另一个选择是升级到较新版本的 Hibernate (4.x),因为它(至少在默认情况下)使用 columnLabel 来检索值.

                  The other option is to upgrade to a newer version of Hibernate (4.x) as this (at least by default) uses the columnLabel for retrieving values.

                  这篇关于db2jcc4.jar 无效参数:未知列名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How can I detect integer overflow on 32 bits int?(如何检测 32 位 int 上的整数溢出?)
                  Local variables before return statements, does it matter?(return 语句之前的局部变量,这有关系吗?)
                  How to convert Integer to int?(如何将整数转换为整数?)
                  How do I create an int array with randomly shuffled numbers in a given range(如何在给定范围内创建一个随机打乱数字的 int 数组)
                  Inconsistent behavior on java#39;s ==(java的行为不一致==)
                  Why is Java able to store 0xff000000 as an int?(为什么 Java 能够将 0xff000000 存储为 int?)
                  <i id='WtHly'><tr id='WtHly'><dt id='WtHly'><q id='WtHly'><span id='WtHly'><b id='WtHly'><form id='WtHly'><ins id='WtHly'></ins><ul id='WtHly'></ul><sub id='WtHly'></sub></form><legend id='WtHly'></legend><bdo id='WtHly'><pre id='WtHly'><center id='WtHly'></center></pre></bdo></b><th id='WtHly'></th></span></q></dt></tr></i><div id='WtHly'><tfoot id='WtHly'></tfoot><dl id='WtHly'><fieldset id='WtHly'></fieldset></dl></div>
                1. <tfoot id='WtHly'></tfoot>

                      <tbody id='WtHly'></tbody>

                        <legend id='WtHly'><style id='WtHly'><dir id='WtHly'><q id='WtHly'></q></dir></style></legend>

                          <bdo id='WtHly'></bdo><ul id='WtHly'></ul>

                          <small id='WtHly'></small><noframes id='WtHly'>