atom feed6 messages in org.apache.tapestry.devUpgrading tapestry-hibernate to Hiber...
FromSent OnAttachments
Jochen FreyMar 21, 2012 10:30 pm 
Kalle KorhonenMar 21, 2012 11:23 pm 
Jochen FreyMar 22, 2012 11:23 am 
Kalle KorhonenMar 22, 2012 6:53 pm 
Jochen FreyMar 22, 2012 10:37 pm 
Kalle KorhonenMar 22, 2012 11:25 pm 
Subject:Upgrading tapestry-hibernate to Hibernate 4.1.1
From:Jochen Frey (
Date:Mar 21, 2012 10:30:56 pm

Hello Developers,

For a a variety of reasons I want to upgrade to Hibernate 4.1, the most
important one being that a major bug that the Criteria API had in 3.6.0 got

I managed to do this by modifying tapestry-hibernate-core/build.gradle by
changing the hibernate version, and adding the the jboss logger to the
dependency list, which was required since the dependency on hibernate-core is

With those changes in place I was able to run the Tapestry unit tests, and our
system tests out fine, and after building a binary distro from the source I seem
to be doing fine.

I have tried to make this happen by way of changing our pom.xml to exclude
Hibernate 3.6.0 from the tapestry-hibernate dependency and including Hibernate
4.1.1 as a separate dependency, but that hasn't worked for me (in the time

Now I have 2 questions on my mind:

1) Is there something obviously wrong with this approach (I haven't been
hacking at TS proper that much), and 2) Is there an easier way (e.g. removing the "transitive: false" and hoping for
the best)?

Glad to provide the trivial patch (as well below) in JIRA if it's of interest.

diff --git a/tapestry-hibernate-core/build.gradle
b/tapestry-hibernate-core/build.gradle index 7545b30..240254c 100644 --- a/tapestry-hibernate-core/build.gradle +++ b/tapestry-hibernate-core/build.gradle @@ -1,6 +1,6 @@ description = "Basic Hibernate services for Tapestry, useable outside of a
Tapestry web application"

-hibernateVersion = '3.6.0.Final' +hibernateVersion = '4.1.1.Final'

dependencies { compile project(':tapestry-ioc') @@ -8,7 +8,8 @@ dependencies { compile group: 'org.hibernate', name: 'hibernate-core', version:
hibernateVersion, transitive: false compile "org.hibernate:hibernate-commons-annotations:3.2.0.Final" compile "org.hibernate.javax.persistence:hibernate-jpa-2.0-api:1.0.0.Final" - + compile "org.jboss.logging:jboss-logging:3.1.0.CR2" + runtime "geronimo-spec:geronimo-spec-jta:1.0-M1" runtime "antlr:antlr:2.7.6" runtime "dom4j:dom4j:1.6.1" @@ -28,4 +29,4 @@ jar { manifest { attributes 'Tapestry-Module-Classes':
'org.apache.tapestry5.hibernate.HibernateCoreModule' } -} \ No newline at end of file +}