Error log messages should be included in CoreMessageLogger for i18n purpose

Description

I have found that in hibernate-core, multiple error level log messages are outputted directly without using jboss annotations. According to HHH-9839, they should all be fixed according to recommended approach to generate internationalizable error messages.

I list the files and lines of the problematic logging code here, along with the line number

hibernate-core/src/main/java/org/hibernate/id/enhanced/TableStructure.java (2 instances)

1 2 3 4 5 140 if ( !selectRS.next() ) { 141 final String err = "could not read a hi value - you need to populate the table: " + tableNameText; 142 LOG.error( err ); ... 148 LOG.error( "could not read a hi value", sqle );

hibernate-core/src/main/java/org/hibernate/proxy/AbstractLazyInitializer.java (1 instance)

1 232 LOG.error( "Initialization failure [" + entityName + "#" + id + "]", e );

hibernate-core/src/main/java/org/hibernate/service/internal/AbstractServiceRegistryImpl.java (1 instance)

1 302 log.error( "NPE injecting service deps : " + service.getClass().getName() );

hibernate-core/src/main/java/org/hibernate/type/spi/TypeConfiguration.java (1 instance)

1 244 log.errorf( e, "Cannot register [%s] Hibernate Type contribution", basicType.getName() );

hibernate-core/src/main/java/org/hibernate/engine/internal/EntityEntryContext.java (3 instances)

1 2 3 4 5 6 7 8 9 497 catch (NoSuchMethodException e) { 498 log.errorf( "Enable to deserialize [%s]", entityEntryClassName ); 499 } 500 catch (InvocationTargetException e) { 501 log.errorf( "Enable to deserialize [%s]", entityEntryClassName ); 502 } 503 catch (IllegalAccessException e) { 504 log.errorf( "Enable to deserialize [%s]", entityEntryClassName ); 505 }

Environment

None

Status

Assignee

Unassigned

Reporter

Nemo

Fix versions

None

Labels

backPortable

None

Suitable for new contributors

Yes, likely

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Priority

Minor