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

NoSuchUserException when deleting Virtual Instance via Headless API

Description

    Reproduced even after fix from LPS-123558

    Steps to Reproduce:

    1. Start portal
    2. Create Virtual Instance with:
      curl -X POST -u '[email protected]:test' -d '{"domain" : "liferay.com", "virtualHost": "www.able.com", "portalInstanceId": "www.able.com"}' -H 'Content-Type: application/json' http://www.able.com:8080/o/headless-portal-instances/v1.0/portal-instances
      
    3. Delete Virtual Instance with:
      curl -X DELETE -u '[email protected]:test' -H 'Content-Type: application/json' http://www.able.com:8080/o/headless-portal-instances/v1.0/portal-instances/www.able.com
      

    Expected Result:
    No error on instance delete.

    Actual Result:
    Error thrown in portal log

    21:42:17,333 ERROR [liferay/adaptive_media_processor-2][CompanyThreadLocal:68] com.liferay.portal.kernel.exception.NoSuchUserException: No User exists with the key {companyId=40863, defaultUser=true}
    com.liferay.portal.kernel.exception.NoSuchUserException: No User exists with the key {companyId=40863, defaultUser=true}
            at com.liferay.portal.service.persistence.impl.UserPersistenceImpl.findByC_DU(UserPersistenceImpl.java:4548)
            at com.liferay.portal.service.impl.UserLocalServiceImpl.loadGetDefaultUser(UserLocalServiceImpl.java:3087)
            at sun.reflect.GeneratedMethodAccessor261.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:498)
            at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:66)
            at com.sun.proxy.$Proxy834.loadGetDefaultUser(Unknown Source)
            at com.liferay.portal.kernel.service.UserLocalServiceWrapper.loadGetDefaultUser(UserLocalServiceWrapper.java:2318)
            at sun.reflect.GeneratedMethodAccessor261.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:498)
            at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:66)
            at com.sun.proxy.$Proxy835.loadGetDefaultUser(Unknown Source)
            at sun.reflect.GeneratedMethodAccessor261.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.invoke(TransactionInterceptor.java:69)
            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.$Proxy42.loadGetDefaultUser(Unknown Source)
            at com.liferay.portal.service.impl.UserLocalServiceImpl.getDefaultUser(UserLocalServiceImpl.java:2331)
            at sun.reflect.GeneratedMethodAccessor173.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:498)
            at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:66)
            at com.sun.proxy.$Proxy834.getDefaultUser(Unknown Source)
            at com.liferay.portal.kernel.service.UserLocalServiceWrapper.getDefaultUser(UserLocalServiceWrapper.java:1380)
            at sun.reflect.GeneratedMethodAccessor173.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:498)
            at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:66)
            at com.sun.proxy.$Proxy835.getDefaultUser(Unknown Source)
            at sun.reflect.GeneratedMethodAccessor173.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.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49)
            at com.sun.proxy.$Proxy42.getDefaultUser(Unknown Source)
            at com.liferay.portal.kernel.service.UserLocalServiceUtil.getDefaultUser(UserLocalServiceUtil.java:1359)
            at com.liferay.portal.kernel.security.auth.CompanyThreadLocal.setCompanyId(CompanyThreadLocal.java:60)
            at com.liferay.portal.messaging.internal.MessageBusThreadLocalUtil.populateThreadLocalsFromMessage(MessageBusThreadLocalUtil.java:88)
            at com.liferay.portal.messaging.internal.ParallelDestination$1.run(ParallelDestination.java:52)
            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)
    21:42:17,333 ERROR [liferay/document_library_sync_event_processor-2][CompanyThreadLocal:68] com.liferay.portal.kernel.exception.NoSuchUserException: No User exists with the key {companyId=40863, defaultUser=true}
    com.liferay.portal.kernel.exception.NoSuchUserException: No User exists with the key {companyId=40863, defaultUser=true}
            at com.liferay.portal.service.persistence.impl.UserPersistenceImpl.findByC_DU(UserPersistenceImpl.java:4548)
            at com.liferay.portal.service.impl.UserLocalServiceImpl.loadGetDefaultUser(UserLocalServiceImpl.java:3087)
            at sun.reflect.GeneratedMethodAccessor261.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:498)
            at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:66)
            at com.sun.proxy.$Proxy834.loadGetDefaultUser(Unknown Source)
            at com.liferay.portal.kernel.service.UserLocalServiceWrapper.loadGetDefaultUser(UserLocalServiceWrapper.java:2318)
            at sun.reflect.GeneratedMethodAccessor261.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:498)
            at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:66)
            at com.sun.proxy.$Proxy835.loadGetDefaultUser(Unknown Source)
            at sun.reflect.GeneratedMethodAccessor261.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.invoke(TransactionInterceptor.java:69)
            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.$Proxy42.loadGetDefaultUser(Unknown Source)
            at com.liferay.portal.service.impl.UserLocalServiceImpl.getDefaultUser(UserLocalServiceImpl.java:2331)
            at sun.reflect.GeneratedMethodAccessor173.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:498)
            at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:66)
            at com.sun.proxy.$Proxy834.getDefaultUser(Unknown Source)
            at com.liferay.portal.kernel.service.UserLocalServiceWrapper.getDefaultUser(UserLocalServiceWrapper.java:1380)
            at sun.reflect.GeneratedMethodAccessor173.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:498)
            at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:66)
            at com.sun.proxy.$Proxy835.getDefaultUser(Unknown Source)
            at sun.reflect.GeneratedMethodAccessor173.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.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49)
            at com.sun.proxy.$Proxy42.getDefaultUser(Unknown Source)
            at com.liferay.portal.kernel.service.UserLocalServiceUtil.getDefaultUser(UserLocalServiceUtil.java:1359)
            at com.liferay.portal.kernel.security.auth.CompanyThreadLocal.setCompanyId(CompanyThreadLocal.java:60)
            at com.liferay.portal.messaging.internal.MessageBusThreadLocalUtil.populateThreadLocalsFromMessage(MessageBusThreadLocalUtil.java:88)
            at com.liferay.portal.messaging.internal.SerialDestination$1.run(SerialDestination.java:55)
            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)
    21:42:17,341 ERROR [liferay/adaptive_media_processor-3][CompanyThreadLocal:68] com.liferay.portal.kernel.exception.NoSuchUserException: No User exists with the key {companyId=40863, defaultUser=true}
    com.liferay.portal.kernel.exception.NoSuchUserException: No User exists with the key {companyId=40863, defaultUser=true}
            at com.liferay.portal.service.persistence.impl.UserPersistenceImpl.findByC_DU(UserPersistenceImpl.java:4548)
            at com.liferay.portal.service.impl.UserLocalServiceImpl.loadGetDefaultUser(UserLocalServiceImpl.java:3087)
            at sun.reflect.GeneratedMethodAccessor261.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:498)
            at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:66)
            at com.sun.proxy.$Proxy834.loadGetDefaultUser(Unknown Source)
            at com.liferay.portal.kernel.service.UserLocalServiceWrapper.loadGetDefaultUser(UserLocalServiceWrapper.java:2318)
            at sun.reflect.GeneratedMethodAccessor261.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:498)
            at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:66)
            at com.sun.proxy.$Proxy835.loadGetDefaultUser(Unknown Source)
            at sun.reflect.GeneratedMethodAccessor261.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.invoke(TransactionInterceptor.java:69)
            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.$Proxy42.loadGetDefaultUser(Unknown Source)
            at com.liferay.portal.service.impl.UserLocalServiceImpl.getDefaultUser(UserLocalServiceImpl.java:2331)
            at sun.reflect.GeneratedMethodAccessor173.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:498)
            at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:66)
            at com.sun.proxy.$Proxy834.getDefaultUser(Unknown Source)
            at com.liferay.portal.kernel.service.UserLocalServiceWrapper.getDefaultUser(UserLocalServiceWrapper.java:1380)
            at sun.reflect.GeneratedMethodAccessor173.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:498)
            at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:66)
            at com.sun.proxy.$Proxy835.getDefaultUser(Unknown Source)
            at sun.reflect.GeneratedMethodAccessor173.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.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49)
            at com.sun.proxy.$Proxy42.getDefaultUser(Unknown Source)
            at com.liferay.portal.kernel.service.UserLocalServiceUtil.getDefaultUser(UserLocalServiceUtil.java:1359)
            at com.liferay.portal.kernel.security.auth.CompanyThreadLocal.setCompanyId(CompanyThreadLocal.java:60)
            at com.liferay.portal.messaging.internal.MessageBusThreadLocalUtil.populateThreadLocalsFromMessage(MessageBusThreadLocalUtil.java:88)
            at com.liferay.portal.messaging.internal.ParallelDestination$1.run(ParallelDestination.java:52)
            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)
    21:42:17,376 INFO  [http-nio-8080-exec-2][CompanyIndexFactory:57]
    

    Attachments

      Issue Links

        Activity

          People

            kyle.miho Kyle Miho
            victor.ware Victor Ware
            Kiyoshi Lee Kiyoshi Lee
            Alberto Chaparro Alberto Chaparro
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              1 year, 39 weeks ago

              Packages

                Version Package
                7.3.10 DXP FP1
                7.3.10.1 DXP SP1
                7.3.6 CE GA7
                7.3.7 CE GA8
                7.3.X
                7.4.0 CE GA1 DXP 7,4
                7.4.1 CE GA2 DXP 7,4
                7.4.13 DXP GA1
                Master