XML Backup or Restore Fails due to Could not read fields for Table

お困りですか?

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

コミュニティに質問

プラットフォームについて: Data Center - この記事は、Data Center プラットフォームのアトラシアン製品に適用されます。

このナレッジベース記事は製品の Data Center バージョン用に作成されています。Data Center 固有ではない機能の Data Center ナレッジベースは、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。

*Fisheye および Crucible は除く

症状

During an xml backup or restore, one may see the following error:

The following errors may occur in the atlassian-jira.log:

An exception occurred backing up: java.lang.RuntimeException: Could not read fields for table AO_563AEE_ACTIVITY_ENTITY

...
2012-06-25 16:29:40,773 JiraImportTaskExecutionThread-1 ERROR user 989x582x1 dm7jj8 137.183.232.24 /secure/admin/XmlRestore.jspa [jira.bc.dataimport.DefaultDataImportService] Error importing data: java.lang.RuntimeException: Could not read fields for table AO_563AEE_ACTIVITY_ENTITY
java.lang.RuntimeException: Could not read fields for table AO_563AEE_ACTIVITY_ENTITY
	at net.java.ao.schema.helper.DatabaseMetaDataReaderImpl.getFields(DatabaseMetaDataReaderImpl.java:151)
	at net.java.ao.schema.ddl.SchemaReader.readFields(SchemaReader.java:125)
	at net.java.ao.schema.ddl.SchemaReader.readTable(SchemaReader.java:108)
...
Caused by: java.sql.SQLException: Invalid object name 'AO_563AEE_ACTIVITY_ENTITY'.
	at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368)
	at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2820)


原因

The currently only known cause of this error occurs with running JIRA on a MSSQL databases and specifically not setting a schema name.  The database will default this value to dbo, but this is not the same as setting the value to dbo explicitly.  This has also been known to happen during JIRA upgrades or migrations.  

___ Database Configuration ________________

     Loading entityengine.xml from                 : file:/C:/Program%20Files/Atlassian/JIRA/atlassian-jira/WEB-INF/classes/entityengine.xml
     Entity model field type name                  : mssql
     Entity model schema name                      : 
     Database Version                              : Microsoft SQL Server - 10.50.2500
     Database Driver                               : jTDS Type 4 JDBC Driver for MS SQL Server and Sybase - 1.2.4
     Database URL                                  : jdbc:jtds:sqlserver://sqlsvr:1433/jiradb1
     Database JDBC config                          : mssql jdbc:jtds:sqlserver://sqlsvr:1433/jiradb1


ソリューション

In the database configuration a proper schema name should be set. See Incorrect MS SQL Schema Used for further information.

Last modified on Mar 14, 2025

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

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