Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flyway "(unsupported protocol: war)" with Tomcat 8.0.41 and unpackWARs=false #1549

Closed
thomasmey opened this issue Mar 10, 2017 · 3 comments
Closed

Comments

@thomasmey
Copy link
Contributor

@thomasmey thomasmey commented Mar 10, 2017

Hi,

this Tomcat commit apache/tomcat80@7e767cc#diff-a72fb99b0729353084d2c437f749e718 broke Flyway in


with Tomcat config unpackWARs=false.
The returned URL is now war: instead of jar:

@thomasmey thomasmey closed this Mar 10, 2017
@thomasmey
Copy link
Contributor Author

@thomasmey thomasmey commented Mar 10, 2017

The fix from #1512 is incomplete as the JarFileClassPathLocationScanner will get used for protocol "war" but the protocol separator is then "*/" and not "!/", so getJarFromUrl() will fail to correctly determine the file name.

This whole code fragment looks very similar to https://github.com/spring-projects/spring-framework/blob/master/spring-core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java#L578 which has a similar bug reported in https://jira.spring.io/browse/SPR-15332

@axelfontaine
Copy link
Contributor

@axelfontaine axelfontaine commented Mar 12, 2017

Arrgghh!! OK, we'll have to adjust for this.

@axelfontaine axelfontaine added this to the Flyway 5.0.0 milestone Mar 12, 2017
axelfontaine added a commit to flyway/flywaydb.org that referenced this issue Apr 3, 2017
@axelfontaine
Copy link
Contributor

@axelfontaine axelfontaine commented Apr 3, 2017

Thanks for the PR! Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.