liquibase.exception.DatabaseException: ORA-01950: 对表空间没有权限 'VMSS_TBS'

liquibase.exception.DatabaseException: ORA-01950: no privileges on tablespace 'VMSS_TBS'

最初我在启动服务时收到此异常

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

我尝试设置补助金,但这对我不起作用。 有人可以帮我吗?

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>

并确保您已被授予 Connect、Resources 角色,因为您需要创建 table 权限。