This week's giveaway is in the Programmer Certification (OCPJP) forum.
We're giving away four copies of Java Mock Exams (software) and have David Mayer on-line!
See this thread for details.
Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) 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?
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!