You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Pinaki Poddar <pp...@apache.org> on 2011/02/01 10:19:52 UTC

Re: em.getMetamodel exceptions

Hi,
  The warning message implies that the canonical metamodel classes [1]
corresponding to the persistent domain classes had not been generated and/or
available. Since JPA 2.0, type-safe queries [2] are made possible with the
introduction of instantiated meta- classes and these classes could be
generated from annotated Java source during normal compilation process by
invoking an annotation processor [3].
  If the application is not using type-safe queries -- one can safely ignore
these warnings -- but I agree they do appear to be annoying. 

[1] http://www.ibm.com/developerworks/java/library/j-typesafejpa/#N102F5
[2] http://www.ibm.com/developerworks/java/library/j-typesafejpa/
[3] http://openjpa.apache.org/builds/latest/docs/manual/manual.html#d0e11101
 

-----
Pinaki 
-- 
View this message in context: http://openjpa.208410.n2.nabble.com/em-getMetamodel-exceptions-tp5966203p5980260.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: em.getMetamodel exceptions

Posted by Pinaki Poddar <pp...@apache.org>.
The correct URL for Annotation Processor usage is [1]

[1]
http://openjpa.apache.org/builds/apache-openjpa-2.1.1-SNAPSHOT/docs/javadoc/org/apache/openjpa/persistence/meta/AnnotationProcessor6.html

-----
Pinaki 
--
View this message in context: http://openjpa.208410.n2.nabble.com/em-getMetamodel-exceptions-tp5966203p6175973.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: em.getMetamodel exceptions

Posted by Pinaki Poddar <pp...@apache.org>.
Yes, Java compiler requires -Aopenjpa.metamodel=true flag to activate the
OpenJPA annotation processor that generates the canonial metamodel classes. 
For a complete set of flags to control behavior, please refer [1]

[1]
http://openjpa.apache.org/builds/apache-openjpa-2.1.1-SNAPSHOT/docs/javadoc/index.html

-----
Pinaki 
--
View this message in context: http://openjpa.208410.n2.nabble.com/em-getMetamodel-exceptions-tp5966203p6175965.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: em.getMetamodel exceptions

Posted by Chris <ch...@parallelsw.com>.
Pinaki Poddar <pp...@...> writes:

> 
> 
> Hi,
>   The warning message implies that the canonical metamodel classes [1]
> corresponding to the persistent domain classes had not been generated and/or
> available. Since JPA 2.0, type-safe queries [2] are made possible with the
> introduction of instantiated meta- classes and these classes could be
> generated from annotated Java source during normal compilation process by
> invoking an annotation processor [3].
>   If the application is not using type-safe queries -- one can safely ignore
> these warnings -- but I agree they do appear to be annoying. 
> 
> [1] http://www.ibm.com/developerworks/java/library/j-typesafejpa/#N102F5
> [2] http://www.ibm.com/developerworks/java/library/j-typesafejpa/
> [3] http://openjpa.apache.org/builds/latest/docs/manual/manual.html#d0e11101
> 
> -----
> Pinaki 

I am having the same issue.  I was on openjpa 2.0, upgraded today to 2.1, I am
using the Ant Task for enhancement, but the _.class files do not seem to be
generated.

Is there a switch on the Tasks that needs to be set?

-chris