-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 7.0.0 DXP SP2, Master
-
Fix Version/s: 7.0.0 DXP FP23, 7.0.X EE, 7.0.4 CE GA5, 7.1.X, Master
-
Component/s: WCM
-
Branch Version/s:7.0.x
-
Backported to Branch:Committed
-
Story Points:1.25
-
Git Pull Request:
Description
Customer has a portlet which uses journal article taglib but encounter an error.
Reproduction Steps
1. Create a web content structure
2. Create a template for the structure from step1
3. Get the tempalte ID. Check the database to get templateKey.
4. Create a web content article using the structure from step 1
5. Get the article ID
6. Get the groupId for the Guest site.
Note: In test.module.portlet-1.0.0.jar/META-INF/resources/view.jsp, the following code is used. If you have a different set of IDs, please change it to match your data.
<% long articleId = 34998; long groupId = 20143; long templateKey = 34994; %> <liferay-journal:journal-article articleId="<%= articleId %>" groupId="<%= groupId %>" templateKey="<%= templateKey %>" />
7. Confirm com.liferay.journal.taglib.jar deployed in bundle (This module does not exist in builded bundle, we might deploy it by manual)
8. Deploy attached test.module.portlet-1.0.0.jar.
9. Add test-module-portlet portlet in welcome page.
Actual Result: The following error occurs
03:59:38,528 ERROR [http-nio-8080-exec-8][PortletServlet:113] javax.portlet.PortletException: org.apache.jasper.JasperException: /view.jsp(9,0) PWC6339: Cannot find a setter method for the attribute t emplateKey of the tag handler com.liferay.journal.taglib.servlet.taglib.JournalArticleTag javax.portlet.PortletException: org.apache.jasper.JasperException: /view.jsp(9,0) PWC6339: Cannot find a setter method for the attribute templateKey of the tag handler com.liferay.journal.taglib.servl et.taglib.JournalArticleTag at com.liferay.portlet.PortletRequestDispatcherImpl.dispatch(PortletRequestDispatcherImpl.java:263) at com.liferay.portlet.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:102) at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.include(MVCPortlet.java:568) at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.include(MVCPortlet.java:584) at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.doView(MVCPortlet.java:157) at com.liferay.portal.kernel.portlet.LiferayPortlet.doDispatch(LiferayPortlet.java:302) at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.doDispatch(MVCPortlet.java:471) at javax.portlet.GenericPortlet.render(GenericPortlet.java:262) at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.render(MVCPortlet.java:291) at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:103) at com.liferay.portlet.ScriptDataPortletFilter.doFilter(ScriptDataPortletFilter.java:57) at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:100) at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:64) at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:109) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:153) at org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:62) at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:117) at org.eclipse.equinox.http.servlet.internal.servlet.RequestDispatcherAdaptor.include(RequestDispatcherAdaptor.java:48) at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:530) at com.liferay.portlet.InvokerPortletImpl.invokeRender(InvokerPortletImpl.java:605) at com.liferay.portlet.InvokerPortletImpl.render(InvokerPortletImpl.java:391) at com.liferay.portal.monitoring.internal.portlet.MonitoringInvokerPortlet.render(MonitoringInvokerPortlet.java:261) at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(render_005fportlet_jsp.java:1538) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at com.liferay.portal.servlet.DirectRequestDispatcher.include(DirectRequestDispatcher.java:64) at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:78) at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:53) at com.liferay.portlet.PortletContainerImpl._render(PortletContainerImpl.java:678) at com.liferay.portlet.PortletContainerImpl.render(PortletContainerImpl.java:145) at com.liferay.portlet.SecurityPortletContainerWrapper.render(SecurityPortletContainerWrapper.java:126) at com.liferay.portlet.RestrictPortletContainerWrapper.render(RestrictPortletContainerWrapper.java:126) at com.liferay.portal.kernel.portlet.PortletContainerUtil.render(PortletContainerUtil.java:155) at com.liferay.portal.action.RenderPortletAction.execute(RenderPortletAction.java:112) at com.liferay.portal.action.UpdateLayoutAction.addPortlet(UpdateLayoutAction.java:317) at com.liferay.portal.action.UpdateLayoutAction.getJSON(UpdateLayoutAction.java:268) at com.liferay.portal.struts.JSONAction.execute(JSONAction.java:77) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228) at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:170) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) at javax.servlet.http.HttpServlet.service(HttpServlet.java:648) at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:599) at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:576) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:119) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:142) at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:125) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48) ..................
Expected Behavior:
No error