RE: Failed upgrade process for Liferay (6.2 to 7.2)

Sam Collett, modified 5 Years ago. New Member Posts: 20 Join Date: 11/11/19 Recent Posts
I am currently getting a few errors when trying to upgrade from 6.2 to 7.2 on a test environment and am unsure how to proceed and the steps to fix the errors (either via the API, or in the database directly). 

I am using the Tomcat version of Liferay. It starts OK with a blank/new database, but not with the one I am trying to upgrade.
The first error I get is related to the blogs service:
2019-11-18 16:15:00.755 ERROR [main][ReleaseManagerOSGiCommands:144] Failed upgrade process for module com.liferay.blogs.servicecom.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.exception.InvalidRepositoryException: com.liferay.portal.kernel.repository.UndeployedExternalRepositoryException: Unable to load external repository class com.liferay.portal.repository.portletrepository.PortletRepository because its plugin is not deployed

What is this plugin, and how would you deploy it, considering the blank site has no issues with blogs?
com.liferay.portal.repository.portletrepository.PortletRepository

There is also an error with the content targeting module:
2019-11-18 16:15:34.001 ERROR [main][ReleaseManagerOSGiCommands:144] Failed upgrade process for module com.liferay.segments.content.targeting.upgrade com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.segments.exception.SegmentsEntryNameException

DDMStorageLink
2019-11-18 16:33:06.721 ERROR [main][VerifyProcessTrackerOSGiCommands:295] com.liferay.portal.verify.VerifyException: com.liferay.dynamic.data.mapping.exception.NoSuchStorageLinkException: No DDMStorageLink exists with the key {classPK=267641}com.liferay.portal.verify.VerifyException: com.liferay.dynamic.data.mapping.exception.NoSuchStorageLinkException: No DDMStorageLink exists with the key {classPK=267641}

Plus several missing image files (only about 3):
2019-11-18 16:35:40.038 ERROR [ForkJoinPool-1-worker-11][ImageImpl:69] Error reading image 5606013
com.liferay.document.library.kernel.exception.NoSuchFileException: {companyId=0, repositoryId=0, fileName=5606013.png, cause=java.io.FileNotFoundException: D:\liferay\7.2migrate\data\document_library\0\0\56\06\01\5606013.png\5606013_1.0.png (The system cannot find the path specified)}

I can log in, but there are several missing portlets and none of the document libraries work. Though I am in the Administrator I can't do anything with the sites (e.g. add/remove portlets)
thumbnail
Alberto Chaparro, modified 5 Years ago. Liferay Master Posts: 560 Join Date: 4/25/11 Recent Posts
Hi Sam,:

