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

Initially I was getting this exception while starting my service

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


My dependencies

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"
}

I was able to fix this by removing liquibase-core version , like this

compile ("org.liquibase:liquibase-core")

Now when I run my service, this time I am facing privileges issue and not able to figure it out


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

I tried setting grants but that didn't worked for me. Can someone please help me here ?



Solution 1:[1]

In the Oracle Docs, this error says:

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.

According to dba-oracle.com you can solve ORA-01950 by either:

ALTER USER <username> QUOTA 100M ON <tablespace name>

or

GRANT UNLIMITED TABLESPACE TO <username>

And make sure you have been granted Connect, Resources roles because you'll need Create table privileges.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 tabbyfoo