Skip to content

Commit

Permalink
Early log entry for async EntityManagerFactory initialization failure
Browse files Browse the repository at this point in the history
Closes gh-26093
  • Loading branch information
jhoeller committed Nov 13, 2020
1 parent 500b54b commit 0b580d1
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -418,10 +418,13 @@ private EntityManagerFactory buildNativeEntityManagerFactory() {
String message = ex.getMessage();
String causeString = cause.toString();
if (!message.endsWith(causeString)) {
throw new PersistenceException(message + "; nested exception is " + causeString, cause);
ex = new PersistenceException(message + "; nested exception is " + causeString, cause);
}
}
}
if (logger.isErrorEnabled()) {
logger.error("Failed to initialize JPA EntityManagerFactory: " + ex.getMessage());
}
throw ex;
}

Expand Down

0 comments on commit 0b580d1

Please sign in to comment.