Problem:
This exception will occur mainly because of the following two reasons
Happy Coding!!!
This exception will occur mainly because of the following two reasons
1. Making the @Entity with the wrong annotation
import org.hibernate.annotations.Entity;
@Entity
public class Employee implements Serializable {
...
}
solution for this one is changing the package name.
import javax.persistence.Entity;
2. Missing the@Entity annotation
public class Employee implements Serializable {
...
}
solution for this one is adding the @Entity annotation to the class.
import javax.persistence.Entity;
@Entity
public class Employee implements Serializable {
}
Happy Coding!!!
0 comments:
Post a Comment