Regression 4.5.0 -> 4.6.1: valueBlobFile fails with "BLOB resource not found"
See original GitHub issueEnvironment
Liquibase Version: 4.6.1
Liquibase Integration & Version: Spring Boot 2.1.18.RELEASE
Database Vendor & Version: H2 1.4.200 (in-memory)
Operating System Type & Version: macOS Catalina (10.15.7)
Description
Spring Boot application can’t start and fails with an exception.
Steps To Reproduce
Run an application with ./mvnw spring-boot:run
Actual Behavior
liquibase.exception.MigrationFailedException: Migration failed for change set liquibase/version/0.4/2017-05-29--test_image.xml::add-test-image::php-coder:
Reason: liquibase.exception.DatabaseException: BLOB resource not found: /test/test.png
Expected/Desired Behavior
Migration should work as it worked before.
Additional Context
It has happened when I upgraded Liquibase from 4.5.0 to 4.6.1
Migration that has failed:
<changeSet id="add-test-image" author="php-coder" context="test-data">
<insert tableName="images_data">
<column name="image_id" valueNumeric="1" />
<column name="content" valueBlobFile="/test/test.png" />
</insert>
</changeSet>
The file it looks for (/test/test.png
) is here: src/main/resources/test/test.png
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:15 (2 by maintainers)
Top Results From Across the Web
rest - "404 Resource Not Found" From Azure Blob Storage ...
During a PUT request, with the proper Authorization header, which creates a new BLOB, my process is getting a "404 Resource Not Found"...
Read more >Use the Azure Storage Emulator for development and testing ...
The Microsoft Azure Storage Emulator is a tool that emulates the Azure Blob, Queue, and Table services for local development purposes.
Read more >Azure.Storage 4.3.1 - PowerShell Gallery
Version Downloads Last updated
4.6.1 26,839,837 10/9/2018
4.6.0 344,102 9/24/2018
4.5.0 769,952 8/14/2018
Read more >Azure.Storage.Blobs 12.14.1 - NuGet
This client library enables working with the Microsoft Azure Storage Blob service for storing binary and text data. For this release see notes ......
Read more >No known class method for selector 'startSession' - IssueHint
After installing and building the pods i face the build error 'No known class ... Regression 4.5.0 -> 4.6.1: valueBlobFile fails with "BLOB...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@famod said:
Yes, I agree. liquibase.util.file.FilenameUtils#concat()` in Liquibase 4.5.0 documents its contract:
The newer liquibase.util.FilenameUtil#concat() since Liquibase 4.6.0 does not document its contract and none of the tests use an absolute path for the second parameter, but the method behaves differently:
@nvoxland Could you please clarify if/how
liquibase.util.FilenameUtil#concat()
is intended to handle absolute paths for its second parameter?Good point if that’s the case (haven’t checked).
Btw, @php-coder I didn’t pay full attention to where your changelog file is located exactly. Since it’s located in
/src/main/resources/liquibase/version/0.4/
, you have to step up three levels:../../../test/test.png
But then again you probably don’t want to change your past changelogs anyway, right? 😉