From 96777b22055a750b37dc0ca8d3c333b1d979e1fb Mon Sep 17 00:00:00 2001 From: Donald Woods Date: Mon, 1 Jun 2009 17:42:14 +0000 Subject: [PATCH] OPENJPA-1068 cleanup trace/log output to only include the exception message and not the stack trace for optional validator creation failures git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@780746 13f79535-47bb-0310-9956-ffa450edef68 --- .../openjpa/persistence/PersistenceProductDerivation.java | 4 +--- .../org/apache/openjpa/persistence/localizer.properties | 5 +++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java b/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java index a56bf9553..bd5f16473 100644 --- a/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java +++ b/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java @@ -201,9 +201,7 @@ public class PersistenceProductDerivation // unexpected, but validation is optional, // so just log it as a warning conf.getConfigurationLog().warn( - _loc.get("vlem-creation-warn")); - // if tracing, log the exception details - conf.getConfigurationLog().trace(e); + _loc.get("vlem-creation-warn", e.getMessage())); } } } else { diff --git a/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/localizer.properties b/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/localizer.properties index c2aef7d06..68a7363d6 100644 --- a/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/localizer.properties +++ b/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/localizer.properties @@ -196,7 +196,8 @@ invalid-orderBy: This is not a valid OrderBy annotation. The property or \ dynamic-agent: OpenJPA dynamically loaded the class enhancer. Any classes \ that were not enhanced at build time will be enhanced when the are \ loaded by the JVM. -vlem-creation-warn: Failed to create the optional Validation Provider. +vlem-creation-warn: Could not create the optional validation provider. \ + Reason returned: "{0}" vlem-creation-error: A fatal error occurred while trying to \ - create the required Validation Provider. + create the required validation provider.