You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by aw...@apache.org on 2006/08/21 18:53:52 UTC
svn commit: r433281 - in /incubator/openjpa/trunk/openjpa-kernel/src/main:
java/org/apache/openjpa/meta/MetaDataRepository.java
resources/org/apache/openjpa/conf/localizer.properties
resources/org/apache/openjpa/meta/localizer.properties
Author: awhite
Date: Mon Aug 21 09:53:51 2006
New Revision: 433281
URL: http://svn.apache.org/viewvc?rev=433281&view=rev
Log:
JIRA: OPENJPA-14
Applied patch (with some minor corrections).
Modified:
incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataRepository.java
incubator/openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/conf/localizer.properties
incubator/openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/meta/localizer.properties
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataRepository.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataRepository.java?rev=433281&r1=433280&r2=433281&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataRepository.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataRepository.java Mon Aug 21 09:53:51 2006
@@ -1285,8 +1285,12 @@
}
public void endConfiguration() {
- if (_factory == null)
- setMetaDataFactory(_conf.newMetaDataFactoryInstance());
+ if (_factory == null) {
+ MetaDataFactory mdf = _conf.newMetaDataFactoryInstance();
+ if (mdf == null)
+ throw new MetaDataException(_loc.get("no-metadatafactory"));
+ setMetaDataFactory(mdf);
+ }
}
//////////////////
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/conf/localizer.properties
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/conf/localizer.properties?rev=433281&r1=433280&r2=433281&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/conf/localizer.properties (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/conf/localizer.properties Mon Aug 21 09:53:51 2006
@@ -541,4 +541,7 @@
specifications. You must have a META-INF/services/{0} file in your \
classpath listing the available derivation classes, and some listed class \
must be instantiable. Typically this file is bundled as part of the \
- distribution. Have you unbundled it, or unbundled its listed classes?
+ distribution. Have you unbundled it, or unbundled its listed classes? \
+ If you are using ant, a common solution to this problem is to place \
+ the jar libraries of the OpenJPA distribution in the \
+ ${user.home}/.ant/lib directory.
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/meta/localizer.properties
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/meta/localizer.properties?rev=433281&r1=433280&r2=433281&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/meta/localizer.properties (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/meta/localizer.properties Mon Aug 21 09:53:51 2006
@@ -257,3 +257,6 @@
group "{0}".
unknown-fg: Attempt to add fetch group "{0}" to type field "{1}" failed. \
This fetch group has not been defined.
+no-metadatafactory: No configuration properties were found. If you are \
+ using Ant, please see the <properties> or <propertiesFile> attributes \
+ of the task''s nested <config> element.