Bug 1387280

Summary: 2.0.19 fails hibernate validation
Product: [Community] Candlepin Reporter: Justin Sherrill <jsherril>
Component: candlepinAssignee: Alex Wood <awood>
Status: CLOSED WONTFIX QA Contact: Katello QA List <katello-qa-list>
Severity: low Docs Contact:
Priority: medium    
Version: 2.0CC: awood, bcourt, csnyder, mstead, redakkan, skallesh
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 18:33:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Justin Sherrill 2016-10-20 14:11:00 UTC
Description of problem:

When launching candlepin with:

jpa.config.hibernate.hbm2ddl.auto=validate

The webapp fails to start with:

Caused by: org.hibernate.tool.schema.spi.SchemaManagementException: Schema-validation: wrong column type encountered in column [locked] in table [cp2_content]; found [int2 (Types#SMALLINT)], but expecting [int4 (Types#INTEGER)]



Version-Release number of selected component (if applicable):
candlepin-2.0.19-1.el7.noarch

Additional info:

Comment 1 Chris Snyder 2016-10-24 14:02:48 UTC
Does this PR address all such issues in candlepin?

https://github.com/candlepin/candlepin/pull/1365

Comment 2 Alex Wood 2016-10-24 15:29:02 UTC
No idea if it address all such issues, but it addresses the one it the bug.

Comment 3 Michael Stead 2017-08-01 18:33:49 UTC
Candlepin does not enable this when installed. Candlepin does not currently annotate all of its model objects with the appropriate validation annotations and is therefor validation is incomplete when enabled.