You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by patrice <pa...@t2b.ch> on 2015/05/26 15:45:44 UTC
java.lang.Exception: Errors encountered while resolving metadata
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.
Re: java.lang.Exception: Errors encountered while resolving
metadata
Posted by patrice <pa...@t2b.ch>.
Hi Rick,
Well after way too long our env is backup.... external providers :-(
Regardless, it seems the issue was that an embedded PK class (@Embeddable)
was not enhanced.
So all is well... actually I have an other problem, but it does not seem to
be be related to OpenJPA.
Thanks again,
Patrice
--
View this message in context: http://openjpa.208410.n2.nabble.com/java-lang-Exception-Errors-encountered-while-resolving-metadata-tp7588128p7588319.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.
Re: java.lang.Exception: Errors encountered while resolving
metadata
Posted by patrice <pa...@t2b.ch>.
Hi Rick,
Thanks for the quick response... our dev env is down currently, but I will
post asap.
thanks again
Patrice
--
View this message in context: http://openjpa.208410.n2.nabble.com/java-lang-Exception-Errors-encountered-while-resolving-metadata-tp7588128p7588133.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.
Re: java.lang.Exception: Errors encountered while resolving metadata
Posted by Rick Curtis <cu...@gmail.com>.
Posting the entire stacktrace would be helpful.
On Tue, May 26, 2015 at 8:45 AM, patrice <pa...@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*