Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-39675

com.liferay.portal.kernel.deploy.auto.AutoDeployException while deploying theme plugin which is also containing layouts

    Details

    • Branch Version/s:
      6.1.x
    • Backported to Branch:
      Committed
    • Story Points:
      3
    • Fix Priority:
      4

      Description

      1. create theme.
      2. create layout template inside to theme
      3. deploy to server and

      11:15:49,337 ERROR [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][AutoDeployDir:92] com.liferay.portal.kernel.deploy.auto.AutoDeployException: The auto deploy listeners com.liferay.portal.deploy.auto.LayoutTemplateAutoDeployListener, com.liferay.portal.deploy.auto.ThemeAutoDeployListener all deployed /home/sammso/development/liferay/git/bundles/deploy/sammso-theme-6.2.0.1.war, but only one should have.
      com.liferay.portal.kernel.deploy.auto.AutoDeployException: The auto deploy listeners com.liferay.portal.deploy.auto.LayoutTemplateAutoDeployListener, com.liferay.portal.deploy.auto.ThemeAutoDeployListener all deployed /home/sammso/development/liferay/git/bundles/deploy/sammso-theme-6.2.0.1.war, but only one should have.
      	at com.liferay.portal.kernel.deploy.auto.AutoDeployDir.deploy(AutoDeployDir.java:72)
      	at com.liferay.portal.kernel.deploy.auto.AutoDeployDir.processFile(AutoDeployDir.java:209)
      	at com.liferay.portal.kernel.deploy.auto.AutoDeployDir.scanDirectory(AutoDeployDir.java:271)
      	at com.liferay.portal.kernel.deploy.auto.AutoDeployScanner.run(AutoDeployScanner.java:58)
      11:15:49,339 INFO  [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][AutoDeployDir:117] Add sammso-theme-6.2.0.1.war to the blacklist
      

      Theme is still usable (forgot to add).

      1. layouttest-theme-6.2.0.1.war
        1.49 MB
        Daniel Reuther
      2. sammso-theme-6.2.0.1.war
        2.08 MB
        Sampsa Sohlman

        Issue Links

          Activity

          Hide
          miguel.pastor Miguel Ángel Pastor Olivar added a comment -

          Hey Sampsa,

          I was trying to reproduce the issue but I have not been able to do it. I am using the zoe-resort-theme from our Plugins SDK

          I am closing it as No Longer Reproducible. Feel free to reopen it if you are still suffering the problem and add some more details on how I could reproduce it!

          Thanks a lot man!!

          Migue

          Show
          miguel.pastor Miguel Ángel Pastor Olivar added a comment - Hey Sampsa, I was trying to reproduce the issue but I have not been able to do it. I am using the zoe-resort-theme from our Plugins SDK I am closing it as No Longer Reproducible. Feel free to reopen it if you are still suffering the problem and add some more details on how I could reproduce it! Thanks a lot man!! Migue
          Hide
          daniel.reuther Daniel Reuther added a comment -

          Miguel,

          did the theme you tested this with contain a layout template as well? Because I just tried it on the current master revision again and looks like it's still not working correctly. That is, if the plugin contains both, liferay-look-and-feel.xml and liferay-layout-templates.xml, the portal will complain that multiple auto deploy listeners were involved.

          Short-term, we could maybe work around the problem by skipping layout template auto deployment when the plugin in question is a -theme project.

          Daniel

          Show
          daniel.reuther Daniel Reuther added a comment - Miguel, did the theme you tested this with contain a layout template as well? Because I just tried it on the current master revision again and looks like it's still not working correctly. That is, if the plugin contains both, liferay-look-and-feel.xml and liferay-layout-templates.xml, the portal will complain that multiple auto deploy listeners were involved. Short-term, we could maybe work around the problem by skipping layout template auto deployment when the plugin in question is a -theme project. Daniel
          Hide
          miguel.pastor Miguel Ángel Pastor Olivar added a comment -

          Hey Daniel,

          Not sure; I will double check the plugin I used to do the testing.

          Could you point me to a plugin in our SDK containing both files or do I need to create a new one??

          Thx a lot!

          Show
          miguel.pastor Miguel Ángel Pastor Olivar added a comment - Hey Daniel, Not sure; I will double check the plugin I used to do the testing. Could you point me to a plugin in our SDK containing both files or do I need to create a new one?? Thx a lot!
          Hide
          daniel.reuther Daniel Reuther added a comment -

          I've attached a plugin that should show the behavior. As far as I could see, we currently don't have a plugin in the repo that would contain both plugin types.

          Show
          daniel.reuther Daniel Reuther added a comment - I've attached a plugin that should show the behavior. As far as I could see, we currently don't have a plugin in the repo that would contain both plugin types.
          Hide
          sampsa.sohlman Sampsa Sohlman added a comment - - edited

          Hola, Miguel here is the theme to re-produce problem.

          The source is located at https://github.com/sammso/liferay-plugins/tree/LPS-39675-theme/themes/sammso-theme

          Show
          sampsa.sohlman Sampsa Sohlman added a comment - - edited Hola, Miguel here is the theme to re-produce problem. The source is located at https://github.com/sammso/liferay-plugins/tree/LPS-39675-theme/themes/sammso-theme
          Hide
          peter.borkuti Peter Borkuti added a comment -

          A workaround

          It seems to me, that if there is only liferay-look-and-feel.xml in the war, it works.

          layouttest-theme-6.2.0.war

          I merged the liferay-layout-templates.xml into liferay-look-and-feel.xml and deleted liferay-layout-templates.xml in layouttest-theme-6.2.0.war, it worked.

          sammso-theme-6.2.0.1.war

          I deleted liferay-layout-templates.xml from sammso-theme-6.2.0.1.war and put liferay-look-and-feel.xml with this content:

          <?xml version="1.0" encoding="UTF-8"?>
          <!DOCTYPE look-and-feel PUBLIC "-//Liferay//DTD Look and Feel 6.1.0//EN" "http://www.liferay.com/dtd/liferay-look-and-feel_6_1_0.dtd">
          <look-and-feel>
              <compatibility>
                  <version>6.2.0+</version>
              </compatibility>	
              <theme id="sammso-theme" name="Sammso Theme" >
          		<settings>
          		  <setting key="portlet-setup-show-borders-default" value="true" />
          		</settings>
          	<layout-templates>
          	<custom>
          		<layout-template id="sammso-layout" name="Sammso Layout">
          			<template-path>/sammso.tpl</template-path>
          			<wap-template-path>/sammso.wap.tpl</wap-template-path>
          			<thumbnail-path>/sammso.png</thumbnail-path>
          		</layout-template>
          	</custom>
          	</layout-templates>
              </theme>
          </look-and-feel>
          

          And it works.

          Show
          peter.borkuti Peter Borkuti added a comment - A workaround It seems to me, that if there is only liferay-look-and-feel.xml in the war, it works. layouttest-theme-6.2.0.war I merged the liferay-layout-templates.xml into liferay-look-and-feel.xml and deleted liferay-layout-templates.xml in layouttest-theme-6.2.0.war, it worked. sammso-theme-6.2.0.1.war I deleted liferay-layout-templates.xml from sammso-theme-6.2.0.1.war and put liferay-look-and-feel.xml with this content: <?xml version= "1.0" encoding= "UTF-8" ?> <!DOCTYPE look-and-feel PUBLIC "- //Liferay//DTD Look and Feel 6.1.0//EN" "http://www.liferay.com/dtd/liferay-look-and-feel_6_1_0.dtd" > <look-and-feel> <compatibility> <version>6.2.0+</version> </compatibility> <theme id= "sammso-theme" name= "Sammso Theme" > <settings> <setting key= "portlet-setup-show-borders- default " value= " true " /> </settings> <layout-templates> <custom> <layout-template id= "sammso-layout" name= "Sammso Layout" > <template-path>/sammso.tpl</template-path> <wap-template-path>/sammso.wap.tpl</wap-template-path> <thumbnail-path>/sammso.png</thumbnail-path> </layout-template> </custom> </layout-templates> </theme> </look-and-feel> And it works.
          Hide
          hong.zhao Hong Zhao added a comment -

          PASSED Manual Testing following the steps in the description.

          Reproduced on:
          Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: 3797e228a3c3a324237c6ad7be64eb0063c98dab.

          Error message displayed on terminal when deploy "war" package to server.

          Fixed on:
          Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: 236260077d4df36d45fb33c19db7c0184fa4ef1d.

          No error message displayed on terminal when deploy "war" package to server.

          Show
          hong.zhao Hong Zhao added a comment - PASSED Manual Testing following the steps in the description. Reproduced on: Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: 3797e228a3c3a324237c6ad7be64eb0063c98dab. Error message displayed on terminal when deploy "war" package to server. Fixed on: Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: 236260077d4df36d45fb33c19db7c0184fa4ef1d. No error message displayed on terminal when deploy "war" package to server.
          Hide
          hong.zhao Hong Zhao added a comment -

          PASSED Manual Testing following the steps in the description.

          Reproduced on:
          Tomcat 7.0 + MySQL 5. Portal 6.1.x EE GIT ID: ab3b252c98573b429f473aa33a8e369386b6af0d.

          Error message displayed on terminal when deploy "war" package to server.

          Fixed on:
          Tomcat 7.0 + MySQL 5. Portal 6.1.x EE GIT ID: fa6e87b5c2109bdb84cdf74384e6715592b0fcf0.

          No error message displayed on terminal when deploy "war" package to server.

          Show
          hong.zhao Hong Zhao added a comment - PASSED Manual Testing following the steps in the description. Reproduced on: Tomcat 7.0 + MySQL 5. Portal 6.1.x EE GIT ID: ab3b252c98573b429f473aa33a8e369386b6af0d. Error message displayed on terminal when deploy "war" package to server. Fixed on: Tomcat 7.0 + MySQL 5. Portal 6.1.x EE GIT ID: fa6e87b5c2109bdb84cdf74384e6715592b0fcf0. No error message displayed on terminal when deploy "war" package to server.

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                3 years, 10 weeks, 6 days ago

                Development

                  Subcomponents