Issue
- After upgraded from Liferay portal 6.2 to DXP 7.0, when deploying the Knowledge base plugin, server started throwing the below error and KB plugin is not available in the site content.
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)
Environment
- Liferay DXP 7.0
Resolution
- The incompatible build number of Knowledge base plugin is causing the above mentioned error.
-
i.e. The deployable KB plugin should be the highest build number in Database. If the database is having the highest build number than a deployable plugin, the below error will come.
"Build namespace KB has build number 17 which is newer than 15"
- In the above message, deployable KB plugin is having the buildNumber 15 which is less than 17.
- In order to resolve the same, altering the database by reducing the build number value would help.
The below information is completely for a workaround. Modifying the database directly is never a recommended approach:
Step 1: To get the buildNumber values in the database using below query.
SELECT s.`buildNumber`, s.`mvccVersion`, s.`serviceComponentId`, s.`buildNamespace` FROM servicecomponent s where buildNamespace= "KB";
Step 2: Following the below step would help to alter the same.
-
Stop the server, take a backup of DB and execute the following commands:
- 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;
Step 3: Delete the KB plugin LPKG from OSGI/marketplace folder, along with osgi/state, liferay_home/work, tomcat/work, tomcat/temp.
Step 4: Start the server and deploy the KB plugin.