com.liferay.portal.kernel.deploy.auto.AutoDeployException: The auto deploy listeners com.liferay.portal.deploy.auto.PortletAutoDeployListener, com.liferay.portal.deploy.auto.WebAutoDeployListener all deployed /root/liferay-portal-6.2-ce-ga4/deploy/chr-backbone-web-portlet-6.2.0.1.war, but only one should have.

Liferay Issues | George Chao Li | 2 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    I am using the ga2 & ga4 tomcat bundled version of CE. I am developing a portlet with structure as below: docroot/html/check2plan/view.jsp web.xml as: <servlet> <servlet-name>Check2PlanPortlet</servlet-name> <servlet-class>com.liferay.portal.kernel.servlet.PortletServlet</servlet-class> <init-param> <param-name> portlet-class</param-name> <param-value>com.lycenway.chr.backbone.check2plan.Check2PlanPortlet</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>Check2PlanPortlet</servlet-name> <url-pattern>/chr-backbone-web-portlet/html/check2plan/*</url-pattern> </servlet-mapping> When deploy using the IDE drag & drop feature, it will show up error as attachment 1 and then The page with this plugin in portal will error and logs as below: 14:07:08,655 INFO [localhost-startStop-12][PortletHotDeployListener:497] 2 portlets for chr-backbone-web-portlet are available for use 14:13:40,594 ERROR [http-bio-8280-exec-90][render_portlet_jsp:132] null java.io.FileNotFoundException: The requested resource (/chr-backbone-web-portlet/check2plan/invoke) is not available at org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:776) at org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:411) at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:119) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:605) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:544) at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:583) at com.liferay.portlet.InvokerPortletImpl.invokeRender(InvokerPortletImpl.java:656) at com.liferay.portlet.InvokerPortletImpl.render(InvokerPortletImpl.java:362) at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(render_005fportlet_jsp.java:1242) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432) 14:23:52,816 INFO [http-bio-8280-exec-90][DeployUtil:209] Undeploy /root/liferay-portal-6.2-ce-ga4 I need to right click and redeploy for some times (error in attachment 1 will not appear any more), somehow it works as last. But when I redeploy again, it will go back the error status (no error like attachment 1). I try search around and found one post related with web.xml fix. I already done that but it will not work for me. Thanks for the help.

    Liferay Issues | 2 years ago | George Chao Li
    com.liferay.portal.kernel.deploy.auto.AutoDeployException: The auto deploy listeners com.liferay.portal.deploy.auto.PortletAutoDeployListener, com.liferay.portal.deploy.auto.WebAutoDeployListener all deployed /root/liferay-portal-6.2-ce-ga4/deploy/chr-backbone-web-portlet-6.2.0.1.war, but only one should have.

    Root Cause Analysis

    1. com.liferay.portal.kernel.deploy.auto.AutoDeployException

      The auto deploy listeners com.liferay.portal.deploy.auto.PortletAutoDeployListener, com.liferay.portal.deploy.auto.WebAutoDeployListener all deployed /root/liferay-portal-6.2-ce-ga4/deploy/chr-backbone-web-portlet-6.2.0.1.war, but only one should have.

      at com.liferay.portal.kernel.deploy.auto.AutoDeployDir.deploy()
    2. Liferay Portal Service
      AutoDeployScanner.run
      1. com.liferay.portal.kernel.deploy.auto.AutoDeployDir.deploy(AutoDeployDir.java:72)
      2. com.liferay.portal.kernel.deploy.auto.AutoDeployDir.processFile(AutoDeployDir.java:211)
      3. com.liferay.portal.kernel.deploy.auto.AutoDeployDir.scanDirectory(AutoDeployDir.java:275)
      4. com.liferay.portal.kernel.deploy.auto.AutoDeployScanner.run(AutoDeployScanner.java:58)
      4 frames