I have a SpringBoot application that worked nicely with MariaDB connector version 2.7.6. I tried to upgrade the connector to version 3.0.6 and it throws an error:
Failed to instantiate [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean]: Factory method 'entityManagerFactory' threw exception; nested exception is java.lang.RuntimeException: Driver org.mariadb.jdbc.Driver claims to not accept jdbcUrl, jdbc:mysql://localhost:3306/dbname
My application.properties are:
spring.datasource.url=jdbc:mysql://localhost:3306/dbname
spring.datasource.username=username
spring.datasource.password=password
spring.datasource.driverClassName=org.mariadb.jdbc.Driver
My Gradle dependencies are
dependencies {
testImplementation 'junit:junit:4.13.2'
testImplementation('org.junit.vintage:junit-vintage-engine'){
exclude group: 'org.hamcrest', module:'hamcrest-core'
}
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
testImplementation ('org.springframework.boot:spring-boot-starter-test'){
exclude group: "com.vaadin.external.google", module:"android-json"
}
implementation 'org.mariadb.jdbc:mariadb-java-client:2.7.6' // when 3.0.6 it is not working
implementation 'org.json:json:20220320'
}
Any idea?