question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@Lob doesn't work with MSSQL

See original GitHub issue

Version

4.3.1

Context

When I try to insert a byte[] of more than 8000 bytes, I get the following exception:

 io.vertx.mssqlclient.MSSQLException: {number=8016, state=24, severity=16, message='The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Parameter 4 ("@P1"): Data type 0xA5 has an invalid data length or metadata length.', serverName='e7af36c1ac41', lineNumber=1}

The entity definition is:

public class Document extends PanacheEntity {
    @Lob
    public byte[] data;

    @Column(length = 32)
    public String sha256;

    public Long size;
}

Everything works fine up to 8000 bytes, but not with more than 8000. I tried various solutions like @Column(length=1024*1024) and lots of other things, but I cannot make it work. Using Quarkus with Panache Reactive.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
DavideDcommented, Jun 9, 2022

I don’t think this is a problem with the client, when I test this with just HIbernate Reactive (without Quarkus), it seems to work fine. But I will have a look.

0reactions
s-seidelcommented, Jun 13, 2022

Ah, thanks guys. I was finally able to force the project to use all vertx 4.3.1 components (realized that I had declared it but quarkus overrode the version) and it works fine there. Thanks. Quarkus 2.10.0.CR1 still includes 4.2.7 though, so I guess we’ll have to wait until they upgrade.

Read more comments on GitHub >

github_iconTop Results From Across the Web

FIX: Data corruption occurs when LOB data is loaded into a ...
Fixes an issue in which data corruption occurs when you load LOB data into a Transact-SQL variable. This issue occurs in SQL Server...
Read more >
java - "could not initialize a collection" + @Lob + MSSQL
When using Blob-fields in n-to-m-relations Hibernate and MSSQL are failing for some reason. SQL Error: 421, SQLState: S0001 The image data type ...
Read more >
SQL Server unusual behavior on LOB insertion
During this problem rest of discrete data operations and small LOB insertion queries work fine. Version: SQL Server 2008 R2 Service Pack 3 ......
Read more >
Understanding SQL Server LOB data storage - Kimberly Tripp
This post looks at how SQL Server LOB data is stored physically inside the database and how to move LOB data storage to...
Read more >
COPY-LOB with Dataserver for MS SQL does not copy from a ...
COPY-LOB with Dataserver for MS SQL does not copy from a dynamic BLOB field to a dynamic BLOB field. When database has table...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found