Unable to retrieve timestampz from postgresql db [message #1774480] |
Mon, 16 October 2017 04:51  |
Eclipse User |
|
|
|
Hello,
I need to read a timestamptz field of a postgresql (9.6.5) table.
I receive the following error:
[javax.persistence.PersistenceException - Exception [EclipseLink-3005] (Eclipse Persistence Services - 2.7.0.v20170811-d680af5): org.eclipse.persistence.exceptions.ConversionException
Exception Description: Incorrect timestamp format: [2015-07-10 11:53:00+00] (expected [YYYY-MM-DD HH:MM:SS.NNNNNNNNN])]
The entity column is defined as follow:
@Column(name="time")
@Temporal(TemporalType.TIMESTAMP)
private Calendar time;
I'm able to persist but unable to retrieve. Weird...
I tried other java types (e.g. java.sql.Timestamp) without success.
The application run on openjdk version "1.8.0_144".
Any suggest?
Do I have to write a Converter?
Why the behaviour differ between persisting and finding?
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.07798 seconds