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

NullPointerException with com.liferay.segments.internal.model.listener.test.RoleModelListenerTest > testSegmentsEntryRolesRemovedWhenRoleRemoved

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Duplicate
    • Affects Version/s: Master
    • Fix Version/s: None
    • Component/s: User Management
    • Labels:
      None

      Description

      When the test RoleModelListenerTest.testSegmentsEntryRolesRemovedWhenRoleRemoved is executed, a Null pointer exception is found:

      > Task :apps:segments:segments-test:testIntegration
      
      com.liferay.segments.internal.model.listener.test.RoleModelListenerTest STANDARD_OUT
          Loading jar:file:/Users/crtistinagonzalez/Work/Code/Liferay/bundles/tomcat-9.0.17/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
      
      com.liferay.segments.internal.model.listener.test.RoleModelListenerTest > testSegmentsEntryRolesRemovedWhenRoleRemoved STARTED
      
      com.liferay.segments.internal.model.listener.test.RoleModelListenerTest > testSegmentsEntryRolesRemovedWhenRoleRemoved FAILED
          java.lang.NullPointerException
          	at com.liferay.account.internal.model.listener.RoleModelListener.onAfterRemove(RoleModelListener.java:85)
          	at com.liferay.account.internal.model.listener.RoleModelListener.onAfterRemove(RoleModelListener.java:44)
          	at com.liferay.portal.kernel.service.persistence.impl.BasePersistenceImpl.remove(BasePersistenceImpl.java:475)
          	at com.liferay.portal.service.impl.RoleLocalServiceImpl.deleteRole(RoleLocalServiceImpl.java:490)
          	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          	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.kernel.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:64)
          	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
          	at com.liferay.portal.kernel.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:64)
          	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.$Proxy106.deleteRole(Unknown Source)
          	at com.liferay.portal.service.base.RoleLocalServiceBaseImpl.deletePersistedModel(RoleLocalServiceBaseImpl.java:408)
          	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          	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.$Proxy106.deletePersistedModel(Unknown Source)
          	at com.liferay.portal.kernel.test.rule.DeleteAfterTestRunMethodTestRule.removeField(DeleteAfterTestRunMethodTestRule.java:264)
          	at com.liferay.portal.kernel.test.rule.DeleteAfterTestRunMethodTestRule.afterMethod(DeleteAfterTestRunMethodTestRule.java:165)
          	at com.liferay.portal.kernel.test.rule.DeleteAfterTestRunMethodTestRule.afterMethod(DeleteAfterTestRunMethodTestRule.java:51)
          	at com.liferay.portal.kernel.test.rule.AbstractTestRule$2.evaluate(AbstractTestRule.java:106)
          	at com.liferay.portal.kernel.test.rule.AbstractTestRule$2.evaluate(AbstractTestRule.java:99)
          	at com.liferay.portal.kernel.test.rule.AbstractTestRule$2.evaluate(AbstractTestRule.java:99)
          	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
          	at com.liferay.arquillian.extension.junit.bridge.server.TestExecutorRunnable$1.evaluate(TestExecutorRunnable.java:143)
          	at com.liferay.portal.kernel.test.rule.AbstractTestRule$1.evaluate(AbstractTestRule.java:59)
          	at com.liferay.portal.kernel.test.rule.AbstractTestRule$1.evaluate(AbstractTestRule.java:59)
          	at com.liferay.portal.kernel.test.rule.AbstractTestRule$1.evaluate(AbstractTestRule.java:59)
          	at com.liferay.portal.kernel.test.rule.AbstractTestRule$1.evaluate(AbstractTestRule.java:59)
          	at com.liferay.portal.kernel.test.rule.AbstractTestRule$1.evaluate(AbstractTestRule.java:59)
          	at com.liferay.portal.kernel.test.rule.AbstractTestRule$1.evaluate(AbstractTestRule.java:59)
          	at com.liferay.portal.kernel.test.rule.AbstractTestRule$1.evaluate(AbstractTestRule.java:59)
          	at com.liferay.portal.kernel.test.rule.AbstractTestRule$1.evaluate(AbstractTestRule.java:59)
          	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
          	at com.liferay.arquillian.extension.junit.bridge.server.TestExecutorRunnable._execute(TestExecutorRunnable.java:181)
          	at com.liferay.arquillian.extension.junit.bridge.server.TestExecutorRunnable.run(TestExecutorRunnable.java:95)
          	at java.lang.Thread.run(Thread.java:748)
      
      1 test completed, 1 failed
      There were failing tests. See the report at: file:///Users/crtistinagonzalez/Work/Code/Liferay/liferay-portal/modules/apps/segments/segments-test/build/reports/tests/testIntegration/index.html
      
      > Task :apps:segments:segments-test:stopTestableTomcat
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              patricia.perez Patricia Perez
              Reporter:
              cristina.gonzalez Cristina Gonzalez
              Participants of an Issue:
              Recent user:
              Patricia Perez
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                34 weeks ago

                  Packages

                  Version Package