最初我在啟動服務時遇到了這個例外
An attempt was made to call a method that does not exist. The attempt was made from the following location:
org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration$LiquibaseConfiguration.liquibase(LiquibaseAutoConfiguration.java:105)
The following method did not exist:
liquibase.integration.spring.SpringLiquibase.setLiquibaseSchema(Ljava/lang/String;)V
The method's class, liquibase.integration.spring.SpringLiquibase, is available from the following locations:
jar:file:/C:/Users/ashish/.gradle/caches/modules-2/files-2.1/org.liquibase/liquibase-core/3.5.5/c65051f327382018bd09c30380f25eac96f210da/liquibase-core-3.5.5.jar!/liquibase/integration/spring/SpringLiquibase.class
It was loaded from the following location:
file:/C:/Users/ashish/.gradle/caches/modules-2/files-2.1/org.liquibase/liquibase-core/3.5.5/c65051f327382018bd09c30380f25eac96f210da/liquibase-core-3.5.5.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of liquibase.integration.spring.SpringLiquibase
我的依賴
buildscript {
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}"
classpath "com.oracle.database.jdbc:ojdbc8:$oracleVersion"
classpath ("org.liquibase:liquibase-gradle-plugin:1.2.4")
}
}
dependencies {
compile "org.springframework.cloud:spring-cloud-starter-netflix-eureka-client"
compile "org.springframework.cloud:spring-cloud-starter-netflix-hystrix"
compile 'org.springframework.boot:spring-boot-configuration-processor'
compile "org.springframework.boot:spring-boot-starter-validation"
compile "org.springframework.boot:spring-boot-starter-data-jpa"
compile "org.liquibase:liquibase-core:3.5.5"
}
我可以通過洗掉 liquibase-core 版本來解決這個問題,就像這樣
compile ("org.liquibase:liquibase-core")
現在,當我運行我的服務時,這次我面臨特權問題并且無法弄清楚
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [org/springframework/boot/autoconfigure/liquibase/LiquibaseAutoConfiguration$LiquibaseConfiguration.class]: Invocation of init method failed; nested exception is
liquibase.exception.LockException: liquibase.exception.DatabaseException: ORA-01950: no privileges on tablespace 'VMSS_TBS'
[Failed SQL: INSERT INTO VMSSTXN.DATABASECHANGELOGLOCK (ID, LOCKED) VALUES (1, 0)]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean
我嘗試設定贈款,但這對我不起作用。有人可以在這里幫助我嗎?
uj5u.com熱心網友回復:
在Oracle Docs中,此錯誤表示:
ORA-01950: no privileges on tablespace 'string'
Cause: User does not have privileges to allocate an extent in the specified tablespace.
Action: Grant the user the appropriate system privileges or grant the user space resource on the tablespace.
根據dba-oracle.com,您可以通過以下任一方式解決 ORA-01950:
ALTER USER <username> QUOTA 100M ON <tablespace name>
或者
GRANT UNLIMITED TABLESPACE TO <username>
并確保您已被授予連接、資源角色,因為您需要創建表權限。
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/479444.html
上一篇:新格式build.gradle?
