Red Hat Bugzilla – Bug 807595
Unsuccessful: create table Notification_email_header when using DB2
Last modified: 2016-09-20 01:08:29 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:
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
This happens with other databases too.
(In reply to comment #3)
> This happens with other databases too.
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.
Update status to ON_QA. Please verify them against ER6.