Posting the entire stacktrace would be helpful. On Tue, May 26, 2015 at 8:45 AM, patrice <patrice.au...@t2b.ch> wrote:
> Hello, > > I am encountering the exception using openjpa 2.3, "java.lang.Exception: > Errors encountered while resolving metadata. See nested exceptions for > details.", when invoking this code: > > > emf = Persistence.createEntityManagerFactory("d2pDatastoreUpserter_1.06PU", > puProps); > em = emf.createEntityManager(); > Query query = em.createNamedQuery("D2padmManagedCodes.findAll"); // this > raises the exception > ... > > I've turned on fine tracing everything looks good. For example for > "D2padmManagedCodes", I see this. > > 1729 d2pDatastoreUpserter_1.06PU TRACE [Root Thread] openjpa.MetaData - > Parsing query "D2padmManagedCodes.findAll". > 1785 d2pDatastoreUpserter_1.06PU TRACE [Root Thread] openjpa.MetaData - > Processing registered persistence-capable class "class > com.novartis.d2p106.jpa.entities.D2padmManagedCodes". > 1785 d2pDatastoreUpserter_1.06PU TRACE [Root Thread] openjpa.MetaData - > Loading metadata for "class > com.novartis.d2p106.jpa.entities.D2padmManagedCodes" under mode > "[META][QUERY]". > 1785 d2pDatastoreUpserter_1.06PU TRACE [Root Thread] openjpa.MetaData - > Parsing class "com.novartis.d2p106.jpa.entities.D2padmManagedCodes". > 1794 d2pDatastoreUpserter_1.06PU TRACE [Root Thread] openjpa.MetaData - > Set persistence-capable superclass of > "com.novartis.d2p106.jpa.entities.D2padmManagedCodes" to "null". > 1794 d2pDatastoreUpserter_1.06PU TRACE [Root Thread] openjpa.MetaData - > Resolving metadata for > "com.novartis.d2p106.jpa.entities.D2padmManagedCodes@-1614069114". > 1794 d2pDatastoreUpserter_1.06PU TRACE [Root Thread] openjpa.MetaData - > Resolving field > "com.novartis.d2p106.jpa.entities.D2padmManagedCodes@ > -1614069114.assigningAuthorityName". > > etc.... > > The code was enhanced on Eclipse using the Ant script enhance.xml, as per > OpenJPA doc. > > The persistence.xml declares all classes and the following parameters are > used: > <exclude-unlisted-classes>true</exclude-unlisted-classes> > <shared-cache-mode>NONE</shared-cache-mode> > <validation-mode>NONE</validation-mode> > > Any thoughts would be helpful before plowing through the source code. > > Thank you, > Patrice > > > > > > -- > View this message in context: > http://openjpa.208410.n2.nabble.com/java-lang-Exception-Errors-encountered-while-resolving-metadata-tp7588128.html > Sent from the OpenJPA Users mailing list archive at Nabble.com. > -- *Rick Curtis*