openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r798338 - in /openjpa/trunk: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/conf/ openjpa-persistence/src/main/java/org/apache/openjpa/persistence/ openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/
Date Tue, 28 Jul 2009 00:03:50 GMT
Author: dwoods
Date: Tue Jul 28 00:03:50 2009
New Revision: 798338

URL: http://svn.apache.org/viewvc?rev=798338&view=rev
Log:
OPENJPA-1076 Log current exceptions being thrown by PersistenceProviderImpl.createEMF

Modified:
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/conf/TestSpecificationConfiguration.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java
    openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/localizer.properties

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/conf/TestSpecificationConfiguration.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/conf/TestSpecificationConfiguration.java?rev=798338&r1=798337&r2=798338&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/conf/TestSpecificationConfiguration.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/conf/TestSpecificationConfiguration.java
Tue Jul 28 00:03:50 2009
@@ -64,6 +64,8 @@
             fail("Expected to fail with higher Spec version");
         } catch (PersistenceException ex) {
             // good
+            emf.getConfiguration().getLog("Tests").trace(
+                "Caught expected PersistenceException = " + ex);
         }
     }
     

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java?rev=798338&r1=798337&r2=798338&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java
Tue Jul 28 00:03:50 2009
@@ -80,6 +80,7 @@
      * when doing this lookup, regardless of the name specified in the XML
      * resource or the name of the jar that the resource is contained in.
      * This does no pooling of EntityManagersFactories.
+     * @return EntityManagerFactory or null
      */
     public OpenJPAEntityManagerFactory createEntityManagerFactory(String name,
         String resource, Map m) {
@@ -102,7 +103,9 @@
             loadValidator(_log, conf);
             return JPAFacadeHelper.toEntityManagerFactory(factory);
         } catch (Exception e) {
+            _log.error(_loc.get("create-emf-error", name), e);
             throw PersistenceExceptions.toPersistenceException(e);
+            //return null;
         }
     }
 

Modified: openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/localizer.properties
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/localizer.properties?rev=798338&r1=798337&r2=798338&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/localizer.properties
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/localizer.properties
Tue Jul 28 00:03:50 2009
@@ -194,7 +194,6 @@
     loaded by the JVM.
 vlem-creation-info: OpenJPA dynamically loaded a validation provider.
 no-embeddable-metadata: Unable to load metadata for embeddable class "{0}".
-<<<<<<< .mine
 
 param-missing: {0} is not declared in query "{1}". \
     Declared parameter keys are "{2}".
@@ -222,3 +221,5 @@
 tuple-alias-not-found: Alias "{0}" was not found in this tuple. Aliases found : "{1}"
 tuple-exceeded-size : Attempt to read TupleElement {0} when there are only {1} elements available
 tuple-stop-thinking-in-python: Currently we do not support negative indexes into a Tuple.

+create-emf-error: Failed to create a provider for "{0}".
+



Mime
View raw message