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.feedback.IMSFeedback, 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?