I didn't realize there was more than one. Yes I was looking at the one on line 140 and did not see how the could be null. What was the cause?
VDBRepository keeps track of all the VDBs that are deployed, that are active, in-active and in-process of loading metadata. When the VDB is in middle or stalled for loading the metadata then the getVDB call on the CompositeVDB returns a null.
I have changed "getVDB" call to return only metadata loaded VDBs with null check, and added another method to return all the on-going VDBs for other purposes such as VDBStatusCheck.
OK TEIID.8.cr2 fixes the problem.