Issue
Dependency issues when deploying a custom Service Builder module, because Liferay-Require-SchemaVersion is missing or not correct.
Some issues are found after running ds:unsatisfied
in the GoGo shell:
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))} }
Environment
- Liferay DXP 7.4 u79+
Resolution
- Liferay-Require-SchemaVersion is required for each Service Builder > Liferay-Service module.
You will need to update bnd.bnd this way:
-
Service Modules with no custom upgrade process (by default):
- Liferay-Require-SchemaVersion should meet the "Bundle-Version" of the same module.
- Example:
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
-
Service Modules with custom upgrade processes:
- Liferay-Require-SchemaVersion should be equal to the upgrade process latest version.
- Example bnd.bnd with custom upgrade process version "1.2.3" :
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
Additional Information
Conteúdo Excluesivo para Assinantes
Uma Subscrição do Liferay Enterprise fornece acesso a mais de 1.500 artigos que incluem práticas recomendadas, solução de problemas e outras soluções valiosas. Faça login para obter acesso completo.
Entrar