Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/385.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java ClassNotFoundException:net.htmlparser.jericho.Source:时事通讯_Java_Liferay 6.2 - Fatal编程技术网

Java ClassNotFoundException:net.htmlparser.jericho.Source:时事通讯

Java ClassNotFoundException:net.htmlparser.jericho.Source:时事通讯,java,liferay-6.2,Java,Liferay 6.2,我正在使用liferay 6.2.5版本和内容通讯。我的问题是:当我试图为时事通讯创建模板时;主要是在添加HTML文件时。在站点上,这导致我出现以下错误:Portlet不可用。在Eclipse上,显示的错误如下:请参见下文。你知道这个错误的来源和解决方法吗。多谢各位 javax.portlet.PortletException: java.lang.NoClassDefFoundError: net/htmlparser/jericho/Source at com.liferay.por

我正在使用liferay 6.2.5版本和内容通讯。我的问题是:当我试图为时事通讯创建模板时;主要是在添加HTML文件时。在站点上,这导致我出现以下错误:Portlet不可用。在Eclipse上,显示的错误如下:请参见下文。你知道这个错误的来源和解决方法吗。多谢各位

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)

您有异常
java.lang.NoClassDefFoundError
,因为java找不到
net/htmlparser/jericho/Source的路径

也许它能帮助你:

您需要将库Jericho HTML解析器添加到项目中

如果使用Maven,则需要加载项
pom.xml

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

net.htmlparser.jericho
杰里科html
3.4

如果您不使用某些软件项目管理(Maven,Gradle,…),那么您需要下载Jericho HTML解析器库(
.jar
),并将其添加到您的项目中。

您有异常
java.lang.NoClassDefFoundError
,因为java找不到
net/htmlparser/Jericho/Source

也许它能帮助你:

您需要将库Jericho HTML解析器添加到项目中

如果使用Maven,则需要加载项
pom.xml

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

net.htmlparser.jericho
杰里科html
3.4
如果您不使用某些软件项目管理(Maven、Gradle等),那么您需要下载Jericho HTML Parser库(
.jar
),并将其添加到您的项目中