legacy-knowledge-base
公開されました Jun. 30, 2025

Data Migration Center使用時にJSONTファイルのパラメータ形式が見つからない

written-by

Kartik Singh

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

問題



Batch Client Extensionは "JSONT "ファイル形式のみをサポートします。 オブジェクトエントリーの「JSONT」ファイルを生成した後、生成されたJSONTファイルには、オブジェクトエントリーのインポートに必要ないくつかのパラメータがありません。

  1. "containsHeaders":"false" --> "containsHeaders":"true"
  2. "createStrategy":"INSERT" --> "createStrategy":"UPSERT"
  3. taskDelegateName:"C_<ObjectName>" --> shift this parameter after the “updateStrategy":"UPDATE"}”
以下はそのフォーマットである。
  • デフォルトのJSONTパラメータ形式:-。
{"containsHeaders":"false","createStrategy":"INSERT","importStrategy":"ON_ERROR_FAIL","taskItemDelegateName":"C_ShipObject","updateStrategy":"UPDATE"},"userId":20123,"version":"v1.0"}
  • JSONTパラメータ形式変更後
{"containsHeaders":"true","createStrategy":"UPSERT","importStrategy":"ON_ERROR_FAIL","updateStrategy":"UPDATE"},"taskItemDelegateName":"C_ShipObject","userId":20123,"version":"v1.0"}
上記のパラメータがインポート・オブジェクト・エントリーの「JSONT」ファイルに存在しない場合、エントリーは別のインスタンスに作成されません。 JSONT」ファイルが生成されるたびに、上記のパラメータを含むように手動で編集する必要がある。
再現の手順
  1. "client-extension-workspace"という名前でWorkspaceフォルダを作成します。
  2. ターミナルで"client-extension-workspace"ディレクトリを開き、以下のコマンドを実行する。
    blade init -v dxp-7.4-u102
  3. ワークスペースが作成される。
  4. 次に、"client-extension-workspace "ディレクトリに "client-extensions "フォルダと "bundles "フォルダを作成します。
  5. client-extensions "フォルダに "batch "フォルダと "client-extension.yaml "ファイルを作成し、"client-extension.yaml "ファイルに以下のデータを追加する。
  6. 同じLiferayを "bundles "フォルダに展開し、パスをコピーします。
  7. gradle.properties "ファイルを開き、"lifeary.workspace.home.dir = /home/.../client-extension-workspace/bundles "プロパティを追加し、保存する。
  8. Liferayサーバーを起動し、以下の手順に従ってください:
    a) Navigate to the Control Panel-> Object and create an object by the name ShipObject.
    b) After the "ShipObject" is created, open the same object, open the "field" tab, and create a field with the "Text" type.
    c) Open the "Details" tab and go to the "SCOPE" section, select the "Panel Link" Control Panel->Object.
    d) Publish the "ShipObject" object.
    e) Navigate to the “Control Panel-> Object-> Ship Object”, click on "+" button, and add an entry.
    f) Navigate to the “Instance Settings-> PLATFORM-> Feature Flags-> VIRTUAL INSTANCE SCOPE-> Beta” and enable the "Data Migration Center".
    g) Navigate to the "Applications-> Data Migration Center", click on "+" and select the "Export File".
    h) Select the "C_ShipObject" in the "Entity Type" section, select the "JSONT" format in the "Export File Format" and export the object entry.
    i) Again follow the (e) step, go to the Ship Object, and delete the existing entry.
  9. 上記の手順でエクスポートしたファイルを解凍し、「export.batch-engine-data.json」ファイルをコピーして、「client-extension-workspace/client-extensions/batch」ディレクトリに移動し、「export.batch-engine-data.json」ファイルを貼り付けます。
  10. ターミナルで "client-extension-workspace/client-extensions "パスに移動し、"blade gw build "コマンドを実行し、このコマンドの後に "blade gw deploy "コマンドを実行する。
  11. Liferayサーバーのコンソールログを開くと、以下の "INFO "が表示されます:
    024-02-05 09:56:39.370 INFO  [fileinstall-directory-watcher][BundleStartStopLogger:68] STARTED clientextensions_7.4.13 [1431]
    2024-02-05 09:56:39.552 INFO  [CM Event Dispatcher (Fire ConfigurationEvent: pid=com.liferay.oauth2.provider.configuration.OAuth2ProviderApplicationHeadlessServerConfiguration~liferay-sample-batch-oauth-application-headless-server)][InterpolationConfigurationPlugin:135] Replaced value of configuration property 'homePageURL' for PID com.liferay.oauth2.provider.configuration.OAuth2ProviderApplicationHeadlessServerConfiguration~liferay-sample-batch-oauth-application-headless-server
    2024-02-05 09:56:39.709 INFO  [CM Event Dispatcher (Fire ConfigurationEvent: pid=com.liferay.oauth2.provider.configuration.OAuth2ProviderApplicationHeadlessServerConfiguration~liferay-sample-batch-oauth-application-headless-server)][OAuth2ProviderApplicationHeadlessServerConfigurationFactory:176] OAuth 2 application with external reference code liferay-sample-batch-oauth-application-headless-server and company ID 20095 has client ID id-1c9a9a82-cd19-2993-fd6c-a538d5973549
  12. Liferay UIを開き、"Control Panel-> Object-> Ship Object "に移動し、ページを更新すると、エントリが表示されません。
  13. その後、"export.batch-engine-data.json "ファイルの以下のパラメータを変更し、再度 "blade gw deploy "コマンドを実行する。
    {"containsHeaders":"true","createStrategy":"UPSERT","importStrategy":"ON_ERROR_FAIL","updateStrategy":"UPDATE"},"taskItemDelegateName":"C_ShipObject","userId":20123,"version":"v1.0"}
  14. 12番目のステップをもう一度行い、ページを更新すると、エントリーが表示されます。

注:"client-extension.yaml "ファイルを添付します。

観察された動作:しかし、ユーザーが「JSONT」ファイルを修正すると、エントリーが作成され、表示されるようになります。
期待される動作:ユーザーがオリジナルの「JSONT」ファイルをデプロイすると、エントリーが作成され、表示されます。

環境
  • DXP 2023.Q4.0 四半期リリース以上

解像度

  • 観測された動作は既知のバグであり、LPD-17470によって対処されている: LPD-17470.
  • Hotfixが必要な場合、またはこの件に関する詳細については、パッチの詳細を添付してHotfixをリクエストするサポートチケットを作成してください。
  • Liferay DXPへの修正パックとHotfixのインストール を参照してください。
did-this-article-resolve-your-issue

legacy-knowledge-base