From 442bf225c40a6c6bd664dbd227254d4d0c3f5e6c Mon Sep 17 00:00:00 2001 From: Vlad Mihalcea Date: Wed, 12 Apr 2017 10:31:56 +0300 Subject: [PATCH] HHH-11601 - Fix tests failing on Oracle --- build.gradle | 4 +++- documentation/documentation.gradle | 4 +++- hibernate-c3p0/hibernate-c3p0.gradle | 4 +++- .../hibernate/jpa/test/criteria/fetchscroll/PurchaseOrg.java | 2 +- .../org/hibernate/test/type/LongListTypeContributorTest.java | 2 +- .../jta/DeleteCollectionJtaSessionClosedBeforeCommitTest.java | 3 +++ 6 files changed, 14 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index 029ae1baef..d448843437 100644 --- a/build.gradle +++ b/build.gradle @@ -171,7 +171,9 @@ subprojects { subProject -> if (db.equalsIgnoreCase("oracle")) { dependencies { - testRuntime( libraries.oracle ) + testRuntime( libraries.oracle ) { + exclude group: 'com.oracle.jdbc', module: 'xmlparserv2' + } } } // 6.6 gave me some NPE problems from within checkstyle... diff --git a/documentation/documentation.gradle b/documentation/documentation.gradle index b85ad857a4..5901b2787d 100644 --- a/documentation/documentation.gradle +++ b/documentation/documentation.gradle @@ -73,7 +73,9 @@ dependencies { if (db.equalsIgnoreCase("oracle")) { dependencies { - testRuntime( libraries.oracle ) + testRuntime( libraries.oracle ) { + exclude group: 'com.oracle.jdbc', module: 'xmlparserv2' + } } } diff --git a/hibernate-c3p0/hibernate-c3p0.gradle b/hibernate-c3p0/hibernate-c3p0.gradle index 2f2a7a9ba7..0fcc0500ad 100644 --- a/hibernate-c3p0/hibernate-c3p0.gradle +++ b/hibernate-c3p0/hibernate-c3p0.gradle @@ -20,7 +20,9 @@ dependencies { if (db.equalsIgnoreCase("oracle")) { dependencies { - testRuntime( libraries.oracle ) + testRuntime( libraries.oracle ) { + exclude group: 'com.oracle.jdbc', module: 'xmlparserv2' + } } } diff --git a/hibernate-core/src/test/java/org/hibernate/jpa/test/criteria/fetchscroll/PurchaseOrg.java b/hibernate-core/src/test/java/org/hibernate/jpa/test/criteria/fetchscroll/PurchaseOrg.java index 996bf69d72..50eb000460 100755 --- a/hibernate-core/src/test/java/org/hibernate/jpa/test/criteria/fetchscroll/PurchaseOrg.java +++ b/hibernate-core/src/test/java/org/hibernate/jpa/test/criteria/fetchscroll/PurchaseOrg.java @@ -47,7 +47,7 @@ public class PurchaseOrg implements Serializable { } @ManyToMany(fetch = FetchType.LAZY) - @JoinTable(name = "purchase_organization_facilities", + @JoinTable(name = "PURCHASE_FACILITY", joinColumns = @JoinColumn(name = "PURCHASE_ORG_ID"), inverseJoinColumns = @JoinColumn(name = "FACILITY_ID")) public List getFacilities() { diff --git a/hibernate-core/src/test/java/org/hibernate/test/type/LongListTypeContributorTest.java b/hibernate-core/src/test/java/org/hibernate/test/type/LongListTypeContributorTest.java index e102d6c149..eff762b8b4 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/type/LongListTypeContributorTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/type/LongListTypeContributorTest.java @@ -86,7 +86,7 @@ public class LongListTypeContributorTest extends BaseEntityManagerFunctionalTest @Column(length = 30) private String name; - @Column(columnDefinition = "text") + @Column(columnDefinition = "VARCHAR(255)") private LongList longList; public SpecialItem() { diff --git a/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/jta/DeleteCollectionJtaSessionClosedBeforeCommitTest.java b/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/jta/DeleteCollectionJtaSessionClosedBeforeCommitTest.java index c6924caf50..66c0062b38 100644 --- a/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/jta/DeleteCollectionJtaSessionClosedBeforeCommitTest.java +++ b/hibernate-envers/src/test/java/org/hibernate/envers/test/integration/jta/DeleteCollectionJtaSessionClosedBeforeCommitTest.java @@ -14,6 +14,8 @@ import javax.persistence.CascadeType; import javax.persistence.Entity; import javax.persistence.EntityManager; import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.JoinTable; import javax.persistence.OneToMany; import javax.persistence.Table; @@ -108,6 +110,7 @@ public class DeleteCollectionJtaSessionClosedBeforeCommitTest extends BaseEnvers private String name; @OneToMany + @JoinTable(name = "LINK_TABLE", joinColumns = @JoinColumn(name = "ENTITY_ID")) private List others = new ArrayList<>(); public TestEntity() {