[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[eclipselink-users] Unknown entity bean class: please verify that this class has been marked with the @Entity
|
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