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

Errors when service.xml in a WAB references entities in different modules

    Details

      Description

      Steps to reproduce:

      1. in service.xml in some plugin (for example sample-service-builder-portlet from Plugins SDK) add a reference to entity form some module.
        For example <reference package-path="com.liferay.journal" entity="JournalArticle" />
      2. add the referenced module to ivy.xml
      3. run ant build-service war - it should build the WAR without issues
      4. deploy the WAR to LIFERY_HOME/osgi/modules - it will not start. The error is:
      11:45:07,966 ERROR [localhost-startStop-6][HotDeployImpl:236] com.liferay.portal.kernel.deploy.hot.HotDeployException: Error initializing Spring for sample-service-builder-portlet
      com.liferay.portal.kernel.deploy.hot.HotDeployException: Error initializing Spring for sample-service-builder-portlet
      	at com.liferay.portal.kernel.deploy.hot.BaseHotDeployListener.throwHotDeployException(BaseHotDeployListener.java:46)
      	at com.liferay.portal.deploy.hot.SpringHotDeployListener.invokeDeploy(SpringHotDeployListener.java:44)
      	at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:233)
      
      . . .
      
      	... 48 more
      Caused by: com.liferay.portal.kernel.bean.BeanLocatorException: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'com.liferay.journal.service.JournalArticleLocalService' is defined
      	at com.liferay.portal.bean.BeanLocatorImpl.locate(BeanLocatorImpl.java:111)
      	at com.liferay.portal.kernel.bean.PortalBeanLocatorUtil.locate(PortalBeanLocatorUtil.java:90)
      	at com.liferay.portal.spring.bean.BeanReferenceAnnotationBeanPostProcessor._autoInject(BeanReferenceAnnotationBeanPostProcessor.java:138)
      	... 53 more
      Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'com.liferay.journal.service.JournalArticleLocalService' is defined
      	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:575)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1111)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:276)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:267)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
      	at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1117)
      	at com.liferay.portal.bean.BeanLocatorImpl.doLocate(BeanLocatorImpl.java:167)
      	at com.liferay.portal.bean.BeanLocatorImpl.locate(BeanLocatorImpl.java:105)
      	... 55 more
      
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                3 years, 33 weeks, 2 days ago

                Packages

                Version Package