When a VDB import in play with multiple levels of nesting ( > 1) then the resolution of the model's classloaders are not correctly resolved.
TEIID40133 samplevdb-vdb.xml deploy failed java.lang.ArrayIndexOutOfBoundsException: 2] with root cause java.lang.ArrayIndexOutOfBoundsException: 2 at org.teiid.deployers.CompositeVDB.buildCompositeState(CompositeVDB.java:191) at org.teiid.deployers.CompositeVDB.<init>(CompositeVDB.java:84) at org.teiid.deployers.VDBRepository.addVDB(VDBRepository.java:125) at org.teiid.runtime.EmbeddedServer.deployVDB(EmbeddedServer.java:842) at org.teiid.runtime.EmbeddedServer.deployVDB(EmbeddedServer.java:764) at org.teiid.runtime.EmbeddedAdminImpl.deploy(EmbeddedAdminImpl.java:237) at org.komodo.metadata.internal.DefaultMetadataInstance.deploy(DefaultMetadataInstance.java:397) at org.komodo.rest.service.KomodoMetadataService.updatePreviewVdb(KomodoMetadataService.java:255) at org.komodo.rest.service.KomodoMetadataService.lambda$query$1(KomodoMetadataService.java:233) at org.komodo.repository.KEngineImpl.runInTransaction(KEngineImpl.java:79) at org.komodo.rest.service.KomodoMetadataService.query(KomodoMetadataService.java:232) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)