-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
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.
Activity
harawata commentedon May 17, 2024
Hello @MartinAlexanderKrul ,
Please edit the issue detail and include the entire stack trace.
sepe81 commentedon 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.
hazendaz commentedon Jul 12, 2025
@MartinAlexanderKrul I believe issue is now solved, we have released 3.0.5 that also supports spring boot 3.5.x. Please check and let us know if this was solved for you.
@sepe81 I think we need a redesign to even pick up ehcache 3 and from what I've heard around that never really worked out well. I'm pretty sure jcache even died and was not migrated to jakarta, could be wrong but that is what I've heard and also that ehcache 3 has serious flaws. I'd suggest using caffeine cache or some other caching.