掲示板

Liferay servicebuilder and date objects

9年前 に Sebastian Wikholm によって更新されました。

Liferay servicebuilder and date objects

Regular Member 投稿: 104 参加年月日: 11/03/10 最新の投稿
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
9年前 に David H Nebinger によって更新されました。

RE: Liferay servicebuilder and date objects

Liferay Legend 投稿: 14919 参加年月日: 06/09/02 最新の投稿
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...
9年前 に Sebastian Wikholm によって更新されました。

RE: Liferay servicebuilder and date objects

Regular Member 投稿: 104 参加年月日: 11/03/10 最新の投稿
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