MappingException « Annotation « JPA Q&A

1. Hibernate MappingException Unknown entity: $Proxy2

I'm using Hibernate annotations and have a VERY basic data object:


import javax.persistence.Entity;
import javax.persistence.Id;

public class State implements Serializable {
private static final long serialVersionUID = 1L;

private String stateCode;

private String ...

2. org.hibernate.MappingException using annotations

I am using JPA annotations for these two classes:

public abstract class BaseEntity {

  @DateTimeFormat(style = "S-")
  private Calendar created;

  @DateTimeFormat(style = "S-")
  private ...

3. org.hibernate.MappingException: Unknown entity

I'm trying to work through Beginning Hibernate 2nd edition, and I'm stuck trying to put together the simple working example with HSQLDB. When I run ant populateMessages, I get

[java] org.hibernate.MappingException: Unknown entity: ...

4. org.hibernate.MappingException: Could not determine type for: java.util.Set

Although this question asked many times and I have already used all the suggestion but still I am getting this error. The is

@Table(name = "USER")
public class User implements UserDetails, Serializable {


5. [ANNOTATIONS] MappingException: Unknown entity

Newbie Joined: Thu Mar 09, 2006 11:52 am Posts: 13 I'm trying to get annotations to work but when I try to load an annotated class object, I get the exception mentioned below. I guess that my annotations are somewhat wrong but I don't know where the error possibly might be. Hope someone can help, thanks in advance. Hibernate version: 3.1.3 ...