top of page

Experienced Technology Product Manager adept at steering success throughout the entire product lifecycle, from conceptualization to market delivery. Proficient in market analysis, strategic planning, and effective team leadership, utilizing data-driven approaches for ongoing enhancements.

  • Twitter
  • LinkedIn
White Background

Null Pointer Exception during Business Group Migration

Updated: Apr 24, 2022


I was working on a Migration Project where we did encounter a NULL POINTER EXCEPTION during migration



Below Snippet is from migration-service-app.log


2021-07-22T05:37:12.928Z ERROR migration-service [host='migration-service-app-76b6d4c445-glgs6' thread='tasks-5' user='configadmin' org='1d22a685-bd12-4f22-89b1-cf0b5213a16f' trace='4cdb68a9-c202-4b27-851b-9c1ff4a6ace9'] c.v.a.m.s.AbstractMigrationService - null 
java.lang.NullPointerException: null
at com.vmware.automation.migration.service.converter.VsphereReservationDeserializer.deserialize(VsphereReservationDeserializer.java:156) 
        at com.vmware.automation.migration.service.converter.VsphereReservationDeserializer.deserialize(VsphereReservationDeserializer.java:29) 
        at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4526) 
        at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3468) 
        at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3436) 
        at com.vmware.automation.migration.service.converter.VsphereReservationConverterService.convert(VsphereReservationConverterService.java:105) 
        at com.vmware.automation.migration.service.ReservationMigrationService.migrateReservation(ReservationMigrationService.java:152) 
        at com.vmware.automation.migration.service.ReservationMigrationService.lambda$migrateReservations$0(ReservationMigrationService.java:110) 
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1541) 
        at com.vmware.automation.migration.service.ReservationMigrationService.migrateReservations(ReservationMigrationService.java:106) 
        at com.vmware.automation.migration.service.ContentMigrationService.migrateContent(ContentMigrationService.java:124) 
        at com.vmware.automation.migration.service.ContentMigrationService.lambda$migrateContent$6(ContentMigrationService.java:92) 
        at com.vmware.automation.migration.service.ContentMigrationService.lambda$handleBusinessGroups$9(ContentMigrationService.java:161) 
        at java.base/java.util.Optional.ifPresent(Optional.java:183) 
        at com.vmware.automation.migration.service.ContentMigrationService.lambda$handleBusinessGroups$10(ContentMigrationService.java:161) 
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) 
        at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177) 
        at java.base/java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1603) 
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) 
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) 
        at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) 
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) 
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) 
        at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497) 
        at com.vmware.automation.migration.service.ContentMigrationService.handleBusinessGroups(ContentMigrationService.java:158) 
        at com.vmware.automation.migration.service.ContentMigrationService.migrateContent(ContentMigrationService.java:89) 
        at com.vmware.automation.migration.service.ContentMigrationService$$FastClassBySpringCGLIB$$6f9a601d.invoke(<generated>) 
        at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) 
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:779) 
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) 
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750) 
        at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89) 
        at io.opentracing.contrib.spring.cloud.async.TraceAsyncAspect.traceBackgroundThread(TraceAsyncAspect.java:56) 
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
        at java.base/java.lang.reflect.Method.invoke(Method.java:566) 
        at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634) 
        at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624) 
        at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72) 
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) 
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750) 
        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) 
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) 
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750) 
        at org.springframework.aop.interceptor.AsyncExecutionInterceptor.lambda$invoke$0(AsyncExecutionInterceptor.java:115) 
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) 
        at io.opentracing.contrib.concurrent.TracedRunnable.run(TracedRunnable.java:30) 
        at org.springframework.security.concurrent.DelegatingSecurityContextRunnable.run(DelegatingSecurityContextRunnable.java:82) 
        at com.vmware.symphony.task.MDCTaskDecorator.lambda$decorate$0(MDCTaskDecorator.java:41) 
        at com.vmware.symphony.task.RequestAttributesTaskDecorator.lambda$decorate$0(RequestAttributesTaskDecorator.java:27) 
        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:829)


What happens when you start a migration in vRA 8.x ?

1. Migration Triggers
2. Requests Business Groups assessment report
3. Marks Business Group from Assessing to Migrating 
4. Get's the content: Source vRA Server ,Business Group ID , Content Type and Content ID
5. Converts vRA endpoints to Cloud Account ( that's the vSphere endpoint )
6. Creates vSphere Cloud Account associations 
7. Starts Migrating Business Group
8. Converts vSphere Reservation
9. Get's Endpoint Link
10. Get's Resource Pool Link
11. Get's Provisioning Region Link
12. Get's Storage Descriptions
13. Get's Subnet Name
14. Updates Subnet Network ID
15. Marks reservation tagged with the Business Group as converted
16. Assigns Tags & Creates Subnet Range
17. Assigns Tags & Creates Network Profile
18. Assigns Tags & Creates Storage Profile
19. Updates Property Configuration
20. Migrates Property Group for business group
21. Blueprint Migration starts
22. Parses Custom form if one exists, If there are any XaaS stuff , it get's it here
23. Converts blueprint
24. Versions and Releases Blueprint to Service Broker
25. Creates Policies
26. Migrates IP Allocations from Source
27. Creates IP Address State
28. Marks completion of Successful Business Group Migration 


The exception mentioned above happened during vSphere Reservation conversion


We looked into the JSON response which we get during vSphere reservation conversion, as we can see below we are missing a whole computeResource section as compared to my lab


This was the reason for the NULL POINTER EXCEPTION. But why is this not picking up the data was the question



The answer was lying inside assessment logs




 2021-07-21T01:24:22.418Z WARN assessment-service [host='assessment-service-app-6dfbfd896c-ljctk' thread='ForkJoinPool-2-worker-3' user='' org='' trace=''] c.v.a.capture.BusinessGroupServiceImpl - Error occurred while capturing machine prefix id 4e13bfce-dd56-4ddb-8c65-1d8ea5b9233a with error: I/O error on GET request for "https://<<iaaswebfqdn>>/repository/data/ManagementModelEntities.svc/HostNamePrefixes": Connect to <<iaaswebfqdn>>:443 [iaaswebfqdn/10.xx.xx.xx] failed: Connection timed out (Connection timed out); nested exception is org.apache.http.conn.HttpHostConnectException: Connect to iaaswebfqdn:443 [iaaswebfqdn/10.xx.xx.xx] failed: Connection timed out (Connection timed out)

Due to these timeouts during assessment of data, We are getting partial information and hence seems to be causing Null Pointer Exception


So basically it turned out to be firewall port between the IAAS Web node and the vRA 8 Appliance is not open. Which led to failures.



So ensure all appropriate ports are open before Migration.




200 views0 comments

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
bottom of page