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

com.liferay.portal.NoSuchRegionException: No Region exists with the primary key 0

    Details

      Description

      Hi, We are adding regions to our organizations via an import functionality.
      The regions are not present or the organizations and hence, we provide a default value of 0.
      When lucene indexer starts building the indexes, it gives an error.
      It can be reproduced by adding an an address to a user, but not selecting the region.

      Here is the error message:

      com.liferay.portal.model.impl.AddressImpl com.liferay.portal.model.impl.AddressImpl NONE null com.liferay.portal.NoSuchRegionException:
      No Region exists with the primary key 0
      at com.liferay.portal.service.persistence.RegionPersistenceImpl.findByPrimaryKey(RegionPersistenceImpl.java:346)
      at com.liferay.portal.service.impl.RegionServiceImpl.getRegion(RegionServiceImpl.java:86)
      at sun.reflect.GeneratedMethodAccessor445.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
      at com.liferay.portal.dao.jdbc.aop.DynamicDataSourceTransactionInterceptor.invoke(DynamicDataSourceTransactionInterceptor.java:44)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
      at $Proxy93.getRegion(Unknown Source)
      at com.liferay.portal.service.RegionServiceUtil.getRegion(RegionServiceUtil.java:70)
      at com.liferay.portal.model.impl.AddressImpl.getRegion(AddressImpl.java:39)
      at com.liferay.portlet.enterpriseadmin.util.OrganizationIndexer.doGetDocument(OrganizationIndexer.java:153)
      at com.liferay.portal.kernel.search.BaseIndexer.getDocument(BaseIndexer.java:55)
      at com.liferay.portlet.enterpriseadmin.util.OrganizationIndexer.reindexOrganizations(OrganizationIndexer.java:418)
      at com.liferay.portlet.enterpriseadmin.util.OrganizationIndexer.reindexOrganizations(OrganizationIndexer.java:401)
      at com.liferay.portlet.enterpriseadmin.util.OrganizationIndexer.doReindex(OrganizationIndexer.java:268)
      at com.liferay.portal.kernel.search.BaseIndexer.reindex(BaseIndexer.java:108)
      at com.liferay.portal.search.lucene.LuceneIndexer.doReIndex(LuceneIndexer.java:130)
      at com.liferay.portal.search.lucene.LuceneIndexer.reindex(LuceneIndexer.java:61)
      at com.liferay.portal.search.lucene.LuceneIndexer.run(LuceneIndexer.java:50)
      at java.lang.Thread.run(Thread.java:662)
      com.liferay.portal.NoSuchRegionException: No Region exists with the primary key 0
      at com.liferay.portal.service.persistence.RegionPersistenceImpl.findByPrimaryKey(RegionPersistenceImpl.java:346)
      at com.liferay.portal.service.impl.RegionServiceImpl.getRegion(RegionServiceImpl.java:86)
      at sun.reflect.GeneratedMethodAccessor445.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
      at com.liferay.portal.dao.jdbc.aop.DynamicDataSourceTransactionInterceptor.invoke(DynamicDataSourceTransactionInterceptor.java:44)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
      at $Proxy93.getRegion(Unknown Source)
      at com.liferay.portal.service.RegionServiceUtil.getRegion(RegionServiceUtil.java:70)
      at com.liferay.portal.model.impl.AddressImpl.getRegion(AddressImpl.java:39)
      at com.liferay.portlet.enterpriseadmin.util.OrganizationIndexer.doGetDocument(OrganizationIndexer.java:153)
      at com.liferay.portal.kernel.search.BaseIndexer.getDocument(BaseIndexer.java:55)
      at com.liferay.portlet.enterpriseadmin.util.OrganizationIndexer.reindexOrganizations(OrganizationIndexer.java:418)
      at com.liferay.portlet.enterpriseadmin.util.OrganizationIndexer.reindexOrganizations(OrganizationIndexer.java:401)
      at com.liferay.portlet.enterpriseadmin.util.OrganizationIndexer.doReindex(OrganizationIndexer.java:268)
      at com.liferay.portal.kernel.search.BaseIndexer.reindex(BaseIndexer.java:108)
      at com.liferay.portal.search.lucene.LuceneIndexer.doReIndex(LuceneIndexer.java:130)
      at com.liferay.portal.search.lucene.LuceneIndexer.reindex(LuceneIndexer.java:61)
      at com.liferay.portal.search.lucene.LuceneIndexer.run(LuceneIndexer.java:50)
      at java.lang.Thread.run(Thread.java:662)

        Attachments

          Activity

            People

            • Assignee:
              kristoffer.onias Kristoffer Onias
              Reporter:
              manojbmsce manoj (Inactive)
              Participants of an Issue:
              Recent user:
              Esther Sanz
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                6 years, 43 weeks, 5 days ago