From 907a2750b6dbecb708b70f59757811efd18d5360 Mon Sep 17 00:00:00 2001 From: Steve Ebersole Date: Thu, 4 Apr 2013 07:51:18 -0500 Subject: [PATCH] HHH-8138 - Log SQLException in DatabaseTarget with cause of schema export CREATE statement failure --- .../org/hibernate/jpa/internal/schemagen/DatabaseTarget.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hibernate-entitymanager/src/main/java/org/hibernate/jpa/internal/schemagen/DatabaseTarget.java b/hibernate-entitymanager/src/main/java/org/hibernate/jpa/internal/schemagen/DatabaseTarget.java index d28177c09a..93068cea6b 100644 --- a/hibernate-entitymanager/src/main/java/org/hibernate/jpa/internal/schemagen/DatabaseTarget.java +++ b/hibernate-entitymanager/src/main/java/org/hibernate/jpa/internal/schemagen/DatabaseTarget.java @@ -62,7 +62,8 @@ class DatabaseTarget implements GenerationTarget { } catch (SQLException e) { throw new PersistenceException( - "Unable to execute JPA schema generation create command [" + command + "]" + "Unable to execute JPA schema generation create command [" + command + "]", + e ); } } @@ -93,7 +94,7 @@ class DatabaseTarget implements GenerationTarget { } catch (SQLException e) { // Just log the error because drop commands are often unsuccessful because the tables do not yet exist... - log.warn( String.format( "Unable to execute JPA schema generation drop command [%s]", command ), e ); + log.warnf( "Unable to execute JPA schema generation drop command [" + command + "]", e ); } } }