Not so sure about NetBeans but in MyEclipse Ant is pretty fussy. I can set up <path id= to point to various libs and then a <path refid= to the main class path and openjpac doesn't find the classes. Now I find if I add my classes and libs to the openjpac class path instead of the ant config then it works. Not really sure why but don't really care either :)
I didn't have this issue on OpenJPA 1.2.x Chris -----Original Message----- From: Rick Curtis [mailto:curti...@gmail.com] Sent: Tuesday, 18 May 2010 12:25 AM To: users@openjpa.apache.org Subject: Re: Ant based enhancement I'm not an ant expert, but I do notice that in the blog posting the openjpac task specifies a <classpath> element. Try working that element in to see if it clears up your problems. Thanks, Rick On Mon, May 17, 2010 at 9:08 AM, Hiran Chaudhuri < hiran.chaudh...@amadeus.com> wrote: > > 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 runs. > My build.xml file snippet looks like this: > > <openjpac directory="build/jar"> > <fileset dir="."> > <include name="**/*.*" /> > </fileset> > </openjpac> > > 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: > log4j.properties (my log4j configuration file, which > will appear on the classpath later) > META-INF > -application-client.xml > -MANIFEST.MF > -persistence.xml (that is the file OpenJPA should look for, > right?) > 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 > > > *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 > hiran.chaudh...@amadeus.com* > **http://www.amadeus.com* <http://www.amadeus.com/> > > [image: Amadeus logo] <http://www.amadeus.com/> > > > *Rick Curtis <curti...@gmail.com>* > To > users@openjpa.apache.org > cc > bcc > Subject > Re: Ant based enhancement > > *Rick Curtis <curti...@gmail.com>* > > Please respond to : users@openjpa.apache.org > 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 start > with the simple solution before we go too far. > > Thanks, > Rick > > [1] > http://webspherepersistence.blogspot.com/2009/02/openjpa-enhancement.html > > On Mon, May 17, 2010 at 8:31 AM, Hiran Chaudhuri < > hiran.chaudh...@amadeus.com> 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 > 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. > > > > > > 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 > place > > 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 > be > > in sync with this error message. > > And finally - just if it is the security policy: What could I look out > for > > 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 > > hiran.chaudh...@amadeus.com* > > **http://www.amadeus.com* <http://www.amadeus.com/> > > > > [image: Amadeus logo] <http://www.amadeus.com/> > > > > > > > > > > > > > >