No database found to handle jdbc:as400://...

AgostinoAgostino Posts: 1 New member
edited January 10, 2023 1:10AM in Flyway (General Discussion)
I'm trying to configure flyway to connect to a DB2 iSeries. 
I put the driver jar (jt400.jar) into flyway's drivers directory.

I wrote a flyway.config file with the following content in my project directory.

flyway.locations=filesystem:.
flyway.url=jdbc:as400://192.168.1.1/MYSCHEMA;naming=system;errors=full
flyway.driver=com.ibm.as400.access.AS400JDBCDriver
flyway.user=MYSCHEMA
flyway.password=*****************

I launched the flyway command from that directory, with the -X flag for gettin additional debug information.

PS C:\Users\alex\Documents\myprj> flyway migrate -X
DEBUG: Loading config file: C:\Program Files\Red Gate\Flyway Desktop\flyway\conf\flyway.conf
DEBUG: Unable to load config file: C:\Users\alex\flyway.conf
DEBUG: Loading config file: C:\Users\alex\Documents\myprj\flyway.conf
DEBUG: Using configuration:
DEBUG: flyway.driver -> com.ibm.as400.access.AS400JDBCDriver
DEBUG: flyway.jarDirs -> C:\Program Files\Red Gate\Flyway Desktop\flyway\jars
DEBUG: flyway.locations -> filesystem:.
DEBUG: flyway.password -> *****************
DEBUG: flyway.url -> jdbc:as400://192.168.1.1/MYSCHEMA;naming=system;errors=full
DEBUG: flyway.user -> MYSCHEMA
ERROR: Unexpected error
org.flywaydb.core.api.FlywayException: No database found to handle jdbc:as400://192.168.1.1/MYSCHEMA;naming=system;errors=full
        at org.flywaydb.core.internal.database.DatabaseTypeRegister.getDatabaseTypeForUrl(DatabaseTypeRegister.java:441)
        at org.flywaydb.core.internal.jdbc.DriverDataSource.<init>(DriverDataSource.java:496)
        at org.flywaydb.core.internal.jdbc.DriverDataSource.<init>(DriverDataSource.java:476)
        at org.flywaydb.core.api.configuration.ClassicConfiguration.configure(ClassicConfiguration.java:2062)
        at org.flywaydb.core.api.configuration.FluentConfiguration.configuration(FluentConfiguration.java:1341)
        at org.flywaydb.commandline.Main.getLegacyConfiguration(Main.java:675)
        at org.flywaydb.commandline.Main.main(Main.java:509)


Using netstat I determined that it doesn't even try to connect to the db. 
It seems that it can't associate the driver with my URL. I tried also omitting the following line in the flyway.config.

flyway.driver=com.ibm.as400.access.AS400JDBCDriver

Same result.


Tagged:

Answers

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file