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

BaseExportImportTestCase.tearDown() does a duplicate removal cause tons of exceptions

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 6.2.0 CE GA1
    • Fix Version/s: 6.2.X EE, 7.0.0 M1
    • Component/s: Legacy
    • Labels:
      None

      Description

      GroupLocalServiceUtil.deleteGroup(group) automatically removes LayoutSet which in turn removes all the layouts. Remove the layout again in tearDown() will cause a removal failure.

          [junit] 18:07:39,824 ERROR [main][LayoutSetPrototypeLayoutListener:81] java.lang.NullPointerException
          [junit] java.lang.NullPointerException
          [junit] 	at com.liferay.portal.service.impl.LayoutSetPrototypeLayoutListener.updateLayoutSetPrototype(LayoutSetPrototypeLayoutListener.java:55)
          [junit] 	at com.liferay.portal.service.impl.LayoutSetPrototypeLayoutListener.onAfterRemove(LayoutSetPrototypeLayoutListener.java:45)
          [junit] 	at com.liferay.portal.service.impl.LayoutSetPrototypeLayoutListener.onAfterRemove(LayoutSetPrototypeLayoutListener.java:1)
          [junit] 	at com.liferay.portal.model.BaseModelListener.onAfterRemove(BaseModelListener.java:1)
          [junit] 	at com.liferay.portal.service.persistence.impl.BasePersistenceImpl.remove(BasePersistenceImpl.java:287)
          [junit] 	at com.liferay.portal.service.base.LayoutLocalServiceBaseImpl.deleteLayout(LayoutLocalServiceBaseImpl.java:204)
          [junit] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          [junit] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          [junit] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          [junit] 	at java.lang.reflect.Method.invoke(Method.java:606)
          [junit] 	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
          [junit] 	at com.liferay.portal.service.impl.LayoutLocalServiceVirtualLayoutsAdvice.invoke(LayoutLocalServiceVirtualLayoutsAdvice.java:182)
          [junit] 	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
          [junit] 	at com.liferay.portal.service.impl.LayoutLocalServiceStagingAdvice.invoke(LayoutLocalServiceStagingAdvice.java:168)
          [junit] 	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
          [junit] 	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
          [junit] 	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:55)
          [junit] 	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
          [junit] 	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
          [junit] 	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
          [junit] 	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
          [junit] 	at com.sun.proxy.$Proxy39.deleteLayout(Unknown Source)
          [junit] 	at com.liferay.portal.service.LayoutLocalServiceUtil.deleteLayout(LayoutLocalServiceUtil.java:91)
          [junit] 	at com.liferay.portal.lar.BaseExportImportTestCase.tearDown(BaseExportImportTestCase.java:82)
          [junit] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          [junit] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          [junit] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          [junit] 	at java.lang.reflect.Method.invoke(Method.java:606)
          [junit] 	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
          [junit] 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
          [junit] 	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
          [junit] 	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)
          [junit] 	at com.liferay.portal.kernel.test.RunAfterTestMethodCallback.evaluate(RunAfterTestMethodCallback.java:49)
          [junit] 	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
          [junit] 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
          [junit] 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
          [junit] 	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
          [junit] 	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
          [junit] 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
          [junit] 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
          [junit] 	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
          [junit] 	at com.liferay.portal.kernel.test.RunBeforeTestClassesCallback.evaluate(RunBeforeTestClassesCallback.java:39)
          [junit] 	at com.liferay.portal.kernel.test.RunAfterTestClassesCallback.evaluate(RunAfterTestClassesCallback.java:42)
          [junit] 	at com.liferay.portal.test.LiferayIntegrationJUnitTestRunner$1.evaluate(LiferayIntegrationJUnitTestRunner.java:74)
          [junit] 	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
          [junit] 	at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:38)
          [junit] 	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:523)
          [junit] 	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1063)
          [junit] 	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:914)
      

        Attachments

          Activity

            People

            • Assignee:
              brian.chan Brian Chan
              Reporter:
              shuyang.zhou Shuyang Zhou
              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:
                5 years, 28 weeks, 5 days ago