legacy-knowledge-base
公開されました Sep. 10, 2025

Liferay-Require-SchemaVersionが存在しないか正しくない場合、カスタムサービスビルダが一部の依存関係を満たすことができない

written-by

Daniel Carrillo Broeder

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

問題

カスタムService Builderモジュールをデプロイするときに、Liferay-Require-SchemaVersionが見つからないか、正しくないために依存関係の問題が発生しました。

GoGo シェルで ds:unsatisfied を実行すると、いくつかの問題が見つかる:

Bundle {id: 1735, name: com.liferay.example.service, version: 1.0.0}
	Declarative Service {id: 11529, name: com.liferay.example.service.impl.FooLocalServiceImpl, unsatisfied references: 
		{name: fooPersistence, target: null}
	}
	Declarative Service {id: 11530, name: com.liferay.example.service.impl.FooServiceImpl, unsatisfied references: 
		{name: fooLocalService, target: null}
		{name: fooPersistence, target: null}
	}
	Declarative Service {id: 11532, name: com.liferay.example.service.persistence.impl.FooPersistenceImpl, unsatisfied references: 
		{name: Configuration, target: (&(origin.bundle.symbolic.name=com.liferay.example.service)(name=service))}
	}

環境

  • Liferay DXP 7.4 u79+

解像度

  • Liferay-Require-SchemaVersion is required for each Service Builder > Liferay-Service module.

この方法では、 bnd.bnd を更新する必要がある:

  1. カスタムアップグレードプロセスのないサービスモジュール(デフォルト)
    • Liferay-Require-SchemaVersion は同じモジュールの "Bundle-Version" を満たす必要があります。
    • 例:
      Bundle-Name: example-service
      Bundle-SymbolicName: com.liferay.example.service
      Bundle-Version: 2.1.0
      Liferay-Require-SchemaVersion: 2.1.0
      Liferay-Service: true
      -dsannotations-options: inherit
  2. カスタムアップグレードプロセスを持つサービスモジュール
    • Liferay-Require-SchemaVersion はアップグレードプロセスの最新バージョンと同じでなければなりません。
    • カスタムアップグレードプロセスのバージョン "1.2.3 "のbnd.bndの例 :
      Bundle-Name: example-service
      Bundle-SymbolicName: com.liferay.example.service
      Bundle-Version: 2.1.0
      Liferay-Require-SchemaVersion: 1.2.3
      Liferay-Service: true
      -dsannotations-options: inherit

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base