I'm trying to create blob via Hibernate 4.3.5 API. H2 1.4.190 in-memory.
Originally code was written for Oracle DB and now we are trying to use H2
for unit testing.
Blob blob = Hibernate.getLobCreator(hibernateSession).createBlob(new byte[]{0});
blob.setBinaryStream(1);
During createBlob() stack is following:
at org.h2.value.ValueLobDb.<init>(ValueLobDb.java:75)
at org.h2.value.ValueLobDb.createSmallLob(ValueLobDb.java:667)
at org.h2.value.ValueLobDb.createSmallLob(ValueLobDb.java:654)
at org.h2.store.LobStorageMap.createBlob(LobStorageMap.java:162)
at org.h2.jdbc.JdbcConnection.createBlob(JdbcConnection.java:1826)
at org.h2.jdbc.JdbcBlob.setBytes(JdbcBlob.java:124)
at
org.hibernate.engine.jdbc.ContextualLobCreator.createBlob(ContextualLobCreator.java:68)
And precision is set to 1 in constructor (because of single byte array used as
createBlob argument?). Next setBinaryStream(1) throws exception.
Am I doing something incorrectly or is this H2 issue?
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.