Regarding the errors:
The first error I get is related to the blogs service:
[b]2019-11-18 16:15:00.755 ERROR [main][ReleaseManagerOSGiCommands:144] Failed upgrade process for module com.liferay.blogs.servicecom.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.exception.InvalidRepositoryException: com.liferay.portal.kernel.repository.UndeployedExternalRepositoryException: Unable to load external repository class com.liferay.portal.repository.portletrepository.PortletRepository because its plugin is not deployed
[/b]
This is an intermittent issue which has been solved with the following LPS:https://issues.liferay.com/browse/LPS-97276
https://issues.liferay.com/browse/LPS-98639
https://issues.liferay.com/browse/LPS-88516
https://issues.liferay.com/browse/LPS-96944
These issues are included in the new GA version for 7.2, 7.2 CE GA2, can you install and perform the upgrade using it?
There is also an error with the content targeting module:
[b]2019-11-18 16:15:34.001 ERROR [main][ReleaseManagerOSGiCommands:144] Failed upgrade process for module com.liferay.segments.content.targeting.upgrade com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.segments.exception.SegmentsEntryNameException[/b]
This error is related to Audience Targeting. Do you need the current data? Maybe you can clean it up before the upgrade. This is the article to upgrade AT from 7.1 (you will need to stop there if you want to maintain all data until we implement https://issues.liferay.com/browse/LPS-103827)https://portal.liferay.dev/docs/7-2/deploy/-/knowledge_base/d/manually-migrating-from-audience-targeting

DDMStorageLink
[b]2019-11-18 16:33:06.721 ERROR [main][VerifyProcessTrackerOSGiCommands:295] com.liferay.portal.verify.VerifyException: com.liferay.dynamic.data.mapping.exception.NoSuchStorageLinkException: No DDMStorageLink exists with the key {classPK=267641}com.liferay.portal.verify.VerifyException: com.liferay.dynamic.data.mapping.exception.NoSuchStorageLinkException: No DDMStorageLink exists with the key {classPK=267641}[/b]
The error seems to happen here:https://github.com/liferay/com-liferay-dynamic-data-mapping/blob/master/dynamic-data-mapping-service/src/main/java/com/liferay/dynamic/data/mapping/verify/DDMServiceVerifyProcess.java#L160
We do this query there:
[b]SELECT * FROM DDMStorageLink ddmStorageLink WHERE ddmStorageLink.classPK = {DDMContent.contentId}[/b]
Review all your DDMContents point to the existing DDMStorageLink before the upgrade.

Plus several missing image files (only about 3):
[b]2019-11-18 16:35:40.038 ERROR [ForkJoinPool-1-worker-11][ImageImpl:69] Error reading image 5606013
com.liferay.document.library.kernel.exception.NoSuchFileException: {companyId=0, repositoryId=0, fileName=5606013.png, cause=java.io.FileNotFoundException: D:\liferay\7.2migrate\data\document_library\0\0\56\06\01\5606013.png\5606013_1.0.png (The system cannot find the path specified)}[/b]
Since you are getting just 3 of them, I think this is not relevant. This means that 3 images were removed but they are still used in web contents (probably old versions).
I hope it helps.Cheers!
Sam Collett, modified 5 Years ago. New Member Posts: 20 Join Date: 11/11/19 Recent Posts
Thanks for the response, I will try the upgrade with the new 7.2 ga-2 release. Audience targeting isn't currently used, is there a way just to remove all data related to it, and start afresh if it is required in future?
thumbnail
Alberto Chaparro, modified 5 Years ago. Liferay Master Posts: 560 Join Date: 4/25/11 Recent Posts
As far as I remember all AT tables start with the prefix "CT_AU_", please check it and if that's correct, you can just drop those tables before the upgrade. You will be able to install Segmentation and Personalization modules (the new version of AT in 7.2) in the future.
Sam Collett, modified 5 Years ago. New Member Posts: 20 Join Date: 11/11/19 Recent Posts
Managed to upgrade with  a few less errors, but now getting an error about a duplicate entry:
2019-11-20 11:44:57.192 INFO  [main][LoggingTimer:43] Completed com.liferay.portal.upgrade.internal.index.updater.IndexUpdaterUtil#updateIndexes#Updating database indexes for com.liferay.subscription.service in 375 ms
INFO - Completed com.liferay.portal.upgrade.internal.index.updater.IndexUpdaterUtil#updateIndexes#Updating database indexes for com.liferay.subscription.service in 375 ms
2019-11-20 11:44:57.208 ERROR [main][JDBCExceptionReporter:234] Duplicate entry 'Subscription-1' for key 'IX_4F0315B8'
2019-11-20 11:44:57.224 ERROR [main][LogService:93] [main] Invocation of 'start' failed. 
I can also see an error in the Liferay log, but I can log in OK.
2019-11-20 12:07:54.817 ERROR [Portal Dependency Manager Component Executor--1][JDBCExceptionReporter:234] Duplicate entry 'Subscription-1' for key 'IX_4F0315B8'
2019-11-20 12:07:54.844 ERROR [Portal Dependency Manager Component Executor--1][LogService:93] [Portal Dependency Manager Component Executor--1] Invocation of 'start' failed.
com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
Sam Collett, modified 5 Years ago. New Member Posts: 20 Join Date: 11/11/19 Recent Posts
Fixed the issue with the duplicate entry, it was related to the 'servicecomponent' table, emptying that prevented the problem, though maybe not the best way. IX_4F0315B8 is a unique index on the table, columns 'buildNamespace,buildNumber' and I had some duplicates (with same buildNamepace and buildNumber, but different serviceComponentId).
Ran the upgrade again with a new database instance and still getting the 'com.liferay.portal.kernel.exception.InvalidRepositoryException'. Have to run the upgrade 3 times before it completes. I can log in fine now, the servicecomponent table gets repopulated.
thumbnail
Alberto Chaparro, modified 5 Years ago. Liferay Master Posts: 560 Join Date: 4/25/11 Recent Posts
I am glad to hear that.Did you get the repository exception even with the GA2?
Sam Collett, modified 5 Years ago. New Member Posts: 20 Join Date: 11/11/19 Recent Posts
Yes, the exception also occurs with GA2, version details: 
Liferay Community Edition Portal 7.2.1 CE GA2 (Mueller / Build 7201 / November 12, 2019)
There are a few exceptions related to scheduling and the trash (the cleanup routine I assume) and content search doesn't appear to work (currently set as embedded, but looking at setting up external service). Other than that, no major issues so far (mostly cosmetic due to change in Bootstrap version and theme).
2019-11-21 02:55:56.195 ERROR [liferay/scheduler_dispatch-1][TrashEntryLocalServiceImpl:190] com.liferay.document.library.kernel.exception.NoSuchFileEntryException: No FileEntry exists with the key {fileEntryId=2967027}

I appreciate the help, I think a few of the issues are down to the source data (a new instance works with no issues). It would be good if I could run the verify routines manually on the existing system to help clean up the data (for instance, there are file entries without versions and message board posts without threads), though not sure how.
thumbnail
Alberto Chaparro, modified 5 Years ago. Liferay Master Posts: 560 Join Date: 4/25/11 Recent Posts
Hi Sam,You can run verifiers manually using the Gogo shell:https://portal.liferay.dev/docs/7-1/deploy/-/knowledge_base/d/gogo-shell-commands-for-module-upgrades
But they are not going to remove that orphan data, you can create some scripts to execute them ideally before the upgrade.Regarding that the content search doesn't work, remember to reindex after the upgrade.
thumbnail
Alberto Chaparro, modified 5 Years ago. Liferay Master Posts: 560 Join Date: 4/25/11 Recent Posts
Hi Sam,
It's been a while since we talked, but here you have the solution for one of your cases:https://issues.liferay.com/browse/LPS-111175

I think it can be helpful for future users :-)
Cheers!
Sam Collett, modified 5 Years ago. New Member Posts: 20 Join Date: 11/11/19 Recent Posts
Thanks, I think that will help.   

