You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Mats Andersson <ma...@ronsoft.se> on 2010/08/23 18:18:10 UTC
Using latest Hibernate with Tap 5.1.0.5
I have encountered a problem with Hibernate 3.3.1.GA and I tried to
override the version with 3.5.5-Final in my project pom-file, but it
seems that I have to build tapestry from source using the same Hibernate
version (see stack trace). If this is the case, I wonder if there are
many Tapestry users who need to maintain their own branch of Tapestry.
How do you deal with issues like this?
...
Caused by: java.lang.IncompatibleClassChangeError:
org/hibernate/cfg/ExtendedMappings
at
org.hibernate.cfg.AnnotationConfiguration.createExtendedMappings(AnnotationConfiguration.java:187)
at
org.hibernate.cfg.AnnotationConfiguration.addPackage(AnnotationConfiguration.java:177)
at
org.apache.tapestry5.internal.hibernate.PackageNameHibernateConfigurer.configure(PackageNameHibernateConfigurer.java:49)
at
org.apache.tapestry5.internal.hibernate.HibernateSessionSourceImpl.<init>(HibernateSessionSourceImpl.java:41)
at
org.apache.tapestry5.hibernate.HibernateCoreModule.buildHibernateSessionSource(HibernateCoreModule.java:123)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.tapestry5.ioc.internal.ServiceBuilderMethodInvoker.createObject(ServiceBuilderMethodInvoker.java:64)
...
Thanks,
Mats
Re: Using latest Hibernate with Tap 5.1.0.5
Posted by Igor Drobiazko <ig...@gmail.com>.
On Wed, Aug 25, 2010 at 5:52 AM, Mats Andersson
<ma...@ronsoft.se>wrote:
>
> Is there any reason why Tapestry 5.1 is not configured to use the latest
> Hibernate version? I see that 5.2 is updated.
>
>
Tapestry 5.1 was released before Hibernate 3.5.5. Once a release is out, you
can't update it. You have to release the next one. Tapestry 5.2.0 is the
next major release, still alpha though.
--
Best regards,
Igor Drobiazko
http://tapestry5.de
Re: Using latest Hibernate with Tap 5.1.0.5
Posted by Mats Andersson <ma...@ronsoft.se>.
The problem was that I did not upgrade Hibernate Annotations to the
same version. When adding this to my pom.xml it works.
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
<version>${hibernate-core-version}</version>
</dependency>
The only thing in common with Tapestry is that I am overriding the
default version inherited from Tapestry-Hibernate, but since I have
spent some time on this, assuming Tapestry was more involved, I add the
complete additions to pom.xml in hope that it will save some time for
other Tapestry users.
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernate-core-version}</version>
<exclusions>
<exclusion>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
</exclusion>
<!-- Make sure we use the version defined by tapestry-ioc. -->
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
<version>${hibernate-core-version}</version>
</dependency>
......
<properties>
<hibernate-core-version>3.5.5-Final</hibernate-core-version>
</properties>
Is there any reason why Tapestry 5.1 is not configured to use the latest
Hibernate version? I see that 5.2 is updated.
Thanks again Thiago!
Mats
____________________________________________
Mats Andersson
Ronsoft AB - Fridhemsvägen 8 - 372 25 Ronneby
Tel. 073-368 79 82
http://www.ronsoft.se
____________________________________________
Mats Andersson skrev 2010-08-24 18:14:
> Thanks Thiago!
>
> I have a few references to Hibernate in the project so you are
> probably right about this. I will do some more tests.
>
> Mats
>
> ____________________________________________
> Mats Andersson
> Ronsoft AB - Fridhemsvägen 8 - 372 25 Ronneby
> Tel. 073-368 79 82
> http://www.ronsoft.se
> ____________________________________________
>
>
> Thiago H. de Paula Figueiredo skrev 2010-08-23 18:23:
>> On Mon, 23 Aug 2010 13:18:10 -0300, Mats Andersson
>> <ma...@ronsoft.se> wrote:
>>
>>> I have encountered a problem with Hibernate 3.3.1.GA and I tried
>>> to override the version with 3.5.5-Final in my project pom-file,
>>
>> How did you do that? Have you checked if you don't have two Hibernate
>> versions in your app's classpath? It doesn't look as a Tapestry
>> problem to me from reading the stack trace.
>>
>
Re: Using latest Hibernate with Tap 5.1.0.5
Posted by Mats Andersson <ma...@ronsoft.se>.
Thanks Thiago!
I have a few references to Hibernate in the project so you are probably
right about this. I will do some more tests.
Mats
____________________________________________
Mats Andersson
Ronsoft AB - Fridhemsvägen 8 - 372 25 Ronneby
Tel. 073-368 79 82
http://www.ronsoft.se
____________________________________________
Thiago H. de Paula Figueiredo skrev 2010-08-23 18:23:
> On Mon, 23 Aug 2010 13:18:10 -0300, Mats Andersson
> <ma...@ronsoft.se> wrote:
>
>> I have encountered a problem with Hibernate 3.3.1.GA and I tried to
>> override the version with 3.5.5-Final in my project pom-file,
>
> How did you do that? Have you checked if you don't have two Hibernate
> versions in your app's classpath? It doesn't look as a Tapestry
> problem to me from reading the stack trace.
>
Re: Using latest Hibernate with Tap 5.1.0.5
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Mon, 23 Aug 2010 13:18:10 -0300, Mats Andersson
<ma...@ronsoft.se> wrote:
> I have encountered a problem with Hibernate 3.3.1.GA and I tried to
> override the version with 3.5.5-Final in my project pom-file,
How did you do that? Have you checked if you don't have two Hibernate
versions in your app's classpath? It doesn't look as a Tapestry problem to
me from reading the stack trace.
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org