Bug 900153 (JBPAPP6-813) - Consistent test failures on DB2 due to processingError
Summary: Consistent test failures on DB2 due to processingError
Keywords:
Status: CLOSED NEXTRELEASE
Alias: JBPAPP6-813
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Hibernate
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: EAP 6.0.0
Assignee: Strong Liu
QA Contact:
URL: http://jira.jboss.org/jira/browse/JBP...
Whiteboard: eap6_need_triage
Depends On:
Blocks: 900296
TreeView+ depends on / blocked
 
Reported: 2012-04-04 11:37 UTC by Madhumita Sadhukhan
Modified: 2014-06-28 12:32 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-06 10:12:56 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 900356 0 high CLOSED Bulk Envers Test failures on DB2 for processing error (ERRORCODE=-4225, SQLSTATE=24514) 2021-02-22 00:41:40 UTC
Red Hat Issue Tracker JBPAPP-9059 0 Major Reopened Consistent test failures on DB2 due to processingError 2014-06-30 18:08:46 UTC
Red Hat Issue Tracker JBPAPP6-813 0 Major Closed Consistent test failures on DB2 due to processingError 2014-06-30 18:08:46 UTC

Internal Links: 900356

Description Madhumita Sadhukhan 2012-04-04 11:37:53 UTC
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

Comment 1 Strong Liu 2012-04-16 07:11:56 UTC
I don't see this error when running test standalone

Comment 2 Gail Badner 2012-04-24 19:28:17 UTC
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 

Comment 3 Rajesh Rajasekaran 2012-04-25 22:31:20 UTC
Link: Added: This issue is a dependency of JBPAPP-8827


Comment 4 Madhumita Sadhukhan 2012-05-03 11:49:16 UTC
Link: Added: This issue relates to JBPAPP-8904


Comment 5 Strong Liu 2012-05-09 02:36:16 UTC
Affects: Added: Release Notes


Comment 6 Gail Badner 2012-05-11 22:57:04 UTC
This is fixed by https://hibernate.onjira.com/browse/HHH-7317.

Comment 7 Strong Liu 2012-05-13 15:56:53 UTC
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

Comment 8 Strong Liu 2012-05-13 15:56:53 UTC
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


Comment 9 Strong Liu 2012-05-13 15:58:34 UTC
and this is also a fix of JBPAPP-8904

Comment 10 Strong Liu 2012-05-17 08:17:40 UTC
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.


Comment 11 Strong Liu 2012-05-17 08:22:39 UTC
Link: Added: This issue duplicates JBPAPP-8904


Comment 12 RH Bugzilla Integration 2012-05-18 03:39:48 UTC
Bugzilla Update: Added: Perform


Comment 13 RH Bugzilla Integration 2012-05-18 03:39:48 UTC
Bugzilla References: Added: https://bugzilla.redhat.com/show_bug.cgi?id=810481


Comment 14 RH Bugzilla Integration 2012-05-18 03:42:20 UTC
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

Comment 15 Julian Coleman 2012-05-18 13:53:49 UTC
Link: Added: This issue Cloned to JBPAPP-9059


Comment 16 Julian Coleman 2012-05-18 14:00:44 UTC
Link: Added: This issue relates to JBPAPP-9059


Comment 17 RH Bugzilla Integration 2012-05-18 14:02:47 UTC
Julian Coleman <jcoleman> changed the Status of [bug 810481|https://bugzilla.redhat.com/show_bug.cgi?id=810481] from ON_DEV to NEW

Comment 18 RH Bugzilla Integration 2012-05-18 14:24:46 UTC
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

Comment 19 Strong Liu 2012-05-27 14:10:21 UTC
Bugzilla References: Removed: https://bugzilla.redhat.com/show_bug.cgi?id=810481 Added: https://bugzilla.redhat.com/show_bug.cgi?id=810481


Comment 20 RH Bugzilla Integration 2012-06-05 15:09:26 UTC
Anne-Louise Tangring <atangrin> made a private comment on [bug 810481|https://bugzilla.redhat.com/show_bug.cgi?id=810481]

Comment 21 RH Bugzilla Integration 2012-06-05 15:14:46 UTC
Anne-Louise Tangring <atangrin> made a private comment on [bug 810481|https://bugzilla.redhat.com/show_bug.cgi?id=810481]

Comment 22 Madhumita Sadhukhan 2012-06-06 10:12:49 UTC
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/

Comment 23 Madhumita Sadhukhan 2012-07-10 15:01:24 UTC
Link: Added: This issue is related to JBPAPP-9485


Comment 24 Anne-Louise Tangring 2012-11-05 17:55:47 UTC
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 


Comment 25 JBoss JIRA Server 2014-01-13 22:38:37 UTC
Scott Mumford <smumford> updated the status of jira JBPAPP-9059 to Reopened

Comment 26 JBoss JIRA Server 2014-01-13 22:40:13 UTC
Scott Mumford <smumford> updated the status of jira JBPAPP-9059 to Closed

Comment 27 JBoss JIRA Server 2014-01-16 05:05:00 UTC
Scott Mumford <smumford> updated the status of jira JBPAPP-9059 to Reopened


Note You need to log in before you can comment on or make changes to this bug.