問題
- Liferay ポータル 6.2 から DXP 7.0 にアップグレードした後、ナレッジ ベース プラグインを展開すると、サーバーが以下のエラーをスローし始め、サイト コンテンツで KB プラグインを使用できません。
ERROR [localhost-startStop-1][ServiceConfiguratorImpl:161] Unable to initialize service component
com.liferay.portal.kernel.exception.OldServiceComponentException: Build namespace KB has build number 17 which is newer than 15
at com.liferay.portal.service.impl.ServiceComponentLocalServiceImpl.initServiceComponent(ServiceComponentLocalServiceImpl.java:172)
at sun.reflect.GeneratedMethodAccessor404.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:163)
at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:54)
at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
環境
- Liferay DXP 7.0
解決策
- ナレッジベース プラグインの互換性のないビルド番号が原因で、上記のエラーが発生しています。
-
ie デプロイ可能な KB プラグインは、データベース内の最大のビルド番号である必要があります。 データベースのビルド番号がデプロイ可能なプラグインよりも大きい場合、次のエラーが発生します。
"Build namespace KB has build number 17 which is newer than 15"
- 上記のメッセージでは、デプロイ可能な KB プラグインの buildNumber が 17 未満の 15 になっています。
- 同じ問題を解決するには、ビルド番号の値を減らしてデータベースを変更すると役立ちます。
以下の情報は完全に回避策です。 データベースを直接変更することは、推奨される方法ではありません。
ステップ 1: 以下のクエリを使用して、データベース内の buildNumber 値を取得します。
SELECT s.`buildNumber`, s.`mvccVersion`, s.`serviceComponentId`, s.`buildNamespace` FROM servicecomponent s where buildNamespace= "KB";
ステップ 2: 以下のステップに従うと、同じものを変更するのに役立ちます。
-
サーバーを停止します。1 DB のバックアップを取り、次のコマンドを します
- UPDATE DB_Name.ServiceComponent SET buildNumber = 12 WHERE serviceComponentId=22682;
- UPDATE DB_Name.ServiceComponent SET buildNumber = 13 WHERE serviceComponentId=1552102;
- UPDATE DB_Name.ServiceComponent SET buildNumber = 14 WHERE serviceComponentId=1562701;
ステップ 3: OSGI/marketplace フォルダーから KB プラグイン LPKG を、osgi/state、liferay_home/work、tomcat/work、tomcat/temp とともに削除します。
ステップ 4: サーバーを始動し、KB プラグインをデプロイします。