Saving InventoryViability results
When I save results of the viability test the PUT /api/v1/i/viability
fails with:
2021-06-22 08:07:01 qtp1032616650-13 ERROR ApiExceptionHandler:235 - Wow! Such! Exception!
java.lang.NullPointerException
at org.gringlobal.model.Inventory.lazyLoad(Inventory.java:751)
at org.gringlobal.model.InventoryViability.lazyLoad(InventoryViability.java:369)
at org.gringlobal.service.impl.CRUDServiceImpl._lazyLoad(CRUDServiceImpl.java:74)
at org.gringlobal.service.impl.InventoryViabilityServiceImpl.update(InventoryViabilityServiceImpl.java:268)
at org.gringlobal.service.impl.InventoryViabilityServiceImpl.update(InventoryViabilityServiceImpl.java:73)
at org.gringlobal.service.impl.CRUDServiceImpl.update(CRUDServiceImpl.java:146)
at org.gringlobal.service.impl.InventoryViabilityServiceImpl.update(InventoryViabilityServiceImpl.java:253)
at org.gringlobal.service.impl.InventoryViabilityServiceImpl.update(InventoryViabilityServiceImpl.java:73)
at jdk.internal.reflect.GeneratedMethodAccessor1093.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.validation.beanvalidation.MethodValidationInterceptor.invoke(MethodValidationInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:61)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:367)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:118)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
at com.sun.proxy.$Proxy643.update(Unknown Source)
at org.gringlobal.api.v1.CRUDController.update(CRUDController.java:104)
at org.gringlobal.api.v1.FilteredCRUDController.update(FilteredCRUDController.java:136)
at org.gringlobal.api.v1.FilteredCRUDController$$FastClassBySpringCGLIB$$2aaa677f.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:771)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749)
at org.springframework.validation.beanvalidation.MethodValidationInterceptor.invoke(MethodValidationInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:691)
at org.gringlobal.api.v1.impl.InventoryViabilityController$$EnhancerBySpringCGLIB$$a76b66f6.update(<generated>)
Please check.