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

Unreferenced files uploaded to a portlet repository generate a "java.lang.RuntimeException: Unable to get class name from id 0" during the reindex process

    Details

      Description

      1. Create a web content structure with a image field
      2. Create its template
      3. Create a web content and select a new image uploading it to the Web Content Images tab
      4. Without save the web content, select another image, adding it to the same section "Web Content Images"
      5. Go to Control Panel > Configuration > Search > Reindex all search indexes

      Error in log:

      2019-06-18 08:27:36.943 ERROR [default-9][SearchPermissionCheckerImpl:143] java.lang.RuntimeException: Unable to get class name from id 0
      java.lang.RuntimeException: Unable to get class name from id 0
      	at com.liferay.portal.util.PortalImpl.getClassName(PortalImpl.java:1593)
      	at com.liferay.portal.search.internal.SearchPermissionCheckerImpl.addPermissionFields(SearchPermissionCheckerImpl.java:112)
      	at com.liferay.portal.search.internal.IndexWriterHelperImpl.updateDocuments(IndexWriterHelperImpl.java:616)
      	at com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery.indexInterval(IndexableActionableDynamicQuery.java:128)
      	at com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery.doPerformActions(IndexableActionableDynamicQuery.java:110)
      	at com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery.performActions(DefaultActionableDynamicQuery.java:86)
      	at com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery.performActions(IndexableActionableDynamicQuery.java:65)
      	at com.liferay.portal.search.internal.batch.DynamicQueryBatchIndexingActionableAdapter.performActions(DynamicQueryBatchIndexingActionableAdapter.java:50)
      	at com.liferay.portal.search.internal.indexer.IndexerWriterImpl.reindex(IndexerWriterImpl.java:205)
      	at com.liferay.portal.search.internal.indexer.DefaultIndexer.reindex(DefaultIndexer.java:272)
      	at com.liferay.portal.search.internal.SearchEngineInitializer.reindex(SearchEngineInitializer.java:173)
      	at com.liferay.portal.search.internal.SearchEngineInitializer$1.call(SearchEngineInitializer.java:131)
      	at com.liferay.portal.search.internal.SearchEngineInitializer$1.call(SearchEngineInitializer.java:124)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: com.liferay.portal.kernel.exception.NoSuchClassNameException: No ClassName exists with the primary key 0
      	at com.liferay.portal.service.persistence.impl.ClassNamePersistenceImpl.findByPrimaryKey(ClassNamePersistenceImpl.java:615)
      	at com.liferay.portal.service.persistence.impl.ClassNamePersistenceImpl.findByPrimaryKey(ClassNamePersistenceImpl.java:633)
      	at com.liferay.portal.service.base.ClassNameLocalServiceBaseImpl.getClassName(ClassNameLocalServiceBaseImpl.java:225)
      	at sun.reflect.GeneratedMethodAccessor228.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.lambda$invoke$0(TransactionInterceptor.java:64)
      	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor._execute(DefaultTransactionExecutor.java:128)
      	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:51)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:62)
      	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
      	at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49)
      	at com.sun.proxy.$Proxy82.getClassName(Unknown Source)
      	at com.liferay.portal.kernel.service.ClassNameLocalServiceUtil.getClassName(ClassNameLocalServiceUtil.java:233)
      	at com.liferay.portal.util.PortalImpl.getClassName(PortalImpl.java:1587)
      	... 18 more
      

        Attachments

          Activity

            People

            Assignee:
            beck.liu Beck Liu
            Reporter:
            jose.jimenez Jose Jimenez
            Participants of an Issue:
            Recent user:
            Jason Pince
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              1 year, 36 weeks, 2 days ago

                Packages

                Version Package
                7.1.10 DXP FP16
                7.1.X
                7.2.10 DXP FP1
                7.2.X
                7.2.1 CE GA2
                7.3.10 DXP GA1
                Master