Hi,all I got an exception when trying to persist an entity class which has embedded classes. The steps are as following: 1.create the embedded class @Embeddable public class Borrower implements Serializable { private String borrowerName; ...} 2.create the entity class @Entity public class Book1 implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; private String name; @Embedded Borrower borrower; ... } 3.create an instance of the entity class and persis it. ... Book1 book1=new Book1(); Borrower borrower=new Borrower(); borrower.setBorrowerName("borrowerName"); book1.setName("book1"); book1.setBorrower(borrower); em.getTransaction().begin(); em.persist(book1); em.getTransaction().commit(); ... 4.set the run time enhancer -javaagent:D:\repository\org\apache\openjpa\openjpa\2.0.0\openjpa-2.0.0.jar
I have met this enhancer problem at first,after setting the runtime enhancer,the problem is solved. However,when running the application which has entity class with embedded class,the enhancer problem came out again. Actually,I don't know whether this is known issue.Have someone experienced the same problem with me? Any suggestion is welcomed,thanks in advance.