Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7542673
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T08:13:46+00:00 2026-05-30T08:13:46+00:00

I can not specify the correct path to the directory with .sql files. I

  • 0

I can not specify the correct path to the directory with .sql files. I tried to set the “baseDir” attribute to different directories in different places (in classpath, of course) and set different classpath. Build scripts always falls with message “Unable to find path for sql migrations: [uri to directory with . sql files]”.

It’s not looking like issue 156 as was said in similar question, becourse if I delete the code in SqlMigrationResolver.java

if (StringUtils.hasText(baseDir) && !new ClassPathResource(baseDir + "/",
    classLoader).exists()) {
  LOG.warn("Unable to find path for sql migrations: " + baseDir);
  return migrations;
}

as was said in Comment #9 I still catch

deployDB:
[flyway:migrate] com.googlecode.flyway.core.exception.FlywayException: Error loading sql migration files
[flyway:migrate] Caused by java.io.FileNotFoundException: class path resource [db/migration/] cannot be resolved to URL because it does not exist

BUILD FAILED
c:\DeployTest\build.xml:208: Flyway Error: com.googlecode.flyway.core.exception.FlywayException: Error loading sql migration files

Flyway falls at

resources = new PathMatchingResourcePatternResolver(classLoader)
        .getResources("classpath:" + searchRoot + searchPattern);

It can not execute getResources method.

It’s not looking like bug, it’s looking like I can not set right uri to directory with my SQL scripts =(

Please, help me to set this damn uri!

My build.xml:

<target name="init-flyway">
  <taskdef uri="antlib:com.googlecode.flyway.ant"
           resource="com/googlecode/flyway/ant/antlib.xml"
  />
  <property name="flyway.driver" value="${dbDriver}"/>
  <property name="flyway.url" value="${dbUrl}"/>
  <property name="flyway.user" value="${dbScheme}"/>
  <property name="flyway.password" value="${dbPass}"/>
  <property name="flyway.baseDir" value="\db\migration"/>
  <property name="flyway.classpath" value="c:\DeployTest"/>
</target>

<target name="deployDB" depends="init-flyway">
  <flyway:migrate/>
</target>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T08:13:47+00:00Added an answer on May 30, 2026 at 8:13 am

    Try changing flyway.classpath from a property to a path.

    For your case this means changing this:

    <property name="flyway.classpath" value="c:\DeployTest"/>
    

    to this:

    <path id="flyway.classpath">
        <fileset dir="c:\DeployTest"/>
    </path>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can not run following SQL from ant's sql task : BEGIN DBMS_AQADM.CREATE_QUEUE_TABLE( queue_table =>
I can not locate the correct method to make the first item in a
Schema and table name in Postgres are case sensitive. How can I specify correct
When you create a procedure (or a function) in Oracle PL/SQL, you cannot specify
I know you can specify fieldsets in django for Admin helpers. However, I cannot
I can not distinguish the difference between aggregating and holding. What does it mean
I can not control the scrolling of a scrollpane from within my actionscript (I
I can not get to make this comparison in this simple code error ..
I can not get logs from some customers, can I use Google Urchin in
I can not seem to figure out how to count the number of seconds

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.