From 838b53bfce1511a8a63ffbc460f8b71e511227f1 Mon Sep 17 00:00:00 2001 From: Heath Thomann Date: Thu, 10 Jan 2013 23:16:55 +0000 Subject: [PATCH] OPENJPA-2236: Put try/catch around connection info trace in DBDictionary - back ported Jeremy Bauer's trunk changes to 2.0.x. git-svn-id: https://svn.apache.org/repos/asf/openjpa/branches/2.0.x@1431723 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/openjpa/jdbc/sql/DBDictionary.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java index 454ff63ad..430d8d07a 100644 --- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java +++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java @@ -445,10 +445,15 @@ public class DBDictionary if (log.isTraceEnabled()) { log.trace(DBDictionaryFactory.toString(metaData)); - if (isJDBC3) - log.trace(_loc.get("connection-defaults", new Object[]{ - conn.getAutoCommit(), conn.getHoldability(), - conn.getTransactionIsolation()})); + if (isJDBC3) { + try { + log.trace(_loc.get("connection-defaults", new Object[]{ + conn.getAutoCommit(), conn.getHoldability(), + conn.getTransactionIsolation()})); + } catch (Throwable t) { + log.trace("Unable to trace connection settings", t); + } + } } // Configure the naming utility