0.41.1 causes exception when trying to read byte column from H2
See original GitHub issueThis commit turns even really short byte arrays into streams https://github.com/JetBrains/Exposed/commit/4a97034f0abfca04092e608ad99114e938e503e1
The call to reset on the input stream breaks Exposed with H2 because the InputStream implementation used by H2 doesn’t implement reset. It also seems a bit wasteful to create a stream each time.
Caused by: java.io.IOException: mark/reset not supported
at java.base/java.io.InputStream.reset(InputStream.java:733)
at java.base/java.io.FilterInputStream.reset(FilterInputStream.java:224)
at org.jetbrains.exposed.sql.statements.api.ExposedBlob.getBytes(ExposedBlob.kt:8)
Issue Analytics
- State:
- Created 10 months ago
- Reactions:2
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Issues · JetBrains/Exposed - GitHub
PGSQLSimpleException: 'could not serialize access due to concurrent update' ... 0.41.1 causes exception when trying to read byte column from H2.
Read more >JetBrains - Bountysource
This exception is thrown if multiple web service calls that act on the same data structures are executed at the same time. When...
Read more >Getting MappingException when reading TINYINT value from ...
The issue is that there is no converter from Byte (mapped to tinyint) to Boolean. I have also mapped Integer to Boolean (in...
Read more >Advanced - H2 Database Engine
When using the cluster modes, result sets are read fully in memory by the client, so that there is no problem if the...
Read more >Bug #4932: Error in reports after upgrade from H2 1.4.197 to ...
8 more [java] Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement "CREATE TABLE REPORT_CELL (RCID BIGINT, ROW[*] INT, ...
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
H2 implements “small” & “large” BLOBs differently and this issue affects large BLOBS only. Maybe you have no coverage for large BLOBs?
I have a demo: https://github.com/axle-h/exposed-issue-1633-demo
I’m using H2 version 2.1.214. Seems like H2 is using
org.h2.mvstore.StreamStore.Stream
that implementsInputStream
, but doesn’t implement the reset method.Seems like it is a good idea to avoid calling reset unless
markSupported
returns true.