[JIRA] (HHH-15768) incorrect deprecation warning being logged: HHH90000021: Encountered deprecated setting [javax.persistence.sharedCache.mode], use [jakarta.persistence.sharedCache.mode] instead
by JB Nizet (JIRA)
JB Nizet ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%... ) *updated* an issue
Hibernate ORM ( https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiZWM2MDIwZDQ1... ) / Bug ( https://hibernate.atlassian.net/browse/HHH-15768?atlOrigin=eyJpIjoiZWM2MD... ) HHH-15768 ( https://hibernate.atlassian.net/browse/HHH-15768?atlOrigin=eyJpIjoiZWM2MD... ) incorrect deprecation warning being logged: HHH90000021: Encountered deprecated setting [javax.persistence.sharedCache.mode], use [jakarta.persistence.sharedCache.mode] instead ( https://hibernate.atlassian.net/browse/HHH-15768?atlOrigin=eyJpIjoiZWM2MD... )
Change By: JB Nizet ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%... )
The following warning message is being logged when starting an application (with a basic Spring Boot 3 application, but I don’t think it matters):
HHH90000021: Encountered deprecated setting [javax.persistence.sharedCache.mode], use [jakarta.persistence.sharedCache.mode] instead
But this setting has never been explicitly set anywahere anywhere.
I’ve tracked down the place where this warning is logged. It’s in MetadataBuilderImpl, line 626: [https://github.com/hibernate/hibernate-orm/blob/main/hibernate-core/src/m...]
Analyzing the code, it gets a setting, specifies a default value in case the setting has not been set, which is SharedCacheMode.UNSPECIFIED, and then, when getting this default value, logs a warning saying that this this value is deprecated.
( https://hibernate.atlassian.net/browse/HHH-15768#add-comment?atlOrigin=ey... ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-15768#add-comment?atlOrigin=ey... )
Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.... ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailN... ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100210- sha1:eab5823 )
1 year, 5 months
[JIRA] (HHH-15768) incorrect deprecation warning being logged: HHH90000021: Encountered deprecated setting [javax.persistence.sharedCache.mode], use [jakarta.persistence.sharedCache.mode] instead
by JB Nizet (JIRA)
JB Nizet ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%... ) *created* an issue
Hibernate ORM ( https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiYTkyZGVjZjBl... ) / Bug ( https://hibernate.atlassian.net/browse/HHH-15768?atlOrigin=eyJpIjoiYTkyZG... ) HHH-15768 ( https://hibernate.atlassian.net/browse/HHH-15768?atlOrigin=eyJpIjoiYTkyZG... ) incorrect deprecation warning being logged: HHH90000021: Encountered deprecated setting [javax.persistence.sharedCache.mode], use [jakarta.persistence.sharedCache.mode] instead ( https://hibernate.atlassian.net/browse/HHH-15768?atlOrigin=eyJpIjoiYTkyZG... )
Issue Type: Bug Affects Versions: 6.1.5 Assignee: Unassigned Components: hibernate-core Created: 26/Nov/2022 07:18 AM Priority: Minor Reporter: JB Nizet ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%... )
The following warning message is being logged when starting an application (with a basic Spring Boot 3 application, but I don’t think it matters):
HHH90000021: Encountered deprecated setting [javax.persistence.sharedCache.mode] , use [jakarta.persistence.sharedCache.mode] instead
But this setting has never been explicitly set anywahere.
I’ve tracked down the place where this warning is logged. It’s in MetadataBuilderImpl, line 626: https://github.com/hibernate/hibernate-orm/blob/main/hibernate-core/src/m... ( https://github.com/hibernate/hibernate-orm/blob/main/hibernate-core/src/m... )
Analyzing the code, it gets a setting, specifies a default value in case the setting has not been set, which is SharedCacheMode.UNSPECIFIED, and then, when getting this default value, logs a warning saying that this this value is deprecated.
( https://hibernate.atlassian.net/browse/HHH-15768#add-comment?atlOrigin=ey... ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-15768#add-comment?atlOrigin=ey... )
Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.... ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailN... ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100210- sha1:eab5823 )
1 year, 5 months