Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WARN of deprecation of org.hibernate.dialect of SQLServer2012Dialect #38905

Closed
darckyn opened this issue Dec 21, 2023 · 7 comments
Closed

WARN of deprecation of org.hibernate.dialect of SQLServer2012Dialect #38905

darckyn opened this issue Dec 21, 2023 · 7 comments
Labels
for: external-project For an external project and not something we can fix

Comments

@darckyn
Copy link

darckyn commented Dec 21, 2023

Hello.
I just migrated successful from Spring Boot version 2.7.9 to 3.2.1 and the following alerts are appearing:

2023-12-21 17:02:20.211  WARN 15160 --- [  restartedMain] o.h.o.deprecation                        : HHH90000025: SQLServer2012Dialect does not need to be specified explicitly using 'hibernate.dialect' (remove the property setting and it will be selected by default)
2023-12-21 17:02:20.211  WARN 15160 --- [  restartedMain] o.h.o.deprecation                        : HHH90000025: SQLServer2012Dialect does not need to be specified explicitly using 'hibernate.dialect' (remove the property setting and it will be selected by default)
2023-12-21 17:02:20.212  WARN 15160 --- [  restartedMain] o.h.o.deprecation                        : HHH90000026: SQLServer2012Dialect has been deprecated; use org.hibernate.dialect.SQLServerDialect instead

I use the SqlServer 2019 database and these are the application.properties settings:
(I applied IPs, ports, users and passwords just to give an example)

spring.datasource.url=jdbc:sqlserver://255.255.255.255:8095;encrypt=false
spring.datasource.hikari.catalog=DATA_BASE_EXAMPLE
spring.datasource.username=user.of.api
spring.datasource.password=aVeryNicePa$sw0rd
spring.datasource.hikari.connection-test-query=SELECT 1
spring.datasource.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver

spring.jpa.database=sql-server
spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
spring.jpa.open-in-view=true

Please, can help to resolve this warm?

I am available to send more information if necessary.

Thank you very much,

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Dec 21, 2023
@philwebb philwebb changed the title WARM of deprecation of org.hibernate.dialect of SQLServer2012Dialect WARN of deprecation of org.hibernate.dialect of SQLServer2012Dialect Dec 21, 2023
@philwebb
Copy link
Member

As far as I can tell Spring Boot does not set hibernate.dialect so I suspect this is something specific to your application. Please can you provide a sample application that replicates the problem?

@philwebb philwebb added the status: waiting-for-feedback We need additional information before we can continue label Dec 21, 2023
@philwebb
Copy link
Member

This might be a similar issue to spring-projects/spring-framework#31892

@snicoll
Copy link
Member

snicoll commented Dec 23, 2023

From what I've done recently, I confirm that a database platform or some tuning of JPA properties must be done for this to trigger. By default, Spring Boot does not specify a dialect and let Hibernate pick it (so that warning wouldn't show).

I've created spring-projects/spring-framework#31896 to review the dialects but please consider removing that customization in your project.

@darckyn
Copy link
Author

darckyn commented Dec 26, 2023

Hi @philwebb .

As requested, I made a project that reproduces the error.
With all the repositories that I use in the project in the pom file, and the application.properties settings

Just configure application.properties to correctly connect to the SqlServer 2019 database:

spring.datasource.url
spring.datasource.hikari.catalog
spring.datasource.username
spring.datasource.password

Follow the links:

https://drive.google.com/file/d/1a9BiU75s8dXo9N1q6z4A1N6u_Ts9IsBV/view
https://github.com/darckyn/sqlWarm
https://github.com/darckyn/sqlWarm/releases/tag/test
https://github.com/darckyn/sqlWarm/archive/refs/tags/test.zip

Thank you very much for your attention and help :)

I remain at your disposal for more information

@darckyn darckyn closed this as completed Dec 26, 2023
@darckyn
Copy link
Author

darckyn commented Dec 26, 2023

I just closed the issure by accident.
sorry

@darckyn darckyn reopened this Dec 26, 2023
@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Dec 26, 2023
@snicoll
Copy link
Member

snicoll commented Dec 26, 2023

@darckyn did you read my comment there? Have you tried removing the following:

spring.jpa.database=sql-server

@snicoll snicoll added status: waiting-for-feedback We need additional information before we can continue and removed status: feedback-provided Feedback has been provided labels Dec 26, 2023
@darckyn
Copy link
Author

darckyn commented Dec 26, 2023

Hi @snicoll.

@darckyn did you read my comment there? Have you tried removing the following:

spring.jpa.database=sql-server

I read it, but I didn't understand what you meant or which setting to adjust

I removed the mentioned setting and the alert stopped showing.

I also tested CRUD via the application and operations worked normally after removing the configuration.

Thank you very much for your attention, help and patience.

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Dec 26, 2023
@snicoll snicoll closed this as not planned Won't fix, can't repro, duplicate, stale Dec 26, 2023
@snicoll snicoll added for: external-project For an external project and not something we can fix and removed status: waiting-for-triage An issue we've not yet triaged status: feedback-provided Feedback has been provided labels Dec 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: external-project For an external project and not something we can fix
Projects
None yet
Development

No branches or pull requests

4 participants