I have had issues with the default theme not loading, I get a NullPointerException when CounterFinderImpl._obtainIncrement is called, and somehow linked to the search bar preferences. It doesn't happen when I first upgrade and test a few pages, suggesting there may be a page that another user accesses that does this. I don't want to clear the counter_ table, since that would probably break more.   



2020-03-23 02:15:52.503 ERROR [http-nio-8080-exec-9][runtime:60] Error executing FreeMarker template
FreeMarker template error:
Error while invoking the "runtime" JSP custom tag; see cause exception
----
FTL stack trace ("~" means nesting-related):
    - Failed at: @liferay_portlet["runtime"] defaultPr...  [in template "com.liferay.portal.template.freemarker_6.0.2_CLASS_LOADER_CONTEXT_FTL_liferay.ftl" in macro "search_bar" at line 137, column 17]
    - Reached through: @liferay.search_bar default_preferenc...  [in template "classic-theme_SERVLET_CONTEXT_/templates/portal_normal.ftl" at line 42, column 73]
----
Java stack trace (for programmers):
----
freemarker.core._TemplateModelException: [... Exception message was already printed; see it above ...]
    at freemarker.ext.jsp.JspTagModelBase.toTemplateModelExceptionOrRethrow(JspTagModelBase.java:154)
    at freemarker.ext.jsp.TagTransformModel$TagWriter.onStart(TagTransformModel.java:367)
    at freemarker.core.Environment.visitAndTransform(Environment.java:422)
    at freemarker.core.UnifiedCall.accept(UnifiedCall.java:107)
    at freemarker.core.Environment.visitByHiddingParent(Environment.java:345)
    at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:48)
    at freemarker.core.Environment.visit(Environment.java:324)
    at freemarker.core.Macro$Context.runMacro(Macro.java:184)
    at freemarker.core.Environment.invoke(Environment.java:701)
    at freemarker.core.UnifiedCall.accept(UnifiedCall.java:84)
    at freemarker.core.Environment.visit(Environment.java:324)
    at freemarker.core.MixedContent.accept(MixedContent.java:54)
    at freemarker.core.Environment.visitByHiddingParent(Environment.java:345)
    at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:48)
    at freemarker.core.Environment.visit(Environment.java:324)
    at freemarker.core.MixedContent.accept(MixedContent.java:54)
    at freemarker.core.Environment.visitByHiddingParent(Environment.java:345)
    at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:48)
    at freemarker.core.Environment.visit(Environment.java:324)
    at freemarker.core.MixedContent.accept(MixedContent.java:54)
    at freemarker.core.Environment.visit(Environment.java:324)
    at freemarker.core.Environment.process(Environment.java:302)
    at freemarker.template.Template.process(Template.java:325)
    at com.liferay.portal.template.freemarker.internal.FreeMarkerTemplate.processTemplate(FreeMarkerTemplate.java:137)
    at com.liferay.portal.template.BaseTemplate.processTemplate(BaseTemplate.java:128)
    at com.liferay.taglib.util.ThemeUtil.doIncludeFTL(ThemeUtil.java:232)
    at com.liferay.taglib.util.ThemeUtil.include(ThemeUtil.java:113)
    at com.liferay.taglib.util.ThemeUtil.include(ThemeUtil.java:77)
    at com.liferay.taglib.theme.IncludeTag.doEndTag(IncludeTag.java:37)
    at org.apache.jsp.html.common.themes.portal_jsp._jspx_meth_liferay_002dtheme_005finclude_005f1(portal_jsp.java:736)
    at org.apache.jsp.html.common.themes.portal_jsp._jspService(portal_jsp.java:668)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:71)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
    at com.liferay.portal.servlet.DirectRequestDispatcher.forward(DirectRequestDispatcher.java:49)
    at com.liferay.portal.servlet.DirectRequestDispatcherFactoryImpl$IndirectRequestDispatcher.forward(DirectRequestDispatcherFactoryImpl.java:172)
    at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:82)
    at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.forward(ClassLoaderRequestDispatcherWrapper.java:45)
    at com.liferay.portal.struts.StrutsUtil.forward(StrutsUtil.java:63)
    at com.liferay.portal.struts.PortalRequestProcessor._internalModuleRelativeForward(PortalRequestProcessor.java:364)
    at com.liferay.portal.struts.PortalRequestProcessor._process(PortalRequestProcessor.java:419)
    at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:155)
    at com.liferay.portal.internal.servlet.MainServlet.doGet(MainServlet.java:205)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
    at com.liferay.portal.internal.servlet.MainServlet.service(MainServlet.java:622)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:124)
    at com.liferay.portal.servlet.filters.password.modified.PasswordModifiedFilter.processFilter(PasswordModifiedFilter.java:62)
    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
    at com.liferay.portal.servlet.filters.secure.BaseAuthFilter.processFilter(BaseAuthFilter.java:340)
    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
    at com.liferay.portal.monitoring.internal.servlet.filter.MonitoringFilter.processFilter(MonitoringFilter.java:183)
    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:104)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:712)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:459)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:384)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
    at com.liferay.friendly.url.internal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:409)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
    at com.liferay.portal.servlet.ServletAdapter.service(ServletAdapter.java:99)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:124)
    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
    at com.liferay.portal.servlet.filters.i18n.I18nFilter.processFilter(I18nFilter.java:368)
    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
    at com.liferay.portal.servlet.filters.password.modified.PasswordModifiedFilter.processFilter(PasswordModifiedFilter.java:62)
    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
    at com.liferay.portal.servlet.filters.secure.BaseAuthFilter.processFilter(BaseAuthFilter.java:340)
    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
    at com.liferay.portal.servlet.filters.etag.ETagFilter.processFilter(ETagFilter.java:87)
    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
    at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:264)
    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
    at com.liferay.portal.monitoring.internal.servlet.filter.MonitoringFilter.processFilter(MonitoringFilter.java:183)
    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:104)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:712)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:459)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:384)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
    at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:360)
    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:196)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:196)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
    at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
    at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
    at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
    at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:389)
    at com.liferay.portal.servlet.filters.urlrewrite.UrlRewriteFilter.processFilter(UrlRewriteFilter.java:65)
    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:175)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:175)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:196)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:104)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1594)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: javax.servlet.jsp.JspException: com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.exception.SystemException: java.lang.NullPointerException
    at com.liferay.taglib.portletext.RuntimeTag.doEndTag(RuntimeTag.java:391)
    at freemarker.ext.jsp.TagTransformModel$TagWriter.endEvaluation(TagTransformModel.java:400)
    at freemarker.ext.jsp.TagTransformModel$TagWriter.onStart(TagTransformModel.java:344)
    ... 157 more
