2009-07-13 8 views
1

私はKodo JPAバージョン4.2に移行しており、円滑に進まないです。私は私のすべてのビルドスクリプト、私は私のbuild.xmlが私のpersistence.xmlファイルを含む次の私のMETA-INFディレクトリに私のjavaディレクトリに座っているkodo JPAクラスを拡張できません

BUILD FAILED 
D:\My Documents\eclipseWorkspaces\cnmp e341\blue ebig\ebig\src\java\build.xml:91: <openjpa-1.1.0-r422266:657916 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. 

を取得(日食3.4.1で)実行

ここ

のbuild.xmlの抜粋

<target name="enhance"> 
    <echo>base dir is ${basedir}</echo> 
    <!-- define the kodoc task; this can be done at the top of the --> 
    <!-- build.xml file, so it will be available for all targets  --> 
    <taskdef name="kodoc" classname="kodo.ant.PCEnhancerTask"/> 

    <!-- invoke enhancer on all .jdo files below the current directory --> 
    <kodoc> 
    <fileset dir="."> 
     <include name="**/jpa/*.java" /> 
     <include name="**/jpa/*.class" /> 
    </fileset> 
    <classpath> 
     <pathelement location="${basedir}"/> 
    </classpath> 
    </kodoc> 
</target> 

エンティティ・クラス・ファイルは、JPAのディレクトリにあります。 。

+ top 
    + src 
    + java 
    | + com 
    | + splat 
    | | + jpa 
    | | - entity.java 
    | | + stuff 
    |  - Object.java 
    | + META-INF 
    | - persistence.xml 
     - build.xml 

私はドキュメントの指示に従っていたと思っていたが、明らかに私はしませんでした。だから、ディレクトリ構造は次のようになります。

おかげ

答えて

0

この問題は、設定を追加することで修正されましたpropertiesFile = "../../のconfig/ebig.kodo.properties" それは今

<kodoc> 
    <config propertiesFile="../../config/ebig.kodo.properties"/> 
    <fileset dir="."> 
     <include name="**/jpa/*.java" /> 
     <include name="**/jpa/*.class" /> 
    </fileset> 
    <classpath> 
     <pathelement location="${basedir}"/> 
    </classpath> 
    </kodoc> 
+0

のように見えるタスクに/> 何あなたは 'ebig.kodo.properties'にいますか? – expert

+0

ebig.kodo.propertiesの内容を知りませんでした。プロジェクトは別の方向に進みました。 – Aaron

関連する問題