Details

    • Type: Question Question
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.3.0
    • Fix Version/s: None
    • Component/s: kernel
    • Labels:
      None
    • Environment:
      Ubuntu 8.04, Java 6, Ant 1.7.0, Netbeans 6.5, OpenJPA 1.2.0/1.3.0-SNAPSHOT

      Description

      Hi

      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"/>
      </path>

      <taskdef name="openjpac"
      classname="org.apache.openjpa.ant.PCEnhancerTask"
      classpathref="jpa-cp"/>

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

      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:

      build
      /classes
      /META-INF
      /<folder and classes>
      build.xml
      dist
      for-jpa.xml
      nbproject
      src
      /META-INF
      /<folder and java source>
      test

      It's a bug or i wrong understood documentation?

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Mejov Andrey
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development