Powered by Blogger.

Thursday, 11 December 2014

Hibernate Error

By Shambhu Kumar  |  08:24 No comments

Invocation of init method failed; nested exception is org.hibernate.MappingException: Could not determine type for: java.util.List, at table: Country_master, for columns: [org.hibernate.mapping.Column(stateMasters)]

Add
<dependency>
   <groupId>org.hibernate</groupId>
   <artifactId>hibernate-entitymanager</artifactId>
   <version>${hibernate.version}</version>
</dependency>

=======================================================

Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: javax.persistence.OneToMany.orphanRemoval()Z

That may be due to hibernate-jpa-2.0-api.jar

Add Below code
<dependency>
   <groupId>org.hibernate</groupId>
   <artifactId>hibernate-entitymanager</artifactId>
   <version>${hibernate.version}</version>
   <exclusions>
      <exclusion>
         <groupId>org.hibernate.javax.persistence</groupId>
 <artifactId>hibernate-jpa-2.0-api</artifactId>
      </exclusion>
   </exclusions>
</dependency>


========================================================

Caused by: org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: com.pristine.domain.StateMasterEntity


@OneToMany(cascade = CascadeType.ALL)

Author: Shambhu Kumar

Hello, I am Author, decode to know more: In commodo magna nisl, ac porta turpis blandit quis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. In commodo magna nisl, ac porta turpis blandit quis. Lorem ipsum dolor sit amet.

0 comments:

Recent Articles

© 2014 Learning Java. WP themonic converted by Bloggertheme9. Published By Gooyaabi Templates
TOP