Spring Jdbc not available from command line #783
I have detailed this issue in a question on StackOverflow, but it appears to be a bug, instead of a configuration issue, as best as I can see.
In short, I have a jar file with two java migrations in the same package. One implements JdbcMigration, and one implements SpringJdbcMigration. The former is picked up by the command line migrate command, the latter is not.
When running with debug mode, it shows "Spring Jdbc available: false" despite it also showing the spring-jdbc jar being added to the classpath just a few lines above.
Below, see the output from debug, copied from my StackOverflow question, and with a few notes added:
This same file is parsed fine when running Flyway within my application, but our process depends on running it externally, which likely means command line.
If this is a configuration issue on my end, or a bug, please let me know.
The text was updated successfully, but these errors were encountered:
So, I found a way to make it work, but it requires modification of the classpath in the "flyway" shell script, which seems dubious, and also requires the inclusion of FIVE dependencies, without which I either get the behavior described in the issue, or a ClassNotFoundException.
Specifically, I need to add the following libraries:
Is there a smarter way to do this? Is this documented anywhere?
It looks like it's trying to load all the jars, but I get a NoClassDefFoundError when I don't modify the classpath in the script:
Without modifying classpath:
After modifying the classpath:
EDIT: Added shell script debug output.