Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Kodo JPA - “no Metadata found for type” exception

Alon Cohen
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JPA implementation used in my application is Kodo. When attempting to query the DB for an entity, I get this very weird exception:

org.apache.openjpa.persistence.ArgumentException: No metadata was found for type "class com.verid.ims.model.AddressUS". The class does not appear in the list of persistent types: [com.verid.ims.model.Birthdate, com.verid.ims.model.PersonName, com.verid.ims.model.AddressUS,, com.rsa.idv.ims.notification.IMSNotification, com.rsa.idv.ims.provider.IMSProvider, com.rsa.idv.ims.notification.NotificationEntry, com.rsa.idv.ims.enroll.SecretUserQuestion, com.rsa.idv.ims.enroll.Enrollment].

Please take into account that the AddressUS class, which according to the exception does not appear in the list of persistent types, is actually in the list! (Bold)

The AddressUS class is mapped in my orm.xml file (it's not in the persistence.xml descriptor since it's not an entity, only an embeddable). Here is the mapping:

Needless to say, the persistence.xml descriptor refers to the orm.xml file.

The exception only happens on some environments (not all of them), which basically means that it's an environmental problem. What could cause this?
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic