留言板

NoClassDefFoundError: com/sun/syndication/io/Feed

pooja mahajan,修改在11 年前。

NoClassDefFoundError: com/sun/syndication/io/Feed

Junior Member 帖子: 45 加入日期: 13-1-30 最近的帖子
hi,

We are trying to deploy application.war on liferay 6.1.1 using jboss 7. Following is the error


08:25:05,768 WARN [MSC service thread 1-3][PluginPackageUtil:1131] Plugin package on context LiferayDemo cannot be tracked because this WAR does not contain a liferay-plugin-package.xml file
08:25:14,125 ERROR [MSC service thread 1-3][HotDeployImpl:191] com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering portlets for LiferayDemo
com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering portlets for LiferayDemo
at com.liferay.portal.kernel.deploy.hot.BaseHotDeployListener.throwHotDeployException(BaseHotDeployListener.java:46)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:123)
at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:188)
at com.liferay.portal.deploy.hot.HotDeployImpl.fireDeployEvent(HotDeployImpl.java:96)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:27)
at com.liferay.portal.kernel.servlet.PluginContextListener.fireDeployEvent(PluginContextListener.java:151)
at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalInit(PluginContextListener.java:141)
at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:42)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.flushInits(PortalLifecycleUtil.java:48)
at com.liferay.portal.servlet.MainServlet.initPlugins(MainServlet.java:858)
at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:366)
at javax.servlet.GenericServlet.init(GenericServlet.java:242)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1202)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1102)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3655)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3873)
at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NoClassDefFoundError: com/sun/syndication/io/FeedException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.getDeclaredMethod(Class.java:1935)
at com.liferay.portal.javadoc.JavadocManagerImpl.parseJavadocMethod(JavadocManagerImpl.java:262)
at com.liferay.portal.javadoc.JavadocManagerImpl.parseDocument(JavadocManagerImpl.java:191)
at com.liferay.portal.javadoc.JavadocManagerImpl.load(JavadocManagerImpl.java:62)
at com.liferay.portal.kernel.javadoc.JavadocManagerUtil.load(JavadocManagerUtil.java:35)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.doInvokeDeploy(PortletHotDeployListener.java:443)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:120)
... 20 more
Caused by: java.lang.ClassNotFoundException: com.sun.syndication.io.FeedException from [Module "deployment.LiferayDemo.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
thumbnail
Neil Griffin,修改在11 年前。

RE: NoClassDefFoundError: com/sun/syndication/io/Feed

Liferay Legend 帖子: 2655 加入日期: 05-7-27 最近的帖子
Regarding the error for liferay-plugin-package.xml

I think that this is an error that might happen at deployment time when your portlet source does not have a WEB-INF/liferay-plugin-package.properties file.

Regarding the ClassNotFoundException:

According to jarfinder.com you need to include the Rome library as a dependency in your project.
pooja mahajan,修改在11 年前。

RE: NoClassDefFoundError: com/sun/syndication/io/Feed

Junior Member 帖子: 45 加入日期: 13-1-30 最近的帖子
Thanks for reply i added rome.jar in my application and error was gone .
Regarding warning,
lliferay-plugin-package.properties are present in web-inf of my application still it is giving me same warning
thumbnail
Neil Griffin,修改在11 年前。

RE: NoClassDefFoundError: com/sun/syndication/io/Feed

Liferay Legend 帖子: 2655 加入日期: 05-7-27 最近的帖子
In the deployed folder here:

jboss/standalone/deployments/LiferayDemo.war/WEB-INF/

Do you see a liferay-plugin-package.xml file?
pooja mahajan,修改在11 年前。

RE: Regarding the error for liferay-plugin-package.xml

Junior Member 帖子: 45 加入日期: 13-1-30 最近的帖子
liferay-plugin-package.xml file is not present
thumbnail
Neil Griffin,修改在11 年前。

RE: Regarding the error for liferay-plugin-package.xml

Liferay Legend 帖子: 2655 加入日期: 05-7-27 最近的帖子
Is the liferay-plugin-package.properties file present? If so, please paste the contents here.
pooja mahajan,修改在11 年前。

RE: Regarding the error for liferay-plugin-package.xml

Junior Member 帖子: 45 加入日期: 13-1-30 最近的帖子
liferay-plugin-package.properties is present in my application.war.
I taught liferay-plugin-package.xml is auto created with the help of liferay-plugin-package.properties.
I have created liferay-plugin-package.xml manually.

Thanks for helping me out
thumbnail
Omkar Khandare,修改在11 年前。

RE: Regarding the error for liferay-plugin-package.xml

Junior Member 帖子: 49 加入日期: 12-3-7 最近的帖子
i am facing the problem of missing liferay-plugin-package.xml for deployment
of EXT plugin..

what should be the content of the liferay-plugin-package.xml file.
& where it should be located...?

Plz Help.
thumbnail
Neil Griffin,修改在11 年前。

RE: Regarding the error for liferay-plugin-package.xml

Liferay Legend 帖子: 2655 加入日期: 05-7-27 最近的帖子
When you use the Liferay Plugins SDK to to create a new EXT plugin, it will generate the following project structure:

foo-ext/
foo-ext//build.xml
foo-ext//docroot
foo-ext//docroot/WEB-INF
foo-ext//docroot/WEB-INF/ext-impl
foo-ext//docroot/WEB-INF/ext-impl/src
foo-ext//docroot/WEB-INF/ext-impl/src/portal-ext.properties
foo-ext//docroot/WEB-INF/ext-lib
foo-ext//docroot/WEB-INF/ext-lib/global
foo-ext//docroot/WEB-INF/ext-lib/portal
foo-ext//docroot/WEB-INF/ext-service
foo-ext//docroot/WEB-INF/ext-service/src
foo-ext//docroot/WEB-INF/ext-util-bridges
foo-ext//docroot/WEB-INF/ext-util-bridges/src
foo-ext//docroot/WEB-INF/ext-util-java
foo-ext//docroot/WEB-INF/ext-util-java/src
foo-ext//docroot/WEB-INF/ext-util-taglib
foo-ext//docroot/WEB-INF/ext-util-taglib/src
foo-ext//docroot/WEB-INF/ext-web
foo-ext//docroot/WEB-INF/ext-web/docroot
foo-ext//docroot/WEB-INF/ext-web/docroot/WEB-INF
foo-ext//docroot/WEB-INF/ext-web/docroot/WEB-INF/liferay-portlet-ext.xml
foo-ext//docroot/WEB-INF/ext-web/docroot/WEB-INF/portlet-ext.xml
foo-ext//docroot/WEB-INF/ext-web/docroot/WEB-INF/struts-config-ext.xml
foo-ext//docroot/WEB-INF/ext-web/docroot/WEB-INF/tiles-defs-ext.xml
foo-ext//docroot/WEB-INF/ext-web/docroot/WEB-INF/web.xml
foo-ext//docroot/WEB-INF/liferay-plugin-package.properties

You shouldn't need to add a liferay-plugin-package.xml file -- if the portal needs that, it will generate it automatically based on the liferay-plugin-package.properties file.
thumbnail
Omkar Khandare,修改在11 年前。

RE: Regarding the error for liferay-plugin-package.xml

Junior Member 帖子: 49 加入日期: 12-3-7 最近的帖子
Yeah,

Thanks..
It works.
The file automatically created after copying .properties file.

Thanks.
Micael Ericsson,修改在10 年前。

RE: Regarding the error for liferay-plugin-package.xml

Regular Member 帖子: 169 加入日期: 12-12-11 最近的帖子
I have the same error in my log.
When opening my war-file I have the liferay-plugin-package.properties file in WEB-INF directory.
But no liferay-plugin-package.xml file there.

Contents of my liferay-plugin-package.properties:
name=Ansokan
module-group-id=se.trm.web
module-incremental-version=1
tags=
short-description=
change-log=
page-url=http://www.testsite.se
author=TestAuthor
licenses=LGPL


Am i missing something?
thumbnail
Neil Griffin,修改在10 年前。

RE: Regarding the error for liferay-plugin-package.xml

Liferay Legend 帖子: 2655 加入日期: 05-7-27 最近的帖子
Hi Michael,

The liferay-plugin-package.xml descriptor is generated (at hot deploy time) from the liferay-plugin-package.properties file. So you wouldn't see the XML version in the WAR file.

Kind Regards,

Neil
Micael Ericsson,修改在10 年前。

RE: Regarding the error for liferay-plugin-package.xml

Regular Member 帖子: 169 加入日期: 12-12-11 最近的帖子
Neil Griffin:
Hi Michael,

The liferay-plugin-package.xml descriptor is generated (at hot deploy time) from the liferay-plugin-package.properties file. So you wouldn't see the XML version in the WAR file.

Kind Regards,

Neil


But the log "08:25:05,768 WARN [MSC service thread 1-3][PluginPackageUtil:1131] Plugin package on context LiferayDemo cannot be tracked because this WAR does not contain a liferay-plugin-package.xml file" points out the WAR-file. If it's not in the WAR, where should it be? webapps catalog?
thumbnail
Juan Gonzalez,修改在10 年前。

RE: Regarding the error for liferay-plugin-package.xml

Liferay Legend 帖子: 3089 加入日期: 08-10-28 最近的帖子
Hi Michael,

yes, it should be in the WAR file.

I remember searching for this in source code and didn't find any consequence from this message.
thumbnail
Neil Griffin,修改在10 年前。

RE: Regarding the error for liferay-plugin-package.xml

Liferay Legend 帖子: 2655 加入日期: 05-7-27 最近的帖子
Hi Micael,

I tried to reproduce the problem on Tomcat and I can only reproduce it when a portlet is "undeployed", meaning that it gets deleted from the tomcat/webapps folder.

Here is the stacktrace that I encounter when I can reproduce it:

PluginPackageUtil._readPluginPackageServletManifest(ServletContext) line: 1078	
PluginPackageUtil._readPluginPackageServletContext(ServletContext) line: 1057	
PluginPackageUtil.readPluginPackageServletContext(ServletContext) line: 201	
PluginPackageHotDeployListener.doInvokeUndeploy(HotDeployEvent) line: 157	
PluginPackageHotDeployListener.invokeUndeploy(HotDeployEvent) line: 77	
HotDeployImpl.fireUndeployEvent(HotDeployEvent) line: 110	
HotDeployUtil.fireUndeployEvent(HotDeployEvent) line: 31	
PluginContextListener.fireUndeployEvent() line: 169	
PluginContextListener.doPortalDestroy() line: 132	
PluginContextListener(BasePortalLifecycle).portalDestroy() line: 31	
PluginContextListener.contextDestroyed(ServletContextEvent) line: 97	
StandardContext.listenerStop() line: 4980


Basically, when the WEB-INF/liferay-plugin-package.xml file does not exist in WEB-INF/lib, the portal tries to read the plugin package info (metadata about the plugin) from the META-INF/MANIFEST.MF file. But since the context was deleted from tomcat/webapps it can't find a META-INF/MANIFEST.MF file and reports the warning.

So the bottom line is that you can safely ignore this warning if it is happening during an undeploy. If it is happening at some other time, then there might be a reason to be concerned.

The WEB-INF/liferay-plugin-package.xml file will *never* be in the actual .WAR archive unless the developer puts it there. Rather, it is generated by the Liferay hot deploy system from the WEB-INF/liferay-plugin-package.properties file during hot deployment.

I would say that the warning message "because this WAR does not contain" is a little misleading. Really, the warning message should say "because this CONTEXT does not contain".

Kind Regards,

Neil
thumbnail
Josef Šustáček,修改在8 年前。

RE: Regarding the error for liferay-plugin-package.xml

New Member 帖子: 9 加入日期: 12-1-11 最近的帖子
Neil Griffin:
Hi Michael,

The liferay-plugin-package.xml descriptor is generated (at hot deploy time) from the liferay-plugin-package.properties file. So you wouldn't see the XML version in the WAR file.

Kind Regards,

Neil


Hi guys,

based on my testing, Liferay will generate the file only if it is able to correctly detect the type of the plugin being deployed. If not, your liferay-plugin-package.properties seems to be ignored and no XML version of it is created (that's why you get the error in the logs).

Unfortunately, the type is detected from the name of the .war file:

https://github.com/liferay/liferay-portal/blob/1706f46e2c77979f4b50625c26021ac2c6a1b513/portal-impl/src/com/liferay/portal/plugin/PluginPackageUtil.java#L843

In our case, the .war has to be named with dots as words separator, instead of dashes, so we have plugins like com.company.our.department.project.first.tool.portlet-6.2.10.1.0.1-RELEASE.war). As a result, when we deploy this plugin, all our settings in liferay-plugin-package.properties get ignored, including thing like 'recommended-deployment-context' which should allow you to set the name of the context and directory into which the war is expanded in Tomcat. Then our plugin ends up in [tomcat]/webapps/]com.company.our.department.project.first.tool.portlet-6.2.10.1.0.1-RELEASE.