openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey" <plins...@gmail.com>
Subject Re: how to tell openjpa to not worry about non-entity abstract superclasses of entities
Date Fri, 29 Feb 2008 17:38:50 GMT
How about adding it to your exclude list? Per that set of includes and
excludes, the abstract class will be enhanced.

-Patrick

On Fri, Feb 29, 2008 at 9:25 AM, Geir Magnusson Jr. <geir@pobox.com> wrote:
>
>  On Feb 29, 2008, at 12:13 PM, Patrick Linskey wrote:
>
>  >> How can I tell OpenJPA to ignore it?
>  >
>  > Don't ask OpenJPA to enhance it.
>  >
>  > How are you invoking the enhancer? It sounds like you're either
>  > specifying a list of classes to enhance, including the new superclass,
>  > or you're specifying nothing, and the new superclass is listed in your
>  > persistence.xml.
>
>  Well, I do it this way in my ant build :
>
>      <target name="openjpa:enhance" depends="common-build.compile">
>          <taskdef name="openjpac" classpathref="compile.classpath"
>  classname="org.apache.openjpa.ant.PCEnhancerTask" />
>
>          <openjpac>
>              <config propertiesFile="src/main/resources/META-INF/
>  persistence.xml" />
>              <classpath refid="compile.classpath" />
>              <fileset dir="src/main/java">
>                  <include name="**/model/**/*.java" />
>                  <exclude name="**/model/util/*.java" />
>              </fileset>
>          </openjpac>
>      </target>
>
>  and I took it out :
>
>  pthbbbbbb:trunk geir$ cd src/main/resources/META-INF/
>  pthbbbbbb:META-INF geir$ grep AbstractControlledListItem persistence.xml
>  <!--    <class>com.joost.model.codes.AbstractControlledListItem</
>  class> -->
>  pthbbbbbb:META-INF geir$
>
>  yet still I get that notification.
>
>  geir
>
>
>
>
>
>  >
>  > -Patrick
>  >
>  > On Fri, Feb 29, 2008 at 5:48 AM, Geir Magnusson Jr. <geir@pobox.com>
>  > wrote:
>  >> After a bit of refactoring, I have a set of entity classes that
>  >> have a
>  >> common abstract ancestor.  This ancestor has nothing JPA-ish about
>  >> it.
>  >>
>  >> However, when I run the enhancer (v1.0.2) I get :
>  >>
>  >>  [openjpac] 1003  pu  WARN   [main] openjpa.Enhance - Type "class
>  >> com.joost.model.codes.AbstractControlledListItem" has no metadata;
>  >> enhancing as persistence aware. If you intended for "class
>  >> com.joost.model.codes.AbstractControlledListItem" to be persistence-
>  >> capable, then this means that OpenJPA could not find any metadata for
>  >> "class com.joost.model.codes.AbstractControlledListItem". This can
>  >> happen if the directory containing your metadata is not in your
>  >> CLASSPATH, or if your metadata files are not named properly. See the
>  >> documentation on metadata placement for more information.
>  >>
>  >> How can I tell OpenJPA to ignore it?
>  >>
>  >> geir
>  >>
>  >>
>  >>
>  >
>  >
>  >
>  > --
>  > Patrick Linskey
>  > 202 669 5907
>
>



-- 
Patrick Linskey
202 669 5907

Mime
View raw message