I developed two portlets, one for the admin and another for displaying information. They have the same back-end or DAO, model and services are the same. So I have decided to make another project to be referenced by the two portlet projects. It worked good when I started the Liferay server.
But when I am editing and building the referenced project. The autodeploy of eclipse runs and redeploys the two portlets but my problem was the two portlets got an error.
When I started liferay, everything worked but when I built the referenced project and autodeployed. This error occured.
the ITProjectFramework.jar
is the referenced project. The Post_Portlet
is one of the portlet projects that referenced the ITProjectFramework.jar
.
This is the error:
14:47:57,062 INFO [PortletHotDeployListener:227] Registering portlets for Post_Portlet
14:47:57,328 ERROR [PortletHotDeployListener:663] org.springframework.beans.factory.BeanDefinitionStoreException: I/O failure during classpath scanning; nested exception is java.io.FileNotFoundException: JAR entry com/test/ not found in D:\liferay\liferay-portal-5.2.3\tomcat-6.0.18\webapps\Post Portlet\WEB-INF\lib\ITProjectFramework.jar
org.springframework.beans.factory.BeanDefinitionStoreException: I/O failure during classpath scanning; nested exception is java.io.FileNotFoundException: JAR entry com/test/ not found in D:\liferay\liferay-portal-5.2.3\tomcat-6.0.18\webapps\Post Portlet\WEB-INF\lib\ITProjectFramework.jar
at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:186)
at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:191)
at org.springframework.context.annotation.ComponentScanBeanDefinitionParser.parse(ComponentScanBeanDefinitionParser.java:159)
at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1246)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1236)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:133)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:90)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:468)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:363)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:313)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:290)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:142)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:158)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:97)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:411)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:338)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:251)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:190)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3099)
at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:404)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1309)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: JAR entry com/test/ not found in D:\liferay\liferay-portal-5.2.3\tomcat-6.0.18\webapps\Post Portlet\WEB-INF\lib\ITProjectFramework.jar
at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.getJarFile(Unknown Source)
at org.springframework.core.io.support.PathMatchingResourcePatternResolver.doFindPathMatchingJarResources(PathMatchingResourcePatternResolver.java:391)
at org.springframework.core.io.support.PathMatchingResourcePatternResolver.findPathMatchingResources(PathMatchingResourcePatternResolver.java:320)
at org.springframework.core.io.support.PathMatchingResourcePatternResolver.getResources(PathMatchingResourcePatternResolver.java:244)
at org.springframework.context.support.AbstractApplicationContext.getResources(AbstractApplicationContext.java:1021)
at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:172)
... 31 more
14:47:57,343 INFO [PortletHotDeployListener:346] 1 portlet for Post_Portlet is available for use
10/08/2009 2:47:57 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
10/08/2009 2:47:57 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/Post_Portlet] startup failed due to previous errors
10/08/2009 2:47:57 PM org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
10/08/2009 2:47:57 PM org.apache.catalina.core.ApplicationContext log
INFO: Shutting down Log4J
14:47:57,359 INFO [PortletHotDeployListener:381] Unregistering portlets for Post_Portlet
14:47:57,359 INFO [PortletHotDeployListener:412] 1 portlet for Post_Portlet was unregistered