XML Import to MS SQL fails due to a GenericEntityException - Date Format Error

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

If an XML import is attempted to a JIRA instance running on MS SQL and the export that is being used is from a different database (MySQL, Oracle), the import can fail with an error denoting a format issue for the date.

The following may appear in the log files.

org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:Worklog][id,39489][body,Time logged][author,<<authorname>>][startdate,0001-01-01 10:00:00.0][updated,2011-03-18 12:06:18.0][created,2011-03-18 12:06:18.0][issue,56509][timeworked,600][updateauthor,<<authorname>>] (SQL Exception while setting value: (Only dates between January 1, 1753 and December 31, 9999 are accepted.))

原因

This is caused by the date time formats used by the different databases and the XML exporter uses the format from the database which is not understood by the target database.

回避策

  • Open the XML backup in a text editor of your choice.
  • Edit those entries which has invalid date format which does not have the year component included. For example the below:

    0012-04-12 00:50:39.0

    Should be changed to:

    2012-04-12 00:50:39.0

(info) Additionally please check the existing bug report below which addresses this issue.

JRA-25825 - 課題詳細を取得中... ステータス

Last modified on Mar 30, 2016

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.