How to embed liferay comment discussion tag in freemarker?

thumbnail
Abhishek Jain, modified 4 Years ago. Regular Member Posts: 226 Join Date: 8/20/16 Recent Posts

I embedded a liferay comment discussion tag using the below code in web content template in liferay 7.4.3.7.
 

<@liferay_comment["discussion"]
className="com.liferay.journal.model.JournalArticle" classPK=jA.getResourcePrimKey() redirect=currURL userId=assetRendererObj.getUserId()  />

But not able to render it. Getting below exception:
javax.servlet.jsp.JspException: java.lang.NullPointerException
    at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:93) ~[bundleFile:?]
    at freemarker.ext.jsp.TagTransformModel$TagWriter.endEvaluation(TagTransformModel.java:402) ~[?:?]
    at freemarker.ext.jsp.TagTransformModel$TagWriter.afterBody(TagTransformModel.java:390)

​​​​​​​
​​​​​​​The similar code is working in jsp. Can anyone suggest the reason/solution for that? Got stuck in it for the whole day. Please do help.