gradle build failed due to dependency lock state

1.3k Views Asked by At

i have newly added a below dependency into my project

implementation 'org.jdbi:jdbi3-oracle12:3.29.0'

these are the dependencies which i already have in my project.

dependencies {
implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.springframework.boot:spring-boot-starter-jdbc'
implementation 'org.springframework.data:spring-data-jpa'
implementation 'org.hibernate:hibernate-core'
// Oracle JDBC drivers
implementation("com.oracle.database.jdbc:ojdbc11")
implementation("com.oracle.database.jdbc:ucp")
// Additional Jars for using Oracle Wallets
implementation("com.oracle.database.security:oraclepki")
implementation("com.oracle.database.security:osdt_core")
implementation("com.oracle.database.security:osdt_cert")
implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation 'javax.xml.bind:jaxb-api:2.3.1'
implementation 'io.micrometer:micrometer-registry-prometheus'
implementation 'org.jdbi:jdbi3-core:3.28.0'
implementation 'org.jdbi:jdbi3-oracle12:3.29.0'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.mockito:mockito-inline:4.5.1'
}

while adding the new dependency and doing gradle build. i'm getting the below error. can some one guide me how to fix this?

Execution failed for task ':compileJava'. Could not resolve all files for configuration ':compileClasspath'. Resolved 'org.jdbi:jdbi3-oracle12:3.29.0' which is not part of the dependency lock state Resolved 'com.oracle.database.jdbc:ojdbc8:21.3.0.0' which is not part of the dependency lock state

1

There are 1 best solutions below

1
On

Delete the lock file.

Run gradle build --write-locks