openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hiran Chaudhuri <>
Subject Re: Ant based enhancement
Date Mon, 17 May 2010 14:08:03 GMT
Hi, Rick.

Thank you for the quick response. I read the blog, which clearly says the 
persistence.xml file should be in the right location once the enhancer 
My build.xml file snippet looks like this:

        <openjpac directory="build/jar">
            <fileset dir=".">
                <include name="**/*.*" />

The build/jar directory is created by Netbeans 6.8, and it compiles all 
java source files to that location.
So inside <dir hosting build.xml>/build/jar I find these entries:                        (my log4j configuration file, 
which will appear on the classpath later)
        -persistence.xml        (that is the file OpenJPA should look for, 
rmspilot                                (the package hosting all my other 
source files)

So I guess Netbeans did the job for me already and the file is in place. 
The content of the file has proven to be usable for runtime enhancement, 
so I believe it is ok.

What else could I look for now?


Hiran Chaudhuri
System Support Programmer / Analyst
IT Service Assurance
Hosting & Regional Services (IH)
Amadeus Data Processing GmbH
Berghamer Strasse 6
85435 Erding
T: +49-8122-43x3662

Rick Curtis <> 


Re: Ant based enhancement

Rick Curtis <>
Please respond to :
17-05-10 15:55

Hiran -

I'd suggest reading through this[1] blog posting which talks about
enhanecment. Most likely the net of the message is that OpenJPA can't find
your persistence.xml file. If your build directory is /bin, your
persistence.xml file should be at /bin/META-INF/persistence.xml. Lets 
with the simple solution before we go too far.



On Mon, May 17, 2010 at 8:31 AM, Hiran Chaudhuri <> wrote:

> Hi there.
> On OpenJPA 2.0.0 I try to use the ant based enhancement step. However I
> keep getting this error message:
> <openjpa-2.0.0-r422266:935683 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 
> 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.
> So I figure it is something about my persistence.xml file (that already
> worked for runtime enhanced classes). Now where exactly do I have to 
> the file for OpenJPA to find it?
> If there is a <properties> or <propertiesFile> attribute, how are these
> specified for the ant task? Unfortunately the documentation seems not to 
> in sync with this error message.
> And finally - just if it is the security policy: What could I look out 
> here?
> Can somebody shed some more light on this?
> Hiran
> *Hiran Chaudhuri**
> System Support Programmer / Analyst*
> IT Service Assurance
> Hosting & Regional Services (IH)
> Amadeus Data Processing GmbH
> Berghamer Strasse 6
> 85435 Erding
> T: +49-8122-43x3662
> *** <>
> [image: Amadeus logo] <>

  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message