Question: collectionMapping using annotation

Ads

 
 
 

Share on Google+Share on Google+

Prasanta kumar Bhoi
collectionMapping using annotation
0 Answer(s)      5 years and a month ago
Posted in : Hibernate

Hello sir, I am using @ElementCollection annotaion in my entity class as

@Entity
@Table(name="stud_collection")
public class StudentEntity implements Serializable{
@Id
@Column(name="id")
private Long id;
@Column(name="sname")
private String sname;
@Column(name="sage")
private Long sage;
@Column(name="friends")
@ElementCollection
private java.util.List friends; 

//setters and getters;

but when i run it, it throws exception as:

Exception in thread "main" org.hibernate.MappingException: Could not determine type for: java.util.List, at table: stud_collection, for columns: [org.hibernate.mapping.Column(friends)]

so how to handle this exception again what jars i need and what to do at the time of adding hibernate capabilities in MyEclipse.thanks...

Ads
View Answers
Ads









Related Tutorials/Questions & Answers:
collectionMapping using annotation
collectionMapping using annotation  Hello sir, I am using @ElementCollection annotaion in my entity class as @Entity @Table(name="stud_collection") public class StudentEntity implements Serializable{ @Id @Column(name="id
aop using annotation
aop using annotation  i got this problem in aop example using annotation example Caused by: java.lang.IllegalArgumentException: error at ::0 can't find referenced pointcut jlc
Advertisements
aop using annotation
aop using annotation  i got this problem in aop example using annotation example Caused by: java.lang.IllegalArgumentException: error at ::0 can't find referenced pointcut jlc
How to configure Spring using Annotation
How to configure Spring using Annotation  Hi, How to configure Spring using Annotation Thanks
Hibernate 4 Many to Many Mapping using Annotation
In this section, you will learn how to do Many to Many Mapping using Annotation
Hibernate 4 One to One Mapping using Annotation
Hibernate One to One Mapping using Annotation
Hibernate 4 One to One Mapping using Annotation
Hibernate One to One Mapping using Annotation
Creating and Initializing a Servlet using Annotation
Creating and Initializing a Servlet using Annotation In this tutorial you will learn how a servlet can be created using Annotation To create a servlet using annotation you are required to define @WebServlet annotation. @WebServlet
Defining handler methods using @RequestMapping annotation
In this section, you will learn about defining new handler methods using @RequestMapping annotation
Hibernate 4 Many to Many Mapping using Annotation
In this section, you will learn how to do Many to Many Mapping of table in Hibernate using Annotation
Hibernate 4 One to Many mapping using Annotation
In this section, you will learn how to do one to many mapping in Hibernate using Annotation
Hibernate 4 One to Many mapping using Annotation
In this section, you will learn how to do one to many mapping in Hibernate using Annotation
Annotation
tag, used to give some life to the code you are using. While annotation type... Annotation       Annotation is one more powerful feature of Java, an object-oriented programming
Struts 2 hello world application using annotation
Struts 2 hello world application using annotation Annotation... in an application and they can be used to several application elements. The annotation can..., @Override, @result, @Before, @Test etc. Every annotation type starts
use of annotation.
use of annotation.  for concurrency which annotation can be used
@RequestMapping annotation for mapping requests
In this section, you will learn to map request to associated class or method using @RequestMapping annotation
Spring Annotation
Spring Annotation  Hi Sire please tell me that how to write Spring Annotation Based Controller ?   Spring Annotation Based Controller
Java Annotation
Java Annotation  What is annotation in Java ?   Hi please find the link of Java Annotation tutorial http://www.roseindia.net/tutorialsearch/?t=java%20annotation
Hibernate 4 Annotation Example
to make a project in Hibernate using Annotation. To create an example of Hibernate using annotation reader should have aware with some basic terms. You can know... read that the POJO class will be changed after using annotation lets see
annotation error
annotation error  class names "JdbcProjam.java "are only accepted if annotation processing is explicitly requested   Is your class name is JdbcProjam or JdbcProgram? Check it properly. Java is case sensitive. So use
Hibernate Annotation Example
Hibernate Annotation Example In this section we will read about how to create a hibernate application using annotation. Here we will see an example... using annotation. In this example I will create a POJO class that contains some
@RequestParam Annotation
@RequestParam Annotation This @RequestParam annotation can be used for getting the parameters from the request as, /* * The method written below takes the request parameters individually by * using @RequestParam However you can
Java Custom Annotation Example
annotation to include in the documentation and documented using the Javadoc...Java Custom Annotation Example In this tutorial we will learn about the annotation in Java and how it can be created. Annotations in Java contains
spring mvc3 and hibernate with annotation example
spring mvc3 and hibernate with annotation example  please send an example which is used to store the form data into database using spring with hibernate using annotations
JAVA Annotation Error
JAVA Annotation Error  while compiling simple java program i get annotation error i.e class will only be accepted if annotation processing is explicitly requested..how to solve
Junit @Test annotation
Junit @Test annotation  What is the Application of @Test Annotation in JUnit ?   The Test annotation tells JUnit that the public void method to which it is attached can be run as a test case : public class Example
@PathVariable Annotation
@PathVariable Annotation By using the @PathVariable annotation you can create the dynamic varible at the url and can access that varible from...", pathVar); return "view-data"; } /* * By using @PathVariable you can
@ExceptionHandler & @ResponseStatus annotation
In this section, you will learn about @ExceptionHandler & @ResponseStatus annotation
@configuration annotation in Spring 3
@configuration annotation in Spring 3  doesn't make code tight coupling..? if we keep that in IOC in XML form, its deployment free for some kind of change management right?.   Please visit the following link: http
Many To Many annotation in ejb
Many To Many annotation in ejb   how to define primary key in the third & resulting table obtained from ManyToMany mapping.I tried the mapping but the resulting table is showing only foreign key with the two fields which
Custom Annotation - Development process
to Create Custom Annotation and I Want the Sample Program on Custom Annotation..., Custom Annotation 1)Annotations are metadata of a data. 2)Annotations to annotate a Java element. 3)An annotation show the declared element
Tutorials   
Java Spring Hibernate Struts Training Hibernate maven dependency example What is the difference between JPA and Hibernate? How to turn off hbm2ddl? Hibernate hbm2ddl.auto values Hibernate table not mapped error - solution Hibernate error class is not mapped Hibernate Envers custom revinfo table Hibernate Envers - REVINFO table doesn't exist How to enable second level cache in Hibernate 5? How to enable second level cache in Hibernate 5? java.lang.IndexOutOfBoundsException: Remember that ordinal parameters are 1-based! org.hibernate.validator cannot be resolved error java.lang.ClassNotFoundException: org.hibernate.cache.TimestampsRegion java.lang.ClassNotFoundException: org.hibernate.cache.TimestampsRegion property hibernate.cache.region.factory_class is not given Hibernate example step by step in Eclipse with MySQL How to make Struts Hibernate and Spring Based Login/Registration Application? What is the use of Hibernate Native SQL? What is the use of Hibernate is used? How to integrate Struts and Hibernate in an application? How to create the program in Java for getting the forgotten Password Form? How to write create JPA Many-to-Many Relationship in Java? What is the DAO Layer in any application? What is Spring Struts Hibernate DAO Layer? How to write Example code for CRUD application in hibernate annotation? Where to update the Hibernate tools? Query conversion convert into hql how to convert sql into hql package org.hibernate.util does not exist C3P0 with Hibernate What do you understand by JPA? Hibernate Query Checker Jpa many to many relationship What do you understand by Hibernate in Java? What are criteria Queries in Hibernate? How to use Associations and Joins in Hibernate? Hibernate 4 Example with Eclipse How to learn Hibernate? What is Hibernate Framework? hibernate faq 15/03/14 hibernate 15/03/2014 Hibernate Criteria Wildcard how to add mulitiple projections this is a hibernate question this is a hibernate question this is a hibernate question how to writw connection pool coding Hibernate 4.3 and JPA 2.1 support How to create Hibernate session factory name?

Ads

 
Advertisement null

Ads