I narrowed down the root cause. It was due to the following bug in the `org.jboss.logging:jboss-logging:3.3.2.Final`(which is one of the dependencies of Hibernate): Changing the highlighted pat to this.messageFactory.newMessage(String.valueOf(message)) would fix the bug. The bug only shows up in log4j2. It seems not an issue for log4j, though. I am gonna create a PR at https://github.com/jboss-logging/jboss-logging soon. |