Note that there are some explanatory texts on larger screens.

plurals
  1. POJPA - "no Metadata found for type" exception
    text
    copied!<p>The JPA implementation used in my application is Kodo. When attempting to query the DB for an entity, I get this very weird exception:</p> <p>org.apache.openjpa.persistence.ArgumentException: No metadata was found for type "class <strong>com.verid.ims.model.AddressUS</strong>". The class does not appear in the list of persistent types: [com.verid.ims.model.Birthdate, com.verid.ims.model.PersonName, <strong>com.verid.ims.model.AddressUS</strong>, 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].</p> <p>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)</p> <p>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:</p> <pre><code>&lt;embeddable class="com.verid.ims.model.AddressUS"&gt; &lt;attributes&gt; &lt;basic name="city" /&gt; &lt;basic name="state"&gt; &lt;enumerated&gt;STRING&lt;/enumerated&gt; &lt;/basic&gt; &lt;basic name="street1" /&gt; &lt;basic name="street2" /&gt; &lt;basic name="zipcode" /&gt; &lt;basic name="suite" /&gt; &lt;/attributes&gt; &lt;/embeddable&gt; </code></pre> <p>Needless to say, the persistence.xml descriptor refers to the orm.xml file.</p> <p>The exception only happens on some environments (not all of them), which basically means that it's an environmental problem. What could cause this?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload