Uploaded image for project: 'Clamp'
  1. Clamp
  2. CLAMP-857

Distribution error - NPE from CdsDataInstaller (sdnc_model_name property is null)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: High High
    • Frankfurt Release
    • Frankfurt Release
    • None

      I'm distributing service with 1 VNF with DCAE blueprint attached. It was working fine with older Frankfurt version but I tested it on most recent version (clamp-backend 5.0.6) and I get NullPointerException from CdsDataInstaller:

       2020-05-27 08:17:21.196 [pool-4-thread-3] INFO  org.onap.clamp.loop.CsarInstaller - Installing the CSAR /tmp/sdc-controllers/sdc-controller/service-LgAaSrv-csar.csar
      2020-05-27 08:17:21.197 [pool-4-thread-3] INFO  org.onap.clamp.loop.service.CsarServiceInstaller - Start to install the Service from csar
      2020-05-27 08:17:21.197 [pool-4-thread-3] INFO  org.onap.clamp.loop.service.CsarServiceInstaller - Start to install the Service from csar
      2020-05-27 08:17:21.197 [pool-4-thread-3] DEBUG org.onap.sdc.tosca.parser.impl.SdcCsarHelperImpl - getEntity request: EntityQuery <EntityType=GROUP, nodeTemplateType=null, toscaType=null, uUID=null, customizationUUID=null>, TopologyTempla
      teQuery <sdcType=Service, customizationUUID=null>,  isRecursive<false>
      2020-05-27 08:17:21.197 [pool-4-thread-3] DEBUG org.onap.sdc.tosca.parser.impl.QueryProcessor - Service lg-aa-srv is searched for EntityType=GROUP, nodeTemplateType=null, toscaType=null, uUID=null, customizationUUID=null
      2020-05-27 08:17:21.199 [pool-4-thread-3] INFO  org.onap.clamp.loop.service.CsarServiceInstaller - Successfully installed the Service
      2020-05-27 08:17:21.199 [pool-4-thread-3] INFO  org.onap.clamp.loop.service.CsarServiceInstaller - Successfully installed the Service
      2020-05-27 08:17:21.201 [pool-4-thread-3] ERROR org.onap.clamp.clds.sdc.controller.SdcSingleController - Unexpected exception caught during the notification processing
      java.lang.NullPointerException: null
              at org.onap.clamp.loop.cds.CdsDataInstaller.installCdsServiceProperties(CdsDataInstaller.java:77)
              at org.onap.clamp.loop.cds.CdsDataInstaller$$FastClassBySpringCGLIB$$a11c3509.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.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:366)
              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.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749)
              at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:691)
              at org.onap.clamp.loop.cds.CdsDataInstaller$$EnhancerBySpringCGLIB$$e0820283.installCdsServiceProperties(<generated>)
              at org.onap.clamp.loop.CsarInstaller.installTheCsar(CsarInstaller.java:121)
              at org.onap.clamp.clds.sdc.controller.SdcSingleController.treatNotification(SdcSingleController.java:277)
              at org.onap.clamp.clds.sdc.controller.SdcSingleController$SdcNotificationCallBack.activateCallback(SdcSingleController.java:100)
              at org.onap.sdc.impl.NotificationConsumer.run(NotificationConsumer.java:71)
              at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
              at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
              at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
              at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
              at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
              at java.base/java.lang.Thread.run(Thread.java:834)
      2020-05-27 08:17:21.201 [pool-4-thread-3] ERROR org.onap.clamp.clds.sdc.controller.SdcSingleController - Unexpected exception caught during the notification processing
      java.lang.NullPointerException: null
              at org.onap.clamp.loop.cds.CdsDataInstaller.installCdsServiceProperties(CdsDataInstaller.java:77)
              at org.onap.clamp.loop.cds.CdsDataInstaller$$FastClassBySpringCGLIB$$a11c3509.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.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:366)
              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.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749)
              at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:691)
              at org.onap.clamp.loop.cds.CdsDataInstaller$$EnhancerBySpringCGLIB$$e0820283.installCdsServiceProperties(<generated>)
              at org.onap.clamp.loop.CsarInstaller.installTheCsar(CsarInstaller.java:121)
              at org.onap.clamp.clds.sdc.controller.SdcSingleController.treatNotification(SdcSingleController.java:277)
              at org.onap.clamp.clds.sdc.controller.SdcSingleController$SdcNotificationCallBack.activateCallback(SdcSingleController.java:100)
              at org.onap.sdc.impl.NotificationConsumer.run(NotificationConsumer.java:71)
              at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
      

      When I checked the code of CdsDataInstaller it seems it tries to read sdnc_model_name and sdnc_model_version properties which I haven't set for my VNF nor I didn't have to before.

      Are these properties mandatory now? Looking at the code It doesn't seem too because there are null checks later. It's the toString() method that causes error in line 77 of CdsDataInstaller. 

      The changes were introduced by this merge: https://gerrit.onap.org/r/c/clamp/+/106471

            lgrech lgrech
            lgrech lgrech
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: