Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-54575

NPE occurs when add a template for web content structure.

    Details

      Description

      Steps to reproduce:
      1. Create a web content structure, add a name and drag an field("Image" in this case).
      2. Save the structure, and create a template for it.

      Expect result:
      Add a template for created structure successfully without any error in console.

      Actual Result:
      NullPointerException is thrown in console and Structures iframe appears to be empty.

      03:19:46,241 ERROR [http-bio-8080-exec-8][IncludeTag:128] Current URL /group/control_panel/manage?p_p_id=166&p_p_lifecycle=0&p_p_state=pop_up&p_p_mode=view&doAsGroupId=20181&refererPlid=20184&_166_refererPortletName=com_liferay_journal_web_portlet_JournalPortlet&_166_groupId=20181&_166_groupId=20181&_166_showAncestorScopes=1&_166_refererWebDAVToken=null&_166_classNameId=20099&_166_classNameId=20099&_166_showManageTemplates=1&_166_scopeTitle=Structures&_166_struts_action=%2Fdynamic_data_mapping%2Fedit_template&_166_redirect=http%3A%2F%2Flocalhost%3A8080%2Fgroup%2Fcontrol_panel%2Fmanage%3Fp_p_id%3D166%26p_p_lifecycle%3D0%26p_p_state%3Dpop_up%26p_p_mode%3Dview%26doAsGroupId%3D20181%26refererPlid%3D20184%26_166_refererPortletName%3Dcom_liferay_journal_web_portlet_JournalPortlet%26_166_showAncestorScopes%3D1%26_166_refererWebDAVToken%3Dnull%26_166_showManageTemplates%3D1%26_166_scopeTitle%3DStructures%26_166_classNameId%3D20099%26_166_classPK%3D20574%26_166_struts_action%3D%252Fdynamic_data_mapping%252Fview_template%26_166_resourceClassNameId%3D20109&_166_redirect=http%3A%2F%2Flocalhost%3A8080%2Fgroup%2Fcontrol_panel%2Fmanage%3Fp_p_id%3D166%26p_p_lifecycle%3D0%26p_p_state%3Dpop_up%26p_p_mode%3Dview%26doAsGroupId%3D20181%26refererPlid%3D20184%26_166_refererPortletName%3Dcom_liferay_journal_web_portlet_JournalPortlet%26_166_showAncestorScopes%3D1%26_166_refererWebDAVToken%3Dnull%26_166_showManageTemplates%3D1%26_166_scopeTitle%3DStructures%26_166_classNameId%3D20099%26_166_classPK%3D20574%26_166_struts_action%3D%252Fdynamic_data_mapping%252Fview_template%26_166_resourceClassNameId%3D20109&_166_classPK=20574&_166_classPK=20574&_166_resourceClassNameId=20109&_166_resourceClassNameId=20109&_166_type=display&p_p_ajax=0&p_p_isolated=1 generates exception: An exception occurred processing JSP page /html/portlet/dynamic_data_mapping/edit_template.jsp at line 60____57: 	}__58: __59: 	if (templateHandler != null) {__60: 		script = templateHandler.getTemplatesHelpContent(language);__61: 	}__62: 	else if (!type.equals(DDMTemplateConstants.TEMPLATE_TYPE_FORM)) {__63: 		script = ContentUtil.get(PropsUtil.get(PropsKeys.DYNAMIC_DATA_MAPPING_TEMPLATE_LANGUAGE_CONTENT, new Filter(language)));______Stacktrace: [Sanitized]
      java.lang.NullPointerException
      	at org.eclipse.osgi.internal.loader.BundleLoader.findResource(BundleLoader.java:536)
      	at org.eclipse.osgi.internal.loader.ModuleClassLoader.getResource(ModuleClassLoader.java:201)
      	at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:1348)
      	at com.liferay.portal.kernel.util.StringUtil.read(StringUtil.java:2122)
      	at com.liferay.portal.kernel.util.StringUtil.read(StringUtil.java:2085)
      	at com.liferay.portal.kernel.template.BaseTemplateHandler.getTemplatesHelpContent(BaseTemplateHandler.java:85)
      	at org.apache.jsp.html.portlet.dynamic_005fdata_005fmapping.edit_005ftemplate_jsp._jspService(edit_005ftemplate_jsp.java:1062)
      	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
      	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
      	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:119)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:119)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                beck.liu Beck Liu
                Reporter:
                beck.liu Beck Liu
                Participants of an Issue:
                Recent user:
                Esther Sanz
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  5 years, 18 weeks, 6 days ago

                  Packages

                  Version Package
                  7.0.0 M5