Dears,
I am working on small web application using JPA with TopLink and JSF.
when I use dependency injection
@PersistenceUnit(unitName = "mufixPU")
private EntityManagerFactory emf;
everything works fine. but when I use
Persistence.createEntityManagerFactory("mufixPU").createEntityManager();
I got this error:
Exception [TOPLINK-8006] (Oracle TopLink Essentials - 2006.8 (Build 060830)): oracle.toplink.essentials.exceptions.EJBQLException
Exception Description: A problem was encountered resolving the class name - The descriptor for [Book] was not found.
this means that entity classes can't be found?
I need to use the second method? any clue?
Thanks in advance
BISO






Are you sure that you have
Are you sure that you have marked your Entity class with the @Entity annotation. Are you sure that your persitance.xml properly configured please post it here with the type of your application server
Michael's eHome :: Free Coder ...
Hi Michael, Thanks a lot for
Hi Michael,
Thanks a lot for your relpy.
Category Entity bean:
@Entity
@Table(name="Library_category")
public class Category implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
@Column(name="title")
private String name;
@OneToMany(mappedBy = "category")
private Set<Book> books;
.... // setters and getters
and i use sun java application server 9. the same problem apply to glassfish2
Thanks again
BISO
I see that the application
I see that the application server is having problems deploying/loading the persistence unit.
Can you advise us with your persistence.xml file and applicationContext if you have it.
Michael's eHome :: Free Coder ...