MSSQL: The stream value is not the specified length. The specified length was 7, the actual length is 0.

Description

After updating Hibernate from 3.6.2 to 4.1.10, I get the following exception:
The stream value is not the specified length. The specified length was 7, the actual length is 0.

Since this happened in the middle of our application I created a sample application to reproduce this.

I had started a forum topic https://forum.hibernate.org/viewtopic.php?f=1&t=1025471&start=0
but nobody answered, probably it was described too vague.
Now with the example project, the issue can be reproduced very easily.

Environment

MSSQL 2008 RC2, Spring 3.0.5, Jenks, jdk1.7.0_21

Status

Assignee

Lukasz Antoniak

Reporter

Flavio Donzé

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Blocker
Configure