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

Combability with Spring Boot 3 #971

Open
MartinAlexanderKrul opened this issue May 17, 2024 · 2 comments
Open

Combability with Spring Boot 3 #971

MartinAlexanderKrul opened this issue May 17, 2024 · 2 comments

Comments

@MartinAlexanderKrul
Copy link

Hello there.

I have a compatibility issue.
Before I was using Spring Boot v2.7.18, Spring v5.3.31 with mybatis-spring-boot-starter v3.0.1 and everything was perfect.

Due to policy, I had to upgrade to Spring Boot v3.2.3, Spring v6.1.4, which led to a problem with factoryBeanObjectType so I updated the starter to version 3.0.3 and here it comes my problem.

Even with the exact same configuration, ibatis can not find jdcb connection
Message: null, cause: org.apache.ibatis.exceptions.PersistenceException: \r\n### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection\r\n### The error may exist in .../Mapper.java (best guess)\r\n### The error may involve ...Mapper.getAll\r\n### The error occurred while executing a query\r\n### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection

Did anyone have the same problem? Is there any solution for it?

I have standard database connection properties in application.properties

spring.datasource.url=jdbc:sqlserver://myServer;databaseName=myDatabse;encrypt=false;integratedSecurity=true;
spring.datasource.driverclassname=com.microsoft.sqlserver.jdbc.SQLServerDriver
spring.datasource.max_active=20
spring.datasource.minimum_idle=1
spring.datasource.maximum_pool_size=20

Thank you all for your time.

@harawata
Copy link
Member

Hello @MartinAlexanderKrul ,

Please edit the issue detail and include the entire stack trace.

@sepe81
Copy link

sepe81 commented May 17, 2024

@MartinAlexanderKrul I guess you are referring to mybatis/spring#855 – for me mybatis-spring-3.0.3 solved the issue. Maybe you could further update to Spring Boot v3.2.5.

If you also use ehcache-cache, mybatis/ehcache-cache#61 could be another issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants