hi i have a springboot application in which i have written some junit test code i am using postgresql as db.when i do jenkins build i get following error in jenkins build
Caused by:
org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.autoconfigure.batch.BatchDataSourceScriptDatabaseInitializer]: Factory method 'batchDataSourceInitializer' threw exception; nested exception is java.lang.IllegalStateException: Unable to detect database type
at app//org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
at app//org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
... 107 more
Caused by:
java.lang.IllegalStateException: Unable to detect database type
at org.springframework.util.Assert.state(Assert.java:76)
i have following line in sonar.gradle
project.tasks[“sonarqube”].dependsOn “jacocoTestReport”