# The database URL has not been specified either as a parameter or in a properties file

**URL:** <https://forum.liquibase.org/t/the-database-url-has-not-been-specified-either-as-a-parameter-or-in-a-properties-file/6155>\
**Category:** Liquibase Development\
**Created:** [November 15, 2021, 4:14pm UTC](https://forum.liquibase.org/t/the-database-url-has-not-been-specified-either-as-a-parameter-or-in-a-properties-file/6155 "2021-11-15T16:14:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Onuk](https://avatars.discourse-cdn.com/v4/letter/o/779978/32.png) [@Onuk](https://forum.liquibase.org/u/Onuk)\
**Post date:** [November 15, 2021, 4:14pm UTC](https://forum.liquibase.org/t/the-database-url-has-not-been-specified-either-as-a-parameter-or-in-a-properties-file/6155/1 "2021-11-15T16:14:37Z")

</div>

Hello everyone!  
Please help me solve my problem …

```auto
[ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:4.6.1:update (default-cli) on project crudDataBaseApplication: The database URL has not been specified either as a parameter or in a properties file. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.liquibase:liquibase-maven-plugin:4.6.1:update (default-cli) on project crudDataBaseApplication: The database URL has not been specified either as a parameter or in a properties file.
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:568)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)

```

my pom file

```auto
    <build>
        <plugins>
            <plugin>
                <groupId>org.liquibase</groupId>
                <artifactId>liquibase-maven-plugin</artifactId>
                <version>4.6.1</version>
                <executions>
                    <execution>
                        <phase>process-resources</phase>
                        <configuration>
                            <propertyFile>./src/main/resources/liquibase.properties</propertyFile>
                            <promptOnNonLocalDatabase>false</promptOnNonLocalDatabase>
                        </configuration>
                        <goals>
                            <goal>update</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

```

my liquibase.propertires

```auto
changeLogFile=./src/main/resources/master.xml
driver=com.mysql.cj.jdbc.Driver
url=jdbc:mysql://localhost:3306/recruitment?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
username=root
password= *********
verbose=true
dropFirst=false

```

my dataBaseChangeLog file master.xml

```auto
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
        xmlns="http://www.liquibase.org/xml/ns/dbchangelog/1.9"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog/1.9
      http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd">
    <changeSet id="dateBaseOperations" author="Dmitry Polischuk">
        <sqlFile path="./src/main/resources/tables_creation.sql"/>
    </changeSet>
</databaseChangeLog>

```

running - mvn liquibase:update  
How i can fix this is error?

---

<div class="post-metadata">

**Author:** ![premierrange](https://avatars.discourse-cdn.com/v4/letter/p/e9c0ed/32.png) [@premierrange](https://forum.liquibase.org/u/premierrange)\
**Post date:** [November 18, 2021, 9:38am UTC](https://forum.liquibase.org/t/the-database-url-has-not-been-specified-either-as-a-parameter-or-in-a-properties-file/6155/2 "2021-11-18T09:38:43Z")

</div>

I don’t use maven at all but a quick google led me to [Using Liquibase and your Maven POM File | Liquibase Docs](https://docs.liquibase.com/tools-integrations/maven/using-liquibase-and-maven-pom-file.html)

It says " When using Liquibase and Maven, put your `liquibase.properties` and changelog files in the `src/main/resources` folder."

Also “As of version 1.6.1.0 of the Maven plugin, all files are resolved from the Maven test classpath for the Maven project or an absolute path.”

Then the example pom file:

target/classes/liquibase.properties

So it looks like your propertyFile value should not be “./src/…” which is a relative path. I’d suggest it’s not finding your liquibase.properties at all. You gave very cut-down output, are you sure there’s no “file not found” error before the exception trace you gave?

But, as I don’t use this tech, I can’t help further 🙂

---

<div class="post-metadata">

**Author:** ![aditi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.liquibase.org/aditi/32/356_2.png) [@aditi](https://forum.liquibase.org/u/aditi)\
**Post date:** [November 18, 2021, 4:01pm UTC](https://forum.liquibase.org/t/the-database-url-has-not-been-specified-either-as-a-parameter-or-in-a-properties-file/6155/3 "2021-11-18T16:01:16Z")

</div>

Hi @premierrange ,

IThe first thing I notice is the error saying liquibase cannot find the database url. If you look at the url mentioned in the liquibase.properties, there is no database mentioned. For example:  
`url: jdbc:mysql://localhost:3306/DB_NAME`

Kindly confirm if you have have database mentioned in the url.

---

<div class="post-metadata">

**Author:** ![Onuk](https://avatars.discourse-cdn.com/v4/letter/o/779978/32.png) [@Onuk](https://forum.liquibase.org/u/Onuk)\
**Post date:** [November 18, 2021, 9:03pm UTC](https://forum.liquibase.org/t/the-database-url-has-not-been-specified-either-as-a-parameter-or-in-a-properties-file/6155/4 "2021-11-18T21:03:35Z")

</div>

Hi, thanks for your feedback. My database is there and confirmed by a successful connection using java and jdbc.

```auto
connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/recruitment?useUnicode=true&serverTimezone=UTC", "root", " ********");

```

---

<div class="post-metadata">

**Author:** ![premierrange](https://avatars.discourse-cdn.com/v4/letter/p/e9c0ed/32.png) [@premierrange](https://forum.liquibase.org/u/premierrange)\
**Post date:** [November 19, 2021, 2:37am UTC](https://forum.liquibase.org/t/the-database-url-has-not-been-specified-either-as-a-parameter-or-in-a-properties-file/6155/5 "2021-11-19T02:37:44Z")

</div>

Hi @aditi, I’m not sure why you’re replying to me, I didn’t start this topic 😕 anyway, the original error didn’t say that it couldn’t find the database url, it said “The database URL has not been specified either as a parameter or in a properties file.” … this specified that the software looked for a database URL either as a parameter or in a properties file, but found neither.

The OP thinks he’s specifying the connection URL in a properties file, but there’s no sign in the error stack trace that the properties file was located and read. Failure to find it could cause the error given. That’s why I focused on the mechanism by which the properties file could be found, and suggested the relative path used to specify it could be incorrect.
