Foren

Liferay servicebuilder and date objects

Sebastian Wikholm, geändert vor 9 Jahren.

Liferay servicebuilder and date objects

Regular Member Beiträge: 104 Beitrittsdatum: 10.03.11 Neueste Beiträge
Im having trouble with a portlet which uses servicebuilder. In Servicebuilder some objects are of the type "date" which i ofcourse need to set. I had a working version using those date objects on my dev server using liferay+mysql, when moving it to production on a liferay+mssql server i got the error:

11:40:46,979 ERROR [ajp-apr-8009-exec-25][JDBCExceptionReporter:82] Only dates between January 1, 1753 and December 31, 9999 are accepted.

Because of the levels of abstraction, i don not have direct control of what liferay does with its servicebuilder, but somehow it gets the date data wrong and mssql is not accepting it. There are some modelhints for the service builder, which might help:

show-time boolean sets whether to show inlcude time along with the date true
year-nullable boolean allows the year to be null in a date field false
year-range-delta integer specifies the number of years to display from today’s date in a date field rendered with the aui taglib 5
year-range-future boolean sets whether to include future dates true
year-range-past boolean sets whether to include past dates true

Does anyone have a clue why the dateobject does not work and if you do, is there anything i can do except go nuts emoticon
thumbnail
David H Nebinger, geändert vor 9 Jahren.

RE: Liferay servicebuilder and date objects

Liferay Legend Beiträge: 14917 Beitrittsdatum: 02.09.06 Neueste Beiträge
Hey Sebastien...

What JDBC driver are you using when accessing MS SQL? I've had more luck with the jtds driver instead of the MS jdbc driver...
Sebastian Wikholm, geändert vor 9 Jahren.

RE: Liferay servicebuilder and date objects

Regular Member Beiträge: 104 Beitrittsdatum: 10.03.11 Neueste Beiträge
The problem was that there was some bad data in AD where the dates were before 1753 and hence the error, thanks for the help anyways emoticon