Caused by: com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.exception.SystemException: java.lang.NullPointerException
    at com.liferay.counter.service.persistence.impl.CounterFinderImpl.processException(CounterFinderImpl.java:312)
    at com.liferay.counter.service.persistence.impl.CounterFinderImpl._competeIncrement(CounterFinderImpl.java:375)
    at com.liferay.counter.service.persistence.impl.CounterFinderImpl.increment(CounterFinderImpl.java:111)
    at com.liferay.counter.service.persistence.impl.CounterFinderImpl.increment(CounterFinderImpl.java:102)
    at com.liferay.counter.service.persistence.impl.CounterFinderImpl.increment(CounterFinderImpl.java:97)
    at com.liferay.counter.service.impl.CounterLocalServiceImpl.increment(CounterLocalServiceImpl.java:42)
    at jdk.internal.reflect.GeneratedMethodAccessor184.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50)
    at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:69)
    at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
    at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49)
    at com.sun.proxy.$Proxy47.increment(Unknown Source)
    at com.liferay.portal.service.impl.PortletPreferencesLocalServiceImpl.addPortletPreferences(PortletPreferencesLocalServiceImpl.java:72)
    at jdk.internal.reflect.GeneratedMethodAccessor192.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50)
    at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:69)
    at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
    at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49)
    at com.sun.proxy.$Proxy48.addPortletPreferences(Unknown Source)
    at com.liferay.portal.service.impl.PortletPreferencesLocalServiceImpl.getPreferences(PortletPreferencesLocalServiceImpl.java:456)
    at jdk.internal.reflect.GeneratedMethodAccessor191.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50)
    at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:69)
    at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
    at com.liferay.portal.spring.aop.RetryAdvice.invoke(RetryAdvice.java:100)
    at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
    at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49)
    at com.sun.proxy.$Proxy48.getPreferences(Unknown Source)
    at com.liferay.portal.kernel.service.PortletPreferencesLocalServiceUtil.getPreferences(PortletPreferencesLocalServiceUtil.java:453)
    at com.liferay.portlet.PortletPreferencesFactoryImpl.getLayoutPortletSetup(PortletPreferencesFactoryImpl.java:282)
    at com.liferay.portlet.PortletPreferencesFactoryImpl.getLayoutPortletSetup(PortletPreferencesFactoryImpl.java:272)
    at com.liferay.portal.kernel.portlet.PortletPreferencesFactoryUtil.getLayoutPortletSetup(PortletPreferencesFactoryUtil.java:89)
    at com.liferay.taglib.portletext.RuntimeTag.doTag(RuntimeTag.java:308)
    at com.liferay.taglib.portletext.RuntimeTag.doTag(RuntimeTag.java:94)
    at com.liferay.taglib.portletext.RuntimeTag.doEndTag(RuntimeTag.java:372)
    ... 159 more
Caused by: com.liferay.portal.kernel.exception.SystemException: java.lang.NullPointerException
    at com.liferay.counter.service.persistence.impl.CounterFinderImpl.processException(CounterFinderImpl.java:312)
    at com.liferay.counter.service.persistence.impl.CounterFinderImpl._obtainIncrement(CounterFinderImpl.java:417)
    at com.liferay.counter.service.persistence.impl.CounterFinderImpl._competeIncrement(CounterFinderImpl.java:365)
    ... 198 more
Caused by: java.lang.NullPointerException
    at com.liferay.counter.service.persistence.impl.CounterFinderImpl._obtainIncrement(CounterFinderImpl.java:398)
    ... 199 more

https://liferay.dev/forums/-/message_boards/message/118808278