openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mejov Andrey (JIRA)" <>
Subject [jira] Created: (OPENJPA-889) OpenJPA enhancer in ant script
Date Mon, 02 Feb 2009 11:21:59 GMT
OpenJPA enhancer in ant script

                 Key: OPENJPA-889
             Project: OpenJPA
          Issue Type: Question
          Components: kernel
    Affects Versions: 1.3.0
         Environment: Ubuntu 8.04, Java 6, Ant 1.7.0, Netbeans 6.5, OpenJPA 1.2.0/1.3.0-SNAPSHOT
            Reporter: Mejov Andrey


I use OpenJPA enhancer in ant script (for-jpa.xml), according manual:

<?xml version="1.0" encoding="UTF-8"?>
<project name="ebd-entity">

 <path id="jpa-cp">    
    <fileset dir="/usr/java/java-common/Commons" includes="*.jar"/>
    <fileset dir="/usr/java/java-common/Serp" includes="*.jar"/>
    <fileset dir="/usr/java/java-common/OpenJPA" includes="*.jar"/>
    <fileset dir="/usr/java/java-common/JPA" includes="*.jar"/>
    <fileset dir="/usr/java/java-common/JTA" includes="*.jar"/>

 <taskdef name="openjpac"

  <openjpac directory="./build/classes">    
    <classpath refid="jpa-cp"/>
<!--    <config propertiesFile="./src/META-INF/persistence.xml"/>  -->
    <fileset dir="./src">
	<include name="**/entity/*.java"/>

but get error:

/home/andrew/work/sg-util-project/ebd-entity/for-jpa.xml:16: <openjpa-1.3.0-SNAPSHOT-r422266:739431
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

if uncomment <config .../>, i get exception:

java.util.MissingResourceException: /home/andrew/work/sg-util-project/ebd-entity/src/META-INF/persistence.xml#null

Also i used "META-INF/persistence.xml" and "persistence.xml" and tried to add "build/classes"
to classpath

Folder structure:

                 /<folder and classes>
     /<folder and java source>

It's a bug or i wrong understood documentation?

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message