ProKey doesn't work

I set liquibaseProLicenseKey directly to pom

<liquibaseProLicenseKey>ABwwG...</<liquibaseProLicenseKey>

and tried through the
<propertyFile>liquibase.properties</propertyFile>
liquibase.properties includes liquibaseProLicenseKey: ABwwG

I ran my project and its failed with messages:
Validation Failed with message "Change Type ‘pro:createFunction’ is not allowed without a valid Liquibase Pro License.

Hi @rolton ,

May I confirm that you are just using ABwwG… as a stub for the actual key? Also, are you putting your pro key in both the liquibase properties file AND the maven pom?

Yes

No when i tried to put key directly to pom i didn’t add it to properies and vise versa

full pom config

<configuration>
    <changeLogFile>${project.basedir}/src/main/resources/config/liquibase/master.xml</changeLogFile>
    <diffChangeLogFile>${project.basedir}/src/main/resources/config/liquibase/changelog/${maven.build.timestamp}_changelog.xml</diffChangeLogFile>
    <driver>org.postgresql.Driver</driver>
    <url>jdbc:postgresql://localhost:5432/FreshHipster</url>
    <defaultSchemaName></defaultSchemaName>
    <username>FreshHipster</username>
    <password></password>
    <referenceUrl>hibernate:spring:domain.folder?dialect=org.hibernate.dialect.PostgreSQL9Dialect&amp;hibernate.physical_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy&amp;hibernate.implicit_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy</referenceUrl>
    <verbose>true</verbose>
    <logging>debug</logging>
    <contexts>!test</contexts>
    <liquibaseProLicenseKey>ABwwGg...</liquibaseProLicenseKey>

 </configuration>  

option with liquibase.properties

<configuration>
  <propertyFile>liquibase.properties</propertyFile>
<diffChangeLogFile>${project.basedir}/src/main/resources/config/liquibase/changelog/${maven.build.timestamp}_changelog.xml</diffChangeLogFile>
<verbose>true</verbose>
<logging>debug</logging>
<contexts>!test</contexts>
</configuration>

placed it in same directory as pom.xml

changeLogFile: ${project.basedir}/src/main/resources/config/liquibase/master.xml
url: jdbc:postgresql://localhost:5432/FreshHipster
username: FreshHipster 
password: 
driver: org.postgresql.driver
referenceUrl: hibernate:spring:domain.folder?dialect=org.hibernate.dialect.PostgreSQL9Dialect&amp;hibernate.physical_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy&amp;hibernate.implicit_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy
liquibaseProLicenseKey: ABwwG...

Hi @rolton.
This is Steve from the LB Pro support team.

  1. After adding the pro key, did you run mvn package? If not, please do. Then try to run your liquibase command.
  2. If this didn’t help, please provide me with your email and I’ll reach out to you from our support system since you are subscribed to a liquibase Pro trial.
    Thanks!

Hello,I did package and run my spring boot app. Still asking for key
Change Type ‘pro:createFunction’ is not allowed without a valid Liquibase Pro License.
It works when i use tool through cmd .

If the error happens during the “mvn packge”, it is probably because Liquibase is trying to run the “update” command during that time.

  1. You will have to first remove that changest “pro:createFunction” from the changelog.
  2. Then run “mvn package”
  3. Then add back the changeset with the “pro:createFunction” to the changelog.

When i do package there are no errors ,errors happens when i run spring boot app.
For now i use this config
versions

 <liquibase.version>4.3.1</liquibase.version>
 <liquibase-hibernate5.version>4.3.0.1</liquibase-hibernate5.version>

plugin

<plugin>
	<groupId>org.liquibase</groupId>
	<artifactId>liquibase-maven-plugin</artifactId>
	<version>${liquibase.version}</version>
	<configuration>
		<changeLogFile>${project.basedir}/src/main/resources/config/liquibase/master.xml</changeLogFile>
		<diffChangeLogFile>${project.basedir}/src/main/resources/config/liquibase/changelog/${maven.build.timestamp}_changelog.xml</diffChangeLogFile>
		<driver>org.postgresql.Driver</driver>
		<url>jdbc:postgresql://localhost:5432/FreshHipster</url>
		<defaultSchemaName/>
		<username>FreshHipster</username>
		 <password></password>
		<referenceUrl>hibernate:spring:kz.csi.stat.csc.modules.dict.data?dialect=org.hibernate.dialect.PostgreSQL9Dialect&amp;hibernate.physical_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy&amp;hibernate.implicit_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy</referenceUrl>
		<verbose>true</verbose>
		<logging>debug</logging>
		<contexts>!test</contexts>
		<liquibaseProLicenseKey>ABwwGgQUaRQ4M3GxrOZ3GgoiscIuwqJOYHoCAgQAEyxKXBKjbSzV2+ch7fYfe4n56kgssgOx/jjhJgdB9YyclbhdCy9aPM2EgmUvofjySF94HKvug3yTqInr12frTu2s4Bv1047SVeDBf3nX0U/LOTkv9MVUVSPMCp0rmCaocl/sgdRpvOCHZCwfhZzG4a45yCU778IiD1y6U05U4PcMYiiIoTrukygBl/folKG0xqz98jpLM7Mv4oQEfU8urUyUSHcSKyZHnEZX0OEmTA0eAhSaWO5NkDKVIALbfXSwSpmRZQslkT+bnUHt66BsIOy1U0L/wGRb2lfYzwHWZ52jILcACNzxWfIdpHAUfk3YAeDtOu6fKp1sG27Th6JJPwwSpB1WO73vb/78YkV8sKgh7q5XayJ3Em9LUtHf9P5eTr7Rp3yXyKUkFpQlL48pIdP85zHAJyytLeAmLqK0BcSZsYkfHSdsmyZgMi4iW35cxwoZUVzyDugkcHNEXIfZU81WSv1urluyBMqhuGjqeMyAqbRYCOaaCHMAbXKlClcXxMDRdfYuzJHsD6Hfw7mnarzAxNAb87OibcK0tnfpcu5SnRb6UyBUiEM2RslJAchWlHEsXA9faDOwjtPThs/APm7WGCcpcWMa4imcvYudG8Zo/YP5MyqeVErUC/XIE7yvFrKQrMsLJ2PjheTtZFZrlA==</liquibaseProLicenseKey>
	</configuration>
.
.
.

dependency

<dependency>
            <groupId>org.liquibase</groupId>
            <artifactId>liquibase-core</artifactId>
            <version>${liquibase.version}</version>
        </dependency>

[This was resolved with the Liquibase support team]
We currently don’t have support for spring application with the Liquibase Pro key. Meaning, there is no place to add the pro key in the application.properties file.
The workarounds would be:

  1. run “mvn liquibase:update” to the target database prior to the app startup
    OR
  2. Use “sqlFile” change type instead of using the pro:createFunction change types
    OR
  3. Generate a formatted SQL changeLog to begin with so you don’t end up with the incompatible pro:createFunction without a proper pro key.
1 Like

I just was dumb and you put me on right way,I was launching app ignoring maven
so I needed starting it as mvn spring-boot:run

1 Like