PUBLIC - Liferay Portal Community Edition
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-30787

6.2.x - IllegalArgumentException and unable to delete a vocabulary that has a category with a subcategory unless user first expands the parent category tree

    Details

    • Type: Regression Bug Regression Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 6.2.0 CE M2
    • Fix Version/s: 6.2.0 CE M2
    • Component/s: WCM, WCM > Categories
    • Labels:
      None
    • Environment:
      Tomcat 7.0.27 + MySQL 5. Portal 6.2.x GIT ID: e54bd3180ef32e77adee7f43994cccc3c311097f.
    • Similar Issues:
      Show 4 results 

      Description

      Steps to reproduce:

      1. Navigate to Control Panel > Categories
      2. Add a vocabulary
      3. Add a category
      4. Add a subcategory to the category
      5. Click on the check box next to the vocabulary, then click Actions > Delete
        • This will result in an error message and the exception and stacktrace below.
        • If the user clicks on the expand arrow to show the subcategory and then tries to delete, it will delete fine. It seems that it all depends on whether or not the subcategory becomes visible at some point in time.
      00:41:18,679 ERROR [http-bio-8080-exec-7][JSONWebServiceServiceAction:122] com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: java.lang.IllegalArgumentException: attempt to create delete event with null entity
      com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: java.lang.IllegalArgumentException: attempt to create delete event with null entity
              at com.liferay.portal.service.persistence.impl.BasePersistenceImpl.processException(BasePersistenceImpl.java:211)
              at com.liferay.portlet.asset.service.persistence.AssetCategoryPersistenceImpl.removeImpl(AssetCategoryPersistenceImpl.java:557)
              at com.liferay.portlet.asset.service.persistence.AssetCategoryPersistenceImpl.removeImpl(AssetCategoryPersistenceImpl.java:1)
              at com.liferay.portal.service.persistence.impl.BasePersistenceImpl.remove(BasePersistenceImpl.java:241)
              at com.liferay.portlet.asset.service.impl.AssetCategoryLocalServiceImpl.deleteCategory(AssetCategoryLocalServiceImpl.java:177)
              at com.liferay.portlet.asset.service.impl.AssetCategoryLocalServiceImpl.deleteVocabularyCategories(AssetCategoryLocalServiceImpl.java:221)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:122)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
              at com.liferay.portal.security.pacl.PACLAdvice.invoke(PACLAdvice.java:51)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:162)
              at $Proxy120.deleteVocabularyCategories(Unknown Source)
              at com.liferay.portlet.asset.service.impl.AssetVocabularyLocalServiceImpl.deleteVocabulary(AssetVocabularyLocalServiceImpl.java:176)
              at com.liferay.portlet.asset.service.impl.AssetVocabularyLocalServiceImpl.deleteVocabulary(AssetVocabularyLocalServiceImpl.java:186)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:122)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
              at com.liferay.portal.security.pacl.PACLAdvice.invoke(PACLAdvice.java:51)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:162)
              at $Proxy132.deleteVocabulary(Unknown Source)
              at com.liferay.portlet.asset.service.impl.AssetVocabularyServiceImpl.deleteVocabularies(AssetVocabularyServiceImpl.java:85)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:122)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
              at com.liferay.portal.security.pacl.PACLAdvice.invoke(PACLAdvice.java:51)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:162)
              at $Proxy133.deleteVocabularies(Unknown Source)
              at com.liferay.portlet.asset.service.AssetVocabularyServiceUtil.deleteVocabularies(AssetVocabularyServiceUtil.java:89)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at com.liferay.portal.jsonwebservice.JSONWebServiceActionImpl._invokeActionMethod(JSONWebServiceActionImpl.java:191)
              at com.liferay.portal.jsonwebservice.JSONWebServiceActionImpl.invoke(JSONWebServiceActionImpl.java:66)
              at com.liferay.portal.jsonwebservice.JSONWebServiceServiceAction.getJSON(JSONWebServiceServiceAction.java:106)
              at com.liferay.portal.struts.JSONAction.execute(JSONAction.java:77)
              at com.liferay.portal.servlet.JSONServlet.service(JSONServlet.java:61)
              at com.liferay.portal.jsonwebservice.JSONWebServiceServlet.service(JSONWebServiceServlet.java:74)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
              at com.liferay.portal.servlet.filters.authverifier.AuthVerifierFilter.processFilter(AuthVerifierFilter.java:169)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
              at com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter.processFilter(NtlmPostFilter.java:83)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
              at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:88)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
              at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:191)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:187)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:95)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
              at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:167)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:95)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:167)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:95)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:187)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:95)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:75)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
              at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
              at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
              at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
              at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
              at java.lang.Thread.run(Thread.java:662)
      Caused by: com.liferay.portal.kernel.dao.orm.ORMException: java.lang.IllegalArgumentException: attempt to create delete event with null entity
              at com.liferay.portal.dao.orm.hibernate.ExceptionTranslator.translate(ExceptionTranslator.java:30)
              at com.liferay.portal.dao.orm.hibernate.SessionImpl.delete(SessionImpl.java:105)
              at com.liferay.portal.kernel.dao.orm.ClassLoaderSession.delete(ClassLoaderSession.java:180)
              at com.liferay.portlet.asset.service.persistence.AssetCategoryPersistenceImpl.removeImpl(AssetCategoryPersistenceImpl.java:554)
              ... 139 more
      Caused by: java.lang.IllegalArgumentException: attempt to create delete event with null entity
              at org.hibernate.event.DeleteEvent.<init>(DeleteEvent.java:47)
              at org.hibernate.impl.SessionImpl.delete(SessionImpl.java:934)
              at com.liferay.portal.dao.orm.hibernate.SessionImpl.delete(SessionImpl.java:102)
              ... 141 more

        Issue Links

          Activity

          Hide
          Brian Chiu added a comment -

          Working as of:
          Tomcat 7.0.27 + MySQL 5. Portal 6.2.x GIT ID: 9019f544f8c85fe793bccebf7dd3fc7296ece594.

          Show
          Brian Chiu added a comment - Working as of: Tomcat 7.0.27 + MySQL 5. Portal 6.2.x GIT ID: 9019f544f8c85fe793bccebf7dd3fc7296ece594.
          Hide
          Shuyang Zhou added a comment -

          This issue is caused by duplicate remove within same tx.

          When delete by vocabulary, if there are parent and child categories having the same vocabulary, the first level serivce will trigger two remove persistence calls for both parent and child. And on removing parent, it will also trigger remove persistence call to its children. Which will make the first level service triggered remove for child category duplicate.

          The fix is adding a protection on non-exist persistence entity on removal.

          Show
          Shuyang Zhou added a comment - This issue is caused by duplicate remove within same tx. When delete by vocabulary, if there are parent and child categories having the same vocabulary, the first level serivce will trigger two remove persistence calls for both parent and child. And on removing parent, it will also trigger remove persistence call to its children. Which will make the first level service triggered remove for child category duplicate. The fix is adding a protection on non-exist persistence entity on removal.
          Hide
          Michael Saechang added a comment -

          Committed on:
          Portal 6.2.x GIT ID: b3e6bb1f5af9f59eb814e4a43e28ae449ced3e58.

          Show
          Michael Saechang added a comment - Committed on: Portal 6.2.x GIT ID: b3e6bb1f5af9f59eb814e4a43e28ae449ced3e58.
          Hide
          Brian Chiu added a comment -

          PASSED Manual Testing following the steps in the description.

          Fixed on:
          Tomcat 7.0.27 + MySQL 5. Portal. 6.2.x GIT ID: b96406f2b733e82c08b5624ef3bf1929a4d6005f.

          You can now delete vocabularies that have subcategories that are in a non-expanded tree.

          Show
          Brian Chiu added a comment - PASSED Manual Testing following the steps in the description. Fixed on: Tomcat 7.0.27 + MySQL 5. Portal. 6.2.x GIT ID: b96406f2b733e82c08b5624ef3bf1929a4d6005f. You can now delete vocabularies that have subcategories that are in a non-expanded tree.

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                2 years, 26 weeks, 4 days ago

                Development

                  Structure Helper Panel