Bug 807595 - Unsuccessful: create table Notification_email_header when using DB2
Unsuccessful: create table Notification_email_header when using DB2
Status: VERIFIED
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: jBPM 5 (Show other bugs)
BRMS 5.3.0.GA
Unspecified Unspecified
unspecified Severity high
: ER6
: BRMS 5.3.0.GA
Assigned To: Marco Rietveld
Lukáš Petrovický
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-28 05:50 EDT by Zuzana Krejčová
Modified: 2016-07-31 21:14 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Zuzana Krejčová 2012-03-28 05:50:02 EDT
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 08:51:38 EDT
This happens with other databases too.
Comment 4 Zuzana Krejčová 2012-04-04 08:08:44 EDT
(In reply to comment #3)
> This happens with other databases too.

Definitely mssql2008R2.
Comment 5 Marco Rietveld 2012-04-05 17:50:16 EDT
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 03:39:33 EDT
Update status to ON_QA. Please verify them against ER6.

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