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
H2 DB & Binaries > 1MB #3673
Comments
I think so, i had problems with IntelliJs H2 browser, but checked it myself with the H2 Jar, and you are right! the interesting part is:
|
heh, so while investigating this, I stumbled across this: h2database/h2database#3457 and this: hapifhir/hapi-fhir-jpaserver-starter#328 Long story short, looks like bumping H2 will fix this as they've rolled the changes into 2.1.212. I would love to replicate this though instead of just blind-bumping the dependency. Could you possibly pastebin me the sample Binary Resource you are using if that works? |
Just try to load an IG, like IPS in the application.yaml, e.g.: https://gist.github.com/patrick-werner/1092e094c4026b4345467bb9db1ba3cf#file-application-yaml I tried it with H2 2.1.212, and it just works. Will create a PR. |
Thanks Patrick! Merged and added an attribution and changelog 👍🏻 |
Describe the bug
When using hapi with H2 DB with Binaries > 1MB size i get
Caused by: org.h2.jdbc.JdbcSQLDataException: Value too long for column "BINARY VARYING": "1f8b08000000000000ff447bc79283cab6e5bfdc291d81773dc37b0f0234c37b233cf4cf3775ce7b... (1095716)" [22001-210]
To Reproduce
Steps to reproduce the behavior:
Load a FHIR Package with a (Terminology) Resource > 1MB OR: Post a Binary > 1MB to hapi
Expected behavior
Binary will be persisted without any errors (like it works with postgres)
This seems to be caused by trying to persist a binary as byte[], which is restricted to max 1 MB in H2 version 2. This should be persisted as BLOB or CLOB.
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: