After upgrading to 5.4.5, it's no longer possible to bootstrap Hibernate if the org.hibernate.cfg LOG is set to DEBUG

Description

During startup, the following exception is thrown:

This is caused by this line in the Settings class:

It should be "%s", not "%":

Environment

None

Activity

Show:
Vlad Mihalcea
September 17, 2019, 6:12 PM

Looks like this commit has added the issue. Most likely, the issue was not detected because the log level is not set to debug.

Try setting it to debug:

log4j.logger.org.hibernate.cfg=debug

Sanne Grinovero
September 17, 2019, 6:44 PM

good catch, thanks !

Sanne Grinovero
September 17, 2019, 6:44 PM

there’s a second similar mistake from the same commit. Fixing both..

Vlad Mihalcea
September 17, 2019, 6:47 PM
Edited

No problem. I wanted to upgrade one of my projects to the latest version, and all tests were failing since I’m using DEBUG log level by default.

Sanne Grinovero
September 17, 2019, 7:55 PM

I see the problem and it’s trivial to fix, but also it looks like it’s only reproducible with SLF4J. The other logging backends seem to just silently discard invalid formats.

I’ll fix this now on faith, will need to figure out a reliable way to prevent such issues across the board.

Assignee

Sanne Grinovero

Reporter

Vlad Mihalcea

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure