Affects: Release Notes Workaround: Workaround Exists Workaround Description: 1. create a new Dialect that extends DB2Dialect, add the following code to it {code} @Override protected SqlTypeDescriptor getSqlTypeDescriptorOverride(int sqlCode) { return sqlCode == Types.BOOLEAN ? SmallIntTypeDescriptor.INSTANCE : super.getSqlTypeDescriptorOverride( sqlCode ); } {code} 2. Setting deferPrepares=false would probably fix this, but that could have an undesirable impact on performance. project_key: JBPAPP6 9 tests are failing consistently on DB2 with same exception when run against ER4.1. Tests failing: http://hudson.qa.jboss.com/hudson/view/EAP6/view/EAP6-Hibernate/job/eap6-hibernate-core-master-testsuite-testDB2Sybase/database=db2-97,jdk=java16_default,label=hibernate/lastCompletedBuild/testReport/ Brief analysis: It seems to fail while loading select query One example: select man0_.elder as elder3560_0_, man0_.firstName as firstName3560_0_, man0_.lastName as lastName3560_0_, man0_.carName as carName3560_0_ from Man man0_ where man0_.elder=? and man0_.firstName=? and man0_.lastName=? It is possible that some data returned above is not type compatible or could be XML etc I also see this in stacktrace: 05:40:55,065 ERROR SqlExceptionHelper:144 - DB2 SQL Error: SQLCODE=-401, SQLSTATE=42818, SQLERRMC==, DRIVER=4.12.55 and following seems to be only a buggy manifestation of this error. Stacktrace; org.hibernate.exception.GenericJDBCException: [jcc][10429][12554][4.12.55] A processing error occurred on the server which resulted in an unrecoverable error. Please set deferPrepares property to false and re-establish the connection. If the problem still persists, please contact support. ERRORCODE=-4225, SQLSTATE=24514 .......................................................................................................................................... Caused by: com.ibm.db2.jcc.am.SqlException: [jcc][10429][12554][4.12.55] A processing error occurred on the server which resulted in an unrecoverable error. Please set deferPrepares property to false and re-establish the connection. If the problem still persists, please contact support. ERRORCODE=-4225, SQLSTATE=24514 at com.ibm.db2.jcc.am.hd.a(hd.java:679) at com.ibm.db2.jcc.am.hd.a(hd.java:60) Possible Solution/Links: This seems like a bug in DB2 https://jazz.net/forums/viewtopic.php?t=18485&sid=d1126734f9c6b0bffe2d2e64fa30adb9 https://www-304.ibm.com/support/docview.wss?uid=swg1IC67562
I don't see this error when running test standalone
Failing tests: org.hibernate.test.annotations.manytomany.ManyToManyMaxFetchDepth0Test.testCompositePk org.hibernate.test.annotations.manytomany.ManyToManyTest.testCompositePk org.hibernate.test.annotations.manytoone.ManyToOneTest.testCompositeFK org.hibernate.test.annotations.onetomany.OneToManyTest.testJoinColumns org.hibernate.test.bidi.AuctionTest.testLazy org.hibernate.test.criteria.ComplexJoinAliasTest.testCriteriaThroughCompositeId org.hibernate.test.cuk.CompositePropertyRefTest.testOneToOnePropertyRef org.hibernate.test.formulajoin.FormulaJoinTest.testFormulaJoin org.hibernate.test.legacy.FooBarTest.testQuery
Link: Added: This issue is a dependency of JBPAPP-8827
Link: Added: This issue relates to JBPAPP-8904
Affects: Added: Release Notes
This is fixed by https://hibernate.onjira.com/browse/HHH-7317.
I'm adding a "eap6_need_triage" label this issue is caused that hibernate binds boolean value when the underlying column type is actually smallint. the workaround exists, but it would better that we fix it in EAP6 GA
Labels: Added: eap6_need_triage Workaround Description: Added: 1. create a new Dialect that extends DB2Dialect, add the following code to it {code} @Override protected SqlTypeDescriptor getSqlTypeDescriptorOverride(int sqlCode) { return sqlCode == Types.BOOLEAN ? SmallIntTypeDescriptor.INSTANCE : super.getSqlTypeDescriptorOverride( sqlCode ); } {code} 2. Setting deferPrepares=false would probably fix this, but that could have an undesirable impact on performance. Workaround: Added: Workaround Exists
and this is also a fix of JBPAPP-8904
Release Notes Text: Added: for query like below: {code} select man0_.elder as elder783_0_, man0_.firstName as firstName783_0_, man0_.lastName as lastName783_0_, man0_.carName as carName783_0_ from Man man0_ where man0_.elder=? and man0_.firstName=? and man0_.lastName=? {code} In this query,due to this bug, "elder" is bound as a Boolean value when the column is actually a smallint. This issue now is fixed by overriding Dialect.getSqlTypeDescriptorOverride(int sqlCode) for DB2Dialect to return SmallIntTypeDescriptor.INSTANCE for sqlCode == Types.BOOLEAN. This works with deferPrepares=true.
Link: Added: This issue duplicates JBPAPP-8904
Bugzilla Update: Added: Perform
Bugzilla References: Added: https://bugzilla.redhat.com/show_bug.cgi?id=810481
tcunning made a comment on [bug 810481|https://bugzilla.redhat.com/show_bug.cgi?id=810481] Looks like there's a Hibernate fix for this : https://issues.jboss.org/browse/JBPAPP-8627 https://hibernate.onjira.com/browse/HHH-7317
Link: Added: This issue Cloned to JBPAPP-9059
Link: Added: This issue relates to JBPAPP-9059
Julian Coleman <jcoleman> changed the Status of [bug 810481|https://bugzilla.redhat.com/show_bug.cgi?id=810481] from ON_DEV to NEW
Strong Liu <stliu> made a comment on [bug 810481|https://bugzilla.redhat.com/show_bug.cgi?id=810481] as said in jira JBPAPP-8627, this can be easily workaround
Bugzilla References: Removed: https://bugzilla.redhat.com/show_bug.cgi?id=810481 Added: https://bugzilla.redhat.com/show_bug.cgi?id=810481
Anne-Louise Tangring <atangrin> made a private comment on [bug 810481|https://bugzilla.redhat.com/show_bug.cgi?id=810481]
All other tests pass when testsuite is run on DB2-97 after skipping hanging LockTest or LockModeTest https://hudson.qa.jboss.com/hudson/view/EAP6/view/EAP6-Hibernate/job/eap6-hibernate-core-master-testsuite-testDB2Sybase/ Also fixes Envers testsuite failures on DB2 https://hudson.qa.jboss.com/hudson/view/EAP6/view/EAP6-Hibernate/job/eap-60-hibernate-envers-testsuite/database=db2-97,jdk=java16_default,label=hibernate/2/
Link: Added: This issue is related to JBPAPP-9485
Release Notes Text: Removed: for query like below: {code} select man0_.elder as elder783_0_, man0_.firstName as firstName783_0_, man0_.lastName as lastName783_0_, man0_.carName as carName783_0_ from Man man0_ where man0_.elder=? and man0_.firstName=? and man0_.lastName=? {code} In this query,due to this bug, "elder" is bound as a Boolean value when the column is actually a smallint. This issue now is fixed by overriding Dialect.getSqlTypeDescriptorOverride(int sqlCode) for DB2Dialect to return SmallIntTypeDescriptor.INSTANCE for sqlCode == Types.BOOLEAN. This works with deferPrepares=true. Docs QE Status: Removed: NEW
Scott Mumford <smumford> updated the status of jira JBPAPP-9059 to Reopened
Scott Mumford <smumford> updated the status of jira JBPAPP-9059 to Closed