You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Kevin Sutter <kw...@gmail.com> on 2009/08/28 16:39:49 UTC

Re: How to use PCEnhancer?

Check out Rick's blog posting first...
http://webspherepersistence.blogspot.com/2009/02/openjpa-enhancement.html

On Fri, Aug 28, 2009 at 3:54 AM, drawal
<dh...@credit-suisse.com>wrote:

>
> I want to use "org.apache.openjpa.enhance.PCEnhancer" class to enhance my
> java files.
> How can i do it?
> I tried it by ANT like:
>  <target name="Compile">
>
>   <taskdef name="openjpac"
> classname="org.apache.openjpa.ant.PCEnhancerTask"/>
>      <openjpac>
>         <fileset dir="."> <include name="Main.java" /> </fileset>
>         <config propertiesFile="META-INF/persistence.xml"/>
>    </openjpac>
>   </target>
> But i am getting one Exception:
> Exception in thread "main" <openjpa-1.2.1-r752877:753278 fatal user error>
> org.apache.openjpa.util.MetaDataException: MetaDataFactory could not be
> configured (conf.newMetaDataFactoryInstance() returned null). This might
> mean that no configuration properties were found. Ensure that you have a
> META-INF/persistence.xml file, that it is available in your classpath, or
> that the properties file you are using for configuration is available. If
> you are using Ant, please see the <properties> or <propertiesFile>
> attributes of the task's nested <config> element. This can also occur if
> your OpenJPA distribution jars are corrupt, or if your security policy is
> overly strict.
>
> Please help
> Thanks
> Dhirendra Rawal
> --
> View this message in context:
> http://n2.nabble.com/How-to-use-PCEnhancer-tp3533482p3533482.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>