openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andrea patricelli <>
Subject Problem with Date type and MS SQL Server 2012
Date Thu, 05 Dec 2013 13:18:45 GMT

I've an annoying problem with MS SQL Server 2012. I've an entity with an attribute of type
java.util.Date annotated with @Temporal(TemporalType.TIMESTAMP).
I was testing my web application with a set of databases, with MySql and PostgreSql all right,
but when I configured my datasource to use MS SQL Server database probelms began.
I've this exception when OpenJpa creates tables first time I launch web app:

Caused By

"" declares a column that is not
compatible with the expected type "timestamp".  Column details:
Full Name: UsersInfo.snapshot
Type: unknown(-9)
Size: 27
Default: null
Not Null: false

It seems there is some problem with date conversion or interpretation by MS SQL Server. I
googled but I found only partial and not working solutions. Can you help me?

Best Regards,


View raw message