# Liquibase changelog generation failing with Springboot and H2

**URL:** <https://forum.liquibase.org/t/liquibase-changelog-generation-failing-with-springboot-and-h2/7190>\
**Category:** General Discussion\
**Created:** [August 16, 2022, 2:05pm UTC](https://forum.liquibase.org/t/liquibase-changelog-generation-failing-with-springboot-and-h2/7190 "2022-08-16T14:05:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![saurav40](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@saurav40](https://forum.liquibase.org/u/saurav40)\
**Post date:** [August 16, 2022, 2:05pm UTC](https://forum.liquibase.org/t/liquibase-changelog-generation-failing-with-springboot-and-h2/7190/1 "2022-08-16T14:05:30Z")

</div>

Hi All,

I am trying to setup Liquibase in the already existing spring boot application. I am using embedded H2 database persisted in a file.

I am using liquibase maven pluging to generate the changelog file. Below is my section of pom.xml containing liquibase maven plugin details.

```auto
<plugin>
    <groupId>org.liquibase</groupId>
    <artifactId>liquibase-maven-plugin</artifactId>
    <version>3.4.1</version>
   <configuration>
        <changeLogFile>
           /src/main/resources/liquibase-outputChangeLog.xml
        </changeLogFile>
        <driver>org.h2.Driver</driver>
        <url>jdbc:h2:file:~/taskapp</url>
        <username>sa</username>
        <password>password</password>
     </configuration>               
</plugin> 

```

Liquibase dependency

```auto
<dependency>
    <groupId>org.liquibase</groupId>
     <artifactId>liquibase-core</artifactId>
      <version>3.4.1</version>
</dependency>

```

Now i am trying to generate the changelog file by firing the maven command

mvn liquibase:generateChangeLog

But i get the following error in the console

```auto
Failed to execute goal org.liquibase:liquibase-maven-plugin:4.9.1:generateChangeLog (default-cli) on project tasklist: The database URL has not been specified either as a parameter or in a properties file.

```

Best Regards,

Saurav

---

<div class="post-metadata">

**Author:** ![tabbyfoo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.liquibase.org/tabbyfoo/32/748_2.png) [@tabbyfoo](https://forum.liquibase.org/u/tabbyfoo)\
**Post date:** [August 30, 2022, 7:43pm UTC](https://forum.liquibase.org/t/liquibase-changelog-generation-failing-with-springboot-and-h2/7190/2 "2022-08-30T19:43:17Z")

</div>

> [@saurav40](#):
>
> `The database URL has not been specified`

I found a similar question on StackOverflow: [java - Error: The database URL has not been specified either as a parameter or in a properties file when trying to perform a rollback - Stack Overflow](https://stackoverflow.com/questions/66478954/error-the-database-url-has-not-been-specified-either-as-a-parameter-or-in-a-pro)

It was answered by @rakhi with this:

- instead of providing all database properties inside tag of pom.xml, create “liquibase.properties” and populate various properties relevant to liquibase(DB) in this file. For help with creating “liquibase.properties” file, visit [this link](https://docs.liquibase.com/workflows/liquibase-community/creating-config-properties.html)
- Try using configuration similar to below in your existing pom.xml file:

```auto
    <modelVersion>4.0.0</modelVersion>
        <groupId>com.my-group.app</groupId>
        <artifactId>Liqui<SampleDb>-app</artifactId>
        <version>1.0-SNAPSHOT</version>
        <build>
            <pluginManagement>
                <plugins>
                    <plugin>
                        <groupId>org.liquibase</groupId>
                        <artifactId>liquibase-maven-plugin</artifactId>
                        <version>3.9.0</version>
                        <configuration>
                            <propertyFile>liquibase.properties</propertyFile>
                        </configuration>
                        <dependencies>
                          <dependency>
                              <groupId><db_type></groupId>
                              <artifactId><db_type></artifactId>
                          </dependency>
                      </dependencies>
                    </plugin>
                </plugins>
            </pluginManagement>
        </build>

```

- You could also try the following way by correcting your existing pom file. [This link](https://docs.liquibase.com/tools-integrations/maven/maven-pom-file.html) says to include liquibase attributes inside `<configuration>` section. May be try surrounding the liquibase attributes in your POM file in `<configuration>` section as below:

```auto
<configuration>
    <changeLogFile>changelog.xml</changeLogFile>
    <url>MyJDBCConnection</url>
    <username>dbuser</username>
    <password>dbpassword</password>
</configuration>

```

_Yes, DB password is required for configuration_
