-
Bug
-
Resolution: Done
-
Medium
-
Honolulu Release, Istanbul Release, Jakarta Release
-
None
Failure happens during onboarding of heat package with below manifest
{ "name": "ubuntu", "description": "", "data": [ { "file": "base.yaml", "type": "HEAT", "isBase": "true" }, { "file": "ubuntu-vf-module.yaml", "type": "HEAT", "isBase": "false", "data": [ { "file": "ubuntu-vf-module.env", "type": "HEAT_ENV" } ] }, { "file": "prep.sh", "type": "HEAT_ARTIFACT", "isBase": "false" } ] }
When this object is serialized the FileData object for prep.sh will have null type, since HEAT_ARTIFACT is not a value in the FileData.Type enum. This will cause a NPE in the isPmDictionary method
private boolean isPmDictionary(String artifact, ManifestContent existingManifest) { return existingManifest.getData().stream().filter(fileData -> fileData.getType().equals(FileData.Type.PM_DICTIONARY)).map(FileData::getFile) .anyMatch(pmDictionaryFile -> pmDictionaryFile.equals(artifact)); }
0492461c0638 PartnerName=cs0008 ServerFQDN=onap-sdc-onboarding-be-69974bd798-ltn7f ServerIpAddress=10.42.2.145 ServiceName=PUT: /onboarding-api/v1.0/vendor-software-produ cts/7834d3debcf444ba98b27aeef838577f/versions/4501b58b45754fc182d23255711b079f/orchestration-template-candidate/process An internal error has occurred. Please contact support. Error ID: D OTQIVOM java.lang.NullPointerException: null 82d23255711b079f/orchestration-template-candidate/process An internal error has occurred. Please contact support. Error ID: DOTQIVOM java.lang.NullPointerException: null at org.openecomp.sdc.vendorsoftwareproduct.services.impl.filedatastructuremodule.ManifestCreatorNamingConventionImpl.lambda$isPmDictionary$0(ManifestCreatorNamingConventionImpl.java:100) at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(Unknown Source) at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source) at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown Source) at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(Unknown Source) at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(Unknown Source) at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source) at java.base/java.util.stream.ReferencePipeline.anyMatch(Unknown Source) at org.openecomp.sdc.vendorsoftwareproduct.services.impl.filedatastructuremodule.ManifestCreatorNamingConventionImpl.isPmDictionary(ManifestCreatorNamingConventionImpl.java:101) at org.openecomp.sdc.vendorsoftwareproduct.services.impl.filedatastructuremodule.ManifestCreatorNamingConventionImpl.addArtifactsToManifestFileDataList(ManifestCreatorNamingConventionImpl.java:90) at org.openecomp.sdc.vendorsoftwareproduct.services.impl.filedatastructuremodule.ManifestCreatorNamingConventionImpl.createManifestFromExisting(ManifestCreatorNamingConventionImpl.java:74) at org.openecomp.sdc.vendorsoftwareproduct.services.impl.filedatastructuremodule.CandidateServiceImpl.createManifestFromExisting(CandidateServiceImpl.java:320) at org.openecomp.sdc.vendorsoftwareproduct.impl.orchestration.process.OrchestrationTemplateProcessZipHandler.process(OrchestrationTemplateProcessZipHandler.java:97) at org.openecomp.sdc.vendorsoftwareproduct.impl.OrchestrationTemplateCandidateManagerImpl.lambda$process$1(OrchestrationTemplateCandidateManagerImpl.java:74) at java.base/java.util.Optional.map(Unknown Source) at org.openecomp.sdc.vendorsoftwareproduct.impl.OrchestrationTemplateCandidateManagerImpl.process(OrchestrationTemplateCandidateManagerImpl.java:74) at org.openecomp.sdcrests.vsp.rest.services.OrchestrationTemplateCandidateImpl.process(OrchestrationTemplateCandidateImpl.java:284) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source)