Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Unknown entity bean class: please verify that this class has been marked with the @Entity

Please include your persistence.xml and set logging to finest and include the
exception logged on the server.



Mustafa Cayci wrote:
> 
> Hello,
> 
> I am doing the following in my standalone client code:
> 
> public class FingerprintImageClient {
>     public static void main(String[] args) {
>         final Context context;
>         try {
>             context = getInitialContext();
> ...
>             long bid = 0;
>             try {
>                 while (true) {
>                     IdtIsrs idtisrs =
> fingerprintImage.getIdtsrsByEid(23857);
>                     bid = idtisrs.getBid().longValue();
>                     idtisrs.setBid(bid + 1);
> ...
> 
> I have also developed a stateless session bean and deployed to Oracle AS.
> 
> Here is the session bean code:
> 
> @Stateless(name="FingerprintImage")
> @TransactionAttribute(TransactionAttributeType.REQUIRED)
> public class FingerprintImageBean implements FingerprintImage,
>                                              FingerprintImageLocal {
> 
>     private EntityManagerFactory emf =
> Persistence.createEntityManagerFactory("IDT_ISRS");
> 
> 
>     private EntityManager em = emf.createEntityManager();
> ..
> 
>     public IdtIsrs getIdtsrsByEid(long eid) {
>         return em.find(IdtIsrs.class, eid);
>     }
> ...
> 
> When I run the client code, I am getting
> 
> javax.ejb.EJBException: java.lang.IllegalArgumentException: Unknown entity
> bean class: class gov.dhs.visit.ident.dal.jpa.entity.IdtIsrs, please
> verify
> that this class has been marked with the @Entity annotation.; nested
> exception is:
>     java.lang.IllegalArgumentException: Unknown entity bean class: class
> gov.dhs.visit.ident.dal.jpa.entity.IdtIsrs, please verify that this class
> has been marked with the @Entity annotation.; nested exception is:
> oracle.oc4j.rmi.OracleRemoteException: java.lang.IllegalArgumentException:
> Unknown entity bean class: class
> gov.dhs.visit.ident.dal.jpa.entity.IdtIsrs,
> please verify that this class has been marked with the @Entity
> annotation.;
> nested exception is:
>     java.lang.IllegalArgumentException: Unknown entity bean class: class
> gov.dhs.visit.ident.dal.jpa.entity.IdtIsrs, please verify that this class
> has been marked with the @Entity annotation.
> oracle.oc4j.rmi.OracleRemoteException: java.lang.IllegalArgumentException:
> Unknown entity bean class: class
> gov.dhs.visit.ident.dal.jpa.entity.IdtIsrs,
> please verify that this class has been marked with the @Entity annotation.
>     at
> com.evermind.server.ejb.EJBUtils.getUserException(EJBUtils.java:346)
>     at
> com.evermind.server.ejb.interceptor.system.AbstractTxInterceptor.convertAndHandleMethodException(AbstractTxInterceptor.java:75)
> 
> I have defined @Entity in my entity class as shown below
> 
> @Entity
> @NamedQuery(name = "IdtIsrs.findAll", query = "select o from IdtIsrs o")
> @Table(name = "IDT_ISRS_ALL")
> public class IdtIsrs implements Serializable {
>     private Long bid;
> ...
> 
> I would appreciate if you have any ideas to correct this.
> 
> Thanks,
> 
> Mustafa
> 


-----
---
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland 
http://www.eclipse.org/eclipselink/
 EclipseLink ,  http://www.oracle.com/technology/products/ias/toplink/
TopLink 
Wiki:  http://wiki.eclipse.org/EclipseLink EclipseLink , 
http://wiki.oracle.com/page/TopLink TopLink 
Forums:  http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink , 
http://www.nabble.com/EclipseLink-f26430.html EclipseLink 
Book:  http://en.wikibooks.org/wiki/Java_Persistence Java Persistence 
-- 
View this message in context: http://www.nabble.com/Unknown-entity-bean-class%3A-please-verify-that-this-class-has-been-marked-with-the-%40Entity-tp19230259p19271562.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top