• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Regarding Illegal Argument exception in EJB application

 
Shital Mandlecha
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I'm using netbeans with glassfish server and oracle 10g as backend. I tried creating an application in EJB, where in I'm facing some problems.
First of all I created an entity class named Stud with Derby database as backend, connection was done and table got created with data storage and retrieval done successfully.
But as soon as Oracle 10g was taken for backend database connectivity, application gets compiled and deployed successfully, but while running the application error comes into picture,
which I was not able to understand at all because I have set the classpath variable for ojdbc14.jar.
One reason that I understand is table is not getting created in the database. But could not get, how to solve this problem?

Caused by: java.lang.IllegalArgumentException: Object: p.Stud[ id=1 ] is not a known entity type.
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNewObjectForPersist(UnitOfWorkImpl.java:4169)
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.persist(EntityManagerImpl.java:440)
at com.sun.enterprise.container.common.impl.EntityManagerWrapper.persist(EntityManagerWrapper.java:269)

Please help me to solve this problem.

Shital.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic