Bug 807595

Summary: Unsuccessful: create table Notification_email_header when using DB2
Product: [JBoss] JBoss Enterprise BRMS Platform 5 Reporter: Zuzana Krejčová <zkrejcov>
Component: jBPM 5Assignee: Kris Verlaenen <kverlaen>
Status: CLOSED UPSTREAM QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: BRMS 5.3.0.GA   
Target Milestone: ER6   
Target Release: BRMS 5.3.0.GA   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-02-10 03:19:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Zuzana Krejčová 2012-03-28 09:50:02 UTC
Description of problem:

I ran into:

ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] (main) Unsuccessful: create table Notification_email_header (Notification_id bigint not null, emailHeaders_id bigint not null, mapkey varchar(255), primary key (Notification_id, mapkey), unique (emailHeaders_id))
ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] (main) DB2 SQL Error: SQLCODE=-542, SQLSTATE=42831, SQLERRMC=MAPKEY, DRIVER=4.12.55

when running jbpm console tests with the db2 database. This shows up while the server is starting, services are deployed... The error code meaning can be found here:
http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=%2Fcom.ibm.db2z10.doc.codes%2Fsrc%2Ftpc%2Fn542.htm

Basically, it says that 'mapkey' as a part of the primary key cannot be allowed a null value. We have to rely on the schema provided by hbm2ddl, but it gives us this.


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

Comment 3 Zuzana Krejčová 2012-04-03 12:51:38 UTC
This happens with other databases too.

Comment 4 Zuzana Krejčová 2012-04-04 12:08:44 UTC
(In reply to comment #3)
> This happens with other databases too.

Definitely mssql2008R2.

Comment 5 Marco Rietveld 2012-04-05 21:50:16 UTC
This has been fixed in both 5.2.x and master. 

There were also problems with the byte [] @Lob types: I've added @Column(length=2147483647) to those types to ensure that DB2 (as well as other databases, including MySQL) creates the right type of column when generating the schema.

Comment 6 Ryan Zhang 2012-04-23 07:39:33 UTC
Update status to ON_QA. Please verify them against ER6.

Comment 14 Red Hat Bugzilla 2025-02-10 03:19:24 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.