Forum Stats

  • 3,784,367 Users
  • 2,254,929 Discussions


java.lang.IllegalArgumentException X is not a known entity type

Joshua Davis
Joshua Davis Member Posts: 22
edited Jul 20, 2009 2:39PM in TopLink/JPA
I'm getting the exception in the subject when trying to persist objects of one class. Other objects are persisting just fine.

All of our objects are persisted in the same place, in a method that looks like this:

public Object insert(Object o) throws Exception {
EntityManager em = this.emf.createEntityManager();
return o

The exception is being thrown from the call to em.persist(o), and only for one type. Other types of objects are being persisted with no trouble.

I checked our orm.xml file, and the line for the class in question is there.
I checked the code for the persistent class, and the annotations all seem to be correct. The table name is correct, the primary key is correct, and the other fields are all correct.
I watched the log file as the application was starting, and I could see the line where the descriptor was loaded. There were no errors at that time.

There isn't anything unusual about the class that is failing. It only has direct to field mappings -- no conversions, no reference mappings.

I'm out of ideas for things to check. Are there any other reasons why one class would fail here when the others are succeeding?


This discussion has been closed.