EDIT: I am able to run the same configuration from the flyway commandline tool, but not from the ant task.
I have a flyway configuration which works on my oracle database. I am in the process of setting up flyway on my SQL-Server database. Flyway hangs when I try any ant task. Including info which should be used to test connection to the database.
Flyway seems to hang when I run it. When executing any ant tasks the verbose log stops with “[flyway:info] DDL Transactions Supported: true” as shown in the end of the log I have posted at the end of this post. Flyway sits there not doing any thing at this point. Which leads me to believe it is having an issue getting the schema. Because the next log line should be “[flyway:info] Schema: SchemaName” if I remember.
Here are the versions of what I am using
- Flyway: 2.0.4
- SQL-Server: SQL-Server 2008 Express R2
- microsoft jdbc: sqljdbc-4.0
databse-init log:
-init:
[property] Loading ..\database\database-build.properties
parsing buildfile jar:file:../apache-ant-1.8.2/lib/ant-contrib-1.0b3.jar!/net/sf/antcontrib/antlib.xml with URI = jar:file:../apache-ant-1.8.2/lib/ant-contrib-1.0b3.jar!/net/sf/antcontrib/antlib.xml from a zip file
[property] Loading ..database\database-placeholders-testclient.properties
-validate:
-echo:
[echo] Selected database [platform] for DB migration : mssql
[echo] Selected database [user] for DB migration : sa
[echo] Selected database [password] for DB migration : flyway
[echo] Selected database [schemas] for DB migration : dbo
[echo] Database [jdbc driver class name] for DB migration : com.microsoft.sqlserver.jdbc.SQLServerDriver
[echo] Database [connection URL] for DB migration : jdbc:sqlserver://localhost;databaseName=TEST_DB;applicationName=Flyway
database-info:
parsing buildfile jar:file:../apache-ant-1.8.2/lib/flyway-ant-2.0.3.jar!/com/googlecode/flyway/ant/antlib.xml with URI = jar:file:../apache-ant-1.8.2/lib/flyway-ant-2.0.3.jar!/com/googlecode/flyway/ant/antlib.xml from a zip file
[flyway:info] Database: Microsoft SQL Server 10.50
[flyway:info] DDL Transactions Supported: true
I found the issue. My ant environment was using Java build 1.6.0_29 and while using flyway via command line it was using Java build 1.6.0_37 . When I changed my ant environment to 1.6.0_37 it worked. I am using Microsoft JDBC Driver 4.0.