Bug 809772 - SessionInfo, Lob and DB2 --> SQLCODE=-302
Summary: SessionInfo, Lob and DB2 --> SQLCODE=-302
Keywords:
Status: VERIFIED
Alias: None
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRE (Expert, Fusion), jBPM Console
Version: BRMS 5.3.0.GA
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ER7
: BRMS 5.3.0.GA
Assignee: Nobody
QA Contact: Lukáš Petrovický
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-04 11:07 UTC by Zuzana Krejčová
Modified: 2022-01-05 05:22 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)
stack trace in the server log (47.29 KB, text/x-log)
2012-04-04 11:07 UTC, Zuzana Krejčová
no flags Details

Description Zuzana Krejčová 2012-04-04 11:07:14 UTC
Created attachment 575083 [details]
stack trace in the server log

Description of problem:
Running jbpm console test with DB2 9.7 resulted in: 
DB2 SQL Error: SQLCODE=-302, SQLSTATE=22001, SQLERRMC=null, DRIVER=4.12.55
Could not synchronize database state with session
org.hibernate.exception.DataException: could not update: [org.drools.persistence.info.SessionInfo#1]

The sql code specifies that "DB2 received data that was invalid or too large to fit in the corresponding column of the table."
http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=%2Fcom.ibm.db2z10.doc.codes%2Fsrc%2Ftpc%2Fn302.htm


Version-Release number of selected component (if applicable):
BRMS 5.3.0 ER5


Additional info:
It is quite probable this is due to the attribute: 
@Lob 
private byte[] rulesByteArray
of the class SessionInfo in org.drools.persistence.info, which does not specify the size of the column. It seems as if the DB2 database defaults to 1M, which might not be enough - see link below.
https://hibernate.onjira.com/browse/HHH-2969

Comment 3 Lukáš Petrovický 2012-04-06 07:50:28 UTC
Should be fixed as a side effect of bug 807595 comment 5.

Comment 4 Ryan Zhang 2012-04-23 07:38:34 UTC
Update status to ON_QA. Please verify them against ER6.

Comment 6 Zuzana Krejčová 2012-05-03 16:12:10 UTC
I see no change.
Lukas, you put it on MODIFIED about a month back, do you remember why?

Comment 7 Lukáš Petrovický 2012-05-04 09:22:09 UTC
(In reply to comment #6)
> I see no change.
> Lukas, you put it on MODIFIED about a month back, do you remember why?

See comment 3.

Comment 8 Marco Rietveld 2012-05-04 19:43:34 UTC
Zuzana, 

It looks like this failed the QA tests? If you could post any stack traces, other info or any ideas why it failed, that would be great. 

Thanks.

Comment 9 Zuzana Krejčová 2012-05-07 09:16:11 UTC
(In reply to comment #8)
> Zuzana, 
> 
> It looks like this failed the QA tests? If you could post any stack traces,
> other info or any ideas why it failed, that would be great. 
> 
> Thanks.

Here:
https://hudson.qa.jboss.com/hudson/job/brms-jbpm_cons-db/25/DATABASE=db2-97,jdk=java16_default,label_exp=brFF&&%28RHEL5||RHEL6%29&&!dev82-rhel6-x86_64/artifact/artifacts/log/server.log

is the whole server log of a recent run with ER6. Hope it helps.

And sorry, I somehow didn't see the 3rd comment.

Comment 10 Marco Rietveld 2012-05-08 12:57:39 UTC
I hadn't modified the drools classes that had lob columns. 

I've just pushed a commit to the community drools 5.2.x branch that fixes this: 

https://github.com/droolsjbpm/drools/commit/bfc2007f61afcd8e676759045262821baa635658

Comment 11 Marco Rietveld 2012-05-08 20:43:48 UTC
Fixed string blobs as well, and pushed to community jbpm 5.2.x branch: 

https://github.com/droolsjbpm/jbpm/commit/813c38f9d1d0eaafe45ce29b9b7b191d96bef20b

Comment 12 Ryan Zhang 2012-05-14 08:15:48 UTC
The fixed for this issue should be included in ER7. Please do verification on it.


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