0

I'm working with the version of liferay 6.2.5, and the content Newsletters. My problem is this: When I try to create a template, for the newsletter; mainly when adding the HTML file. On the site, this causes me this error: Portlet is unavailable. On Eclipse, here is the error displayed: See below. Would you know the source of this error and how to solve it. Thank you

javax.portlet.PortletException: java.lang.NoClassDefFoundError: net/htmlparser/jericho/Source
    at com.liferay.portal.kernel.portlet.LiferayPortlet.callActionMethod(LiferayPortlet.java:181)
    at com.liferay.util.bridges.mvc.MVCPortlet.callActionMethod(MVCPortlet.java:249)
    at com.liferay.portal.kernel.portlet.LiferayPortlet.processAction(LiferayPortlet.java:90)
    at com.liferay.util.bridges.mvc.MVCPortlet.processAction(MVCPortlet.java:212)
    at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:71)
    at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:48)
    at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:112)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)...

...Caused by: java.lang.NoClassDefFoundError: net/htmlparser/jericho/Source
    at com.beorn.newsletter.service.impl.TemplateLocalServiceImpl.removeScripts(TemplateLocalServiceImpl.java:319)
    at com.beorn.newsletter.service.impl.TemplateLocalServiceImpl.processTemplateContent(TemplateLocalServiceImpl.java:241)
    at com.beorn.newsletter.service.impl.TemplateLocalServiceImpl.addTemplate(TemplateLocalServiceImpl.java:87)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
woodson
  • 31
  • 1
  • 4
  • 8

1 Answers1

2

you have exception java.lang.NoClassDefFoundError because java cannot find path to net/htmlparser/jericho/Source

May be it help you: https://mvnrepository.com/artifact/net.htmlparser.jericho/jericho-html

You need add library Jericho HTML Parser to your project.

If you use Maven, to need add in pom.xml:

<dependency>
    <groupId>net.htmlparser.jericho</groupId>
    <artifactId>jericho-html</artifactId>
    <version>3.4</version>
</dependency>

If you do not use some software project management (Maven, Gradle, ...), so you need to download Jericho HTML Parser library (.jar) and add it to your project.

Julia
  • 81
  • 1
  • 6