entity « Exception « JPA Q&A





1. JPA exception: Object: ... is not a known entity type    stackoverflow.com

I'm new to JPA and I'm having problems with the autogeneration of primary key values. I have the following entity:

package jpatest.entities;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

@Entity
public class MyEntity implements Serializable {
  ...

2. J2ME Stub generates an unknown exception with JPA Entity types    stackoverflow.com

I created a web service stub using NetBeans 7.0 and when I try using it, it throws an unknown Exception. I don't even know what part of my code to show ...

4. Exception Hydrating entity with PersistentEnumTypes    forum.hibernate.org

I have an object that I am persisting that has 2 PersistentEnum types properties. The object is created and the row is successfully inserted in the db, but when it is hydrated I am getting the following exception: 17:32:10,185 DEBUG [SessionFactoryImpl] - preparing statement 17:32:10,185 DEBUG [StringType] - binding '4028814efa8bb16f00fa8bb1c1230002' to parameter: 1 17:32:10,185 DEBUG [Loader] - processing result set 17:32:10,185 ...

5. "Unknown entity" exception driving me nuts    forum.hibernate.org

Newbie Joined: Sun Jun 12, 2005 11:30 am Posts: 2 Hi All, I'm getting this exception and i'm stuck with it four hours!! The problem I encountered occures when i'm running to the point: List honeys = criteria.list(); in function named: listHoney under class TestClient. It must be something i'm not seeing... And I apologize if its something stupid (and i'm ...

6. EntityNotFoundException Exception - Saving a removed entity    forum.hibernate.org

Beginner Joined: Thu Feb 22, 2007 6:08 am Posts: 35 Hi there! Im developing a backend with an Applet as a frontend. And i am with a problem persisting a entity. When an entity is created (new operator, that create a entity with out id, and properties are setted) on the client side, it is passed to to the servlet where ...

7. new session gets not commited entity after Exception    forum.hibernate.org

Hello all, I use atomikos transactions for xa-transactions with hibernate. Testing rollback of a xa-transaction over two datasources shows me an unexpected behaviour. I use the following environment: - hibernate 3.2.5.ga - xa-transactions with jta (atomikos) - a javax.transaction.UserTransaction is available in a JUnit-JNDIMock Code: com.atomikos.icatch.jta.hibernate3.TransactionManagerLookup org.hibernate.transaction.JTATransactionFactory ...

8. EntityNotFound exception for entity with id 1    forum.hibernate.org

I am using Hibernate through JBoss Seam 2.0.1 in an EJB3 environment (JPA). I have an EndUser entity whose profile contains one or more email addresses. The relationship is annotated as follows: Code: @Entity public class EndUser implements Serializable { ... @OneToMany(cascade={CascadeType.ALL}, fetch = FetchType.EAGER, mappedBy="user") @IndexColumn(name="id") ...

9. Exception: Foreign key circularity dependency - entity tree    forum.hibernate.org

Hi there, I have a problem defining a tree structure with the parent as part of the primary key of a node: Code: @Entity @IdClass(NodePK.class) public class Node { @Id private String name; @Id @ManyToOne(optional=true, targetEntity=Node.class) private Node parent; } @Embeddable public class NodePK implements Serializable { ...





10. "Unbound type and no explicit target entity"-exception    forum.hibernate.org

I believe I'm getting this exception even though I shouldn't be getting it? Or am I missing something? Code: Caused by: org.hibernate.AnnotationException: Property foo.Foo.bars has an unbound type and no explicit target entity. Resolve this Generic usage issue or set an explicit target attribute (eg @OneToMany(target=) or use an explicit @Type at org.hibernate.cfg.AnnotationBinder.addElementsOfAClass(AnnotationBinder.java:993) ...