-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Exception when starting app using Hibernate 3.6.0.Final
PostPosted: Sat Dec 18, 2010 8:25 pm 
Newbie

Joined: Sat Dec 18, 2010 7:13 pm
Posts: 4
I am currently trying to use Hibernate-core 3.6.0 with Spring 3.0.5.RELEASE in an app running in Tomcat 5.5.30

However, on startup I see the following exception:

NoSuchMethodError: org.hibernate.mapping.SimpleValue.<init>(Lorg/hibernate/mapping/Table;)V

As part of this I have been trying to set up my own Ivy repo so I can provide my ivy.xml and the details of each jar included in the application.

Here is the relevant part of the Spring config file:
Quote:
<!-- Persistence configuration -->
<bean
class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" />
<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="jdbc:mysql://localhost/mailing" />
<property name="username" value="root" />
<property name="password" value="" />
</bean>

<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory" />
</bean>

<tx:annotation-driven transaction-manager="transactionManager" />

<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="database" value="MYSQL" />
<property name="showSql" value="true" />
</bean>
</property>
</bean>


Here is persistence.xml
Quote:
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/ ... ce_1_0.xsd"
version="1.0">
<persistence-unit name="punit">
</persistence-unit>
</persistence>


And here is part of my ivy.xml
Quote:
<dependency org="org.hibernate" name="hibernate-commons-annotations" rev="3.2.0.Final"></dependency>
<dependency org="org.hibernate" name="hibernate-entitymanager" rev="3.6.0.Final"></dependency>
<dependency org="org.hibernate" name="hibernate-annotations" rev="3.5.6-Final"></dependency>
<dependency org="org.hibernate" name="hibernate-core" rev="3.6.0.Final"></dependency>
<dependency org="org.hibernate.javax.persistence" name="hibernate-jpa-2.0-api" rev="1.0.0.Final"></dependency>
<dependency org="javax.transaction" name="jta" rev="1.1"></dependency>
<dependency org="net.sf.ehcache" name="ehcache" rev="1.2.3"></dependency>

<dependency org="jboss" name="javassist" rev="3.3.ga" />
<dependency org="jboss" name="jboss-archive-browsing" rev="5.0.0alpha-200607201-119" />

<!-- Spring -->
<dependency org="org.springframework" name="spring-aop" rev="3.0.5.RELEASE"></dependency>
<dependency org="org.springframework" name="spring-asm" rev="3.0.5.RELEASE"></dependency>
<dependency org="org.springframework" name="spring-beans" rev="3.0.5.RELEASE"></dependency>
<dependency org="org.springframework" name="spring-context" rev="3.0.5.RELEASE"></dependency>
<dependency org="org.springframework" name="spring-core" rev="3.0.5.RELEASE"></dependency>
<dependency org="org.springframework" name="spring-expression" rev="3.0.5.RELEASE"></dependency>
<dependency org="org.springframework" name="spring-jdbc" rev="3.0.5.RELEASE"></dependency>
<dependency org="org.springframework" name="spring-orm" rev="3.0.5.RELEASE"></dependency>
<dependency org="org.springframework" name="spring-parent" rev="3.0.5.RELEASE"></dependency>
<dependency org="org.springframework" name="spring-tx" rev="3.0.5.RELEASE"></dependency>
<dependency org="org.springframework" name="spring-web" rev="3.0.5.RELEASE"></dependency>

<!-- Required libraries -->
<dependency org="aopalliance" name="aopalliance" rev="1.0"></dependency>
<dependency org="dom4j" name="dom4j" rev="1.6.1"></dependency>
<dependency org="antlr" name="antlr" rev="2.7.6"></dependency>
<dependency org="asm" name="asm" rev="1.5.3"></dependency>
<dependency org="asm" name="asm-attrs" rev="1.5.3"></dependency>
<dependency org="cglib" name="cglib" rev="2.1_3"></dependency>
<dependency org="log4j" name="log4j" rev="1.2.15"></dependency>
<dependency org="org.slf4j" name="slf4j-api" rev="1.6.1"></dependency>


I assume I am seeing this issue because of a jar mismatch, unfortunately can't work out where the mismatch is. https://forum.hibernate.org/viewtopic.php?f=1&t=1008225 looked like it might be a similar issue but doesn't seem to be relevant. Extensive searching has not turned up anything else of much interest apart from the advice to move to 3.2.0.Final of commons-annotations.

I am using the latest version of each hibernate jar from here http://repository.jboss.org/nexus/content/groups/public/org/hibernate/

Any advice would be much appreciated.

Thanks in advance.
Alex


Top
 Profile  
 
 Post subject: Re: Exception when starting app using Hibernate 3.6.0.Final
PostPosted: Sun Dec 19, 2010 2:39 pm 
Newbie

Joined: Sat Dec 18, 2010 7:13 pm
Posts: 4
I have solved this issue by removing the hibernate-annotations dependency from my ivy.xml.

I then updated to the latest version commons-collections and all was good.

Hope this is useful to someone.


Top
 Profile  
 
 Post subject: Re: Exception when starting app using Hibernate 3.6.0.Final
PostPosted: Wed Feb 16, 2011 5:00 pm 
Newbie

Joined: Wed Feb 16, 2011 4:56 pm
Posts: 1
Hi Aalex,
I am having similar issue.If you don't mind can you share your ivy.xml and ivysetting.xml if you have any.

Thanks,
Mohan


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.