Actions
Defect #2192
closedFix RoleAssignmentReportExectutor nullPointer exception when does not exist anymore
Start date:
04/06/2020
Due date:
% Done:
100%
Estimated time:
Affected versions:
Owner:
Description
There is bug when role is null, the it throws nullPointer exception as follow.
eu.bcvsolutions.idm.core.api.exception.CoreException
at eu.bcvsolutions.idm.rpt.api.executor.AbstractReportExecutor.generate(AbstractReportExecutor.java:72)
at eu.bcvsolutions.idm.extras.report.RoleAssignmentReportExectutor$$EnhancerBySpringCGLIB$$a03a3fce.generate(<generated>)
at eu.bcvsolutions.idm.rpt.api.executor.AbstractReportExecutor.process(AbstractReportExecutor.java:80)
at eu.bcvsolutions.idm.extras.report.RoleAssignmentReportExectutor$$EnhancerBySpringCGLIB$$a03a3fce.process(<generated>)
at eu.bcvsolutions.idm.rpt.api.executor.AbstractReportExecutor.process(AbstractReportExecutor.java:34)
at eu.bcvsolutions.idm.extras.report.RoleAssignmentReportExectutor$$EnhancerBySpringCGLIB$$a03a3fce.process(<generated>)
at eu.bcvsolutions.idm.core.scheduler.api.service.AbstractLongRunningTaskExecutor.call(AbstractLongRunningTaskExecutor.java:204)
at eu.bcvsolutions.idm.extras.report.RoleAssignmentReportExectutor$$EnhancerBySpringCGLIB$$a03a3fce.call(<generated>)
at eu.bcvsolutions.idm.core.scheduler.api.service.AbstractLongRunningTaskExecutor$$FastClassBySpringCGLIB$$f9eae371.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:720)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85)
at eu.bcvsolutions.idm.core.security.service.impl.EnabledAspect.checkBeanEnabled(EnabledAspect.java:52)
at sun.reflect.GeneratedMethodAccessor155.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:620)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:609)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:68)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:655)
at eu.bcvsolutions.idm.extras.report.RoleAssignmentReportExectutor$$EnhancerBySpringCGLIB$$8537ab7c.call(<generated>)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.springframework.security.concurrent.DelegatingSecurityContextRunnable.run(DelegatingSecurityContextRunnable.java:80)
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: java.lang.NullPointerException
at eu.bcvsolutions.idm.extras.report.RoleAssignmentReportExectutor.getSystem(RoleAssignmentReportExectutor.java:169)
at eu.bcvsolutions.idm.extras.report.RoleAssignmentReportExectutor.getReportDto(RoleAssignmentReportExectutor.java:160)
at eu.bcvsolutions.idm.extras.report.RoleAssignmentReportExectutor.generateData(RoleAssignmentReportExectutor.java:127)
at eu.bcvsolutions.idm.extras.report.RoleAssignmentReportExectutor$$EnhancerBySpringCGLIB$$a03a3fce.generateData(<generated>)
at eu.bcvsolutions.idm.rpt.api.executor.AbstractReportExecutor.generate(AbstractReportExecutor.java:65)
... 29 more
For fixing this I will return role have need deleted message in report.
Updated by Marek Klement almost 5 years ago
- Assignee changed from Marek Klement to Peter Štrunc
- Fixed this also with other possible null pointer exceptions.
- Added new test and fixed others
- on branch personal/klement/2192-fix-null-pointer-in-report
Can you please make a code review?
Updated by Marek Klement almost 5 years ago
- Status changed from New to Needs feedback
Updated by Tomáš Doischer almost 5 years ago
This report should be moved to the reports module, check #1977. Can you let @michalp (he should move it there) know?
Updated by Peter Štrunc over 4 years ago
- Target version changed from 1.7.2 to 1.8.0
- % Done changed from 0 to 100
Review OK. Thanks
Updated by Peter Štrunc over 4 years ago
- Status changed from Needs feedback to Closed
Actions