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")
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...

View Answers









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
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
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
Defining handler methods using @RequestMapping annotation
In this section, you will learn about defining new handler methods using @RequestMapping annotation
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
@RequestMapping annotation for mapping requests
In this section, you will learn to map request to associated class or method using @RequestMapping annotation
Annotation
;. An annotation is the meta tag, used to give some life to the code you are using. While... Annotation       Annotation is one more powerful feature of Java, an object-oriented programming
use of annotation.
use of annotation.  for concurrency which annotation can be used
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
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 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... a hibernate application using annotation. In this example I will create a POJO class
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
Java Custom Annotation Example
and documented using the Javadoc tool. @Documented annotation is the built...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
Struts2.2.1 hello world annotations Example using Properties
;In this tutorial, We will discuss about hello world annotation application using... annotation application using @Action and @Result- First we create a JSP file named...; <body> <h1>Annotation Example using properties</h1
Spring bean annotation example
Spring bean annotation example  Hi, How to configure Bean using annotation in Spring Framework? Thank   Hi, I will explain you how... annotation as given below: package net.roseindia; import
ModuleNotFoundError: No module named 'annotation'
ModuleNotFoundError: No module named 'annotation'  Hi, My Python... 'annotation' How to remove the ModuleNotFoundError: No module named 'annotation' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'annotation'
ModuleNotFoundError: No module named 'annotation'  Hi, My Python... 'annotation' How to remove the ModuleNotFoundError: No module named 'annotation' error? Thanks   Hi, In your python environment you
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
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
@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
@ExceptionHandler & @ResponseStatus annotation
In this section, you will learn about @ExceptionHandler & @ResponseStatus annotation
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", pathVar); return "view-data"; } /* * By using
Hibernate Many To Many Annotation Mapping
Hibernate Many To Many Annotation Mapping  How to use Many To Many Annotation Mapping in Hibernate?   Hibernate requires metadata like... to another.Hibernate annotation provides annotation-based mapping. Click here
Spring Web Annotation Classes
the model object on the session by using SessionAttribute annotation. @Controller...Spring Web Annotation Annotation is introduced since java 5. It is a new kind... of annotation, some of them which is commonly is used in Spring MVC is explained
Version of drools>drools-annotation dependency
List of Version of drools>drools-annotation dependency
Version of cn.bingoogolapple>bga-annotation dependency
List of Version of cn.bingoogolapple>bga-annotation dependency
Version of cn.bingoogolapple>loon-annotation dependency
List of Version of cn.bingoogolapple>loon-annotation dependency
Version of com.alibaba>arouter-annotation dependency
List of Version of com.alibaba>arouter-annotation dependency
Version of com.groupdocs>groupdocs-annotation dependency
List of Version of com.groupdocs>groupdocs-annotation dependency
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
@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
ModuleNotFoundError: No module named 'django_annotation'
ModuleNotFoundError: No module named 'django_annotation'  Hi, My... named 'django_annotation' How to remove the ModuleNotFoundError: No module named 'django_annotation' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'annotation-refinery'
ModuleNotFoundError: No module named 'annotation-refinery'  Hi, My... named 'annotation-refinery' How to remove the ModuleNotFoundError: No module named 'annotation-refinery' error? Thanks   Hi
ModuleNotFoundError: No module named 'dtool-annotation'
ModuleNotFoundError: No module named 'dtool-annotation'  Hi, My... named 'dtool-annotation' How to remove the ModuleNotFoundError: No module named 'dtool-annotation' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'sql-annotation'
ModuleNotFoundError: No module named 'sql-annotation'  Hi, My... named 'sql-annotation' How to remove the ModuleNotFoundError: No module named 'sql-annotation' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'django_annotation'
ModuleNotFoundError: No module named 'django_annotation'  Hi, My... named 'django_annotation' How to remove the ModuleNotFoundError: No module named 'django_annotation' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'log-annotation'
ModuleNotFoundError: No module named 'log-annotation'  Hi, My... named 'log-annotation' How to remove the ModuleNotFoundError: No module named 'log-annotation' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'annotation-validation'
ModuleNotFoundError: No module named 'annotation-validation'  Hi...: No module named 'annotation-validation' How to remove the ModuleNotFoundError: No module named 'annotation-validation' error? Thanks   Hi
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
Hibernate id annotation
In this section, you will learn how to do mapping of id through annotation

Ads