NoClassDefFoundError thrown on PatchInconsistencyException when Service JAR is not patched correctly

This article documents new exception handling and new methods to the portal-service.jar introduced in LPS-57207. This is designed to check whether the patch level in the portal-impl.jar is the same as the portal-service.jar. If they are not the same, this will throw a NoClassDefFoundError message will occur upon portal startup.

An example is if the portal-service.jar (a portal dependency) is not patched at all, or patched with an earlier patch than liferay-fixpack-portal-46-6130, or patched with liferay-fixpack-portal-64-6210 but not with LPE-14145.

Resolution

To resolve this issue, please verify the Patching Tool's configuration file default.properties within the Patching Tool folder and make sure that the paths are set correctly and reinstall the patch you used.

war.path=../tomcat-7.0.42/webapps/ROOT/
global.lib.path=../tomcat-7.0.42/lib/ext/
(where the portal-service.jar can be found)

Additional Information

Expected behavior in the patching logs when inconsistent patch level is detected:

16:47:58,228 ERROR [localhost-startStop-1][PatcherImpl:166] Inconsistent patch level detected
16:47:58,228 WARN [localhost-startStop-1][PatcherImpl:174] Patch level on portal-impl.jar: [hotfix-10831-6210]
16:47:58,229 WARN [localhost-startStop-1][PatcherImpl:184] Patch level on portal-service.jar: [administration-7-6210, asset-framework-10-6210, business-productivity-2-6210, collaboration-12-6210, development-6-6210, document-management-10-6210, dynamic-data-lists-10-6210, misc-5-6210, platform-24-6210, search-9-6210, social-networking-4-6210, user-interface-17-6210, wcm-core-16-6210, web-content-12-6210]
16:47:58,232 ERROR [localhost-startStop-1][MainServlet:210] Stopping the server due to the inconsistent patch levels
...

If the patch on portal-service.jar did not include LPS-57207, then you will face similar error on startup:

015.08.26. 13:10:09 org.apache.catalina.core.ContainerBase addChildInternal
SEVERE: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
...
Caused by: java.lang.ClassNotFoundException: com.liferay.portal.kernel.patcher.PatchInconsistencyException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
... 25 more
...
¿Fue útil este artículo?
Usuarios a los que les pareció útil: 0 de 0