Bug 1299734 - [TEST] (6.4.x) Derived identity tests failing with DB2
[TEST] (6.4.x) Derived identity tests failing with DB2
Status: CLOSED CURRENTRELEASE
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Hibernate (Show other bugs)
6.4.6
Unspecified Unspecified
unspecified Severity low
: CR1
: EAP 6.4.8
Assigned To: Gail Badner
Martin Simka
:
Depends On:
Blocks: eap648-payload 1315479
  Show dependency treegraph
 
Reported: 2016-01-19 02:16 EST by Jan Martiska
Modified: 2017-01-17 07:39 EST (History)
7 users (show)

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


Attachments (Terms of Use)

  None (edit)
Description Jan Martiska 2016-01-19 02:16:06 EST
This affects most tests in the package org/hibernate/test/annotations/derivedidentities when running with DB2

The tests need two adjustments:
- all primary key columns in derived entities need to be declared non-null, because db2 requires primary key components to explicitly be non-null
- if Employee.firstName and PolicyId.type are left to their default size (255) then db2 complains that it can't handle such long primary keys:

    07:55:18,511 ERROR SchemaExport:426 - HHH000389: Unsuccessful: create table Policy (type varchar(255) not null, dep_emp_firstName varchar(255) not null, dep_emp_lastName varchar(255) not null, dep_name varchar(255) not null, primary key (dep_emp_firstName, dep_emp_lastName, dep_name, type))
    07:55:18,511 ERROR SchemaExport:427 - DB2 SQL Error: SQLCODE=-613, SQLSTATE=54008, SQLERRMC=DEP_EMP_FIRSTNAME..., DRIVER=4.17.29

---> it works if these columns are trimmed to a smaller max. size, eg. 80
Comment 1 Jan Martiska 2016-01-19 02:24:40 EST
Upstream issue: https://hibernate.atlassian.net/browse/HHH-10457
PR sent to upstream component: https://github.com/hibernate/hibernate-orm/pull/1225/files
Comment 2 Jan Martiska 2016-01-19 02:28:35 EST
Does not seem to affect EAP 7.x because JBEAP-1595 is applied there
Comment 3 Mike McCune 2016-03-28 18:38:41 EDT
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune@redhat.com with any questions
Comment 4 Jan Martiska 2016-04-07 04:16:12 EDT
Requires upgrade to Hibernate 4.2.23.Final (not yet released)
Comment 5 Gail Badner 2016-04-13 00:14:54 EDT
Should this block the component upgrade BZ: 
https://bugzilla.redhat.com/show_bug.cgi?id=1315479 ?
Comment 10 Jiří Bílek 2016-05-06 03:28:52 EDT
Verified with EAP 6.4.8.CP.CR2.
Comment 11 Petr Penicka 2017-01-17 07:39:10 EST
Retroactively bulk-closing issues from released EAP 6.4 cumulative patches.

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