Purpose (problem description)

This page provides assistance with solving the issue of a validation error of a NullPointerException during the Delivery Manager Tool process. 

The DMT error may be " The program Validation has not ended correctly (2001)" shown in the screenshot below



















The associated log file then may look like this:


Observed in CAST Version


Release

Yes/No

8.3.x, x<13(tick)
Observed in RDBMS

RDBMS

Yes/No

Oracle Server N/A
Microsoft SQL Server N/A
CSS3N/A
CSS2 N/A
Step by Step scenario
  1. Package the source code
  2. Error during validation step
Action Plan

Perform the below actions

  1. Make sure the following has been followed for packaging:  Delivery Manager Tool - Information - How to Package Java applications using the Delivery Manager Tools
  2. If this does not resolve this issue, this error generally is due to a problem with a reference in the pom.xml file. This is solved in CAST version 8.3.13. If an upgrade to 8.3.13 is not possible, the workaround is then to
    1. Exclude from the package any pom.xml files that are the reason for this problem. 
      1. This is done by packaging by dichotomy, to basically determine which package or packages is causing the problem.  Please see this page for information on dichotomy:   CMS Snapshot Analysis - Information - Overview of the Dichotomy process
      2. This may result in more alerts which would have to be manually re-mediated.
  3. There is also an issue which has been fixed in 8.3.22 with this same error, in this case the workaround is to upgrade to 8.3.22 or to do the following to resolve this particular issue:
    1. The solution is to manage the delivery of the version that has failed. 
    2. Go to the package for the Source Code.
    3. Go to the tab named Alerts.
    4. Go to the section Any manual remediation to apply for alerts?  and go to Remediation items.  (screenshot below):
    5. Sort the Alerts by name and delete the duplications. For instance, if you see 3 similar alerts remediated, you drop 2 alerts.
    6. Then package again. 
  4. There is also another issue with this error that was caused by changes in 8.3.16 in the extractor and resolved as well in 8.3.22.  In this case, if an upgrade to 8.3.22 is not possible, then do the following workaround:
    1. In 8.3.16, the Extractor has been changed.  When it is trying to remediate the alert which was part of the previous package, it is unable to find the respective jar from the source package present in the delivery folder of the previous version.   When this occurs, the automatic remediation is also not performed as the manual remediation is already applied.   To solve the issue, you need to remove all the manual remediation's present and re-run the packaging again.   The respective jars will be picked up through automatic remediation. 
  5. There is also another issue which results in the below error stack - 
Error Stack
null
---
java.lang.NullPointerException:
 at org.apache.maven.artifact.versioning.ComparableVersion.parseVersion(ComparableVersion.java:354)
 at org.apache.maven.artifact.versioning.ComparableVersion.<init>(ComparableVersion.java:345)
 at org.apache.maven.artifact.versioning.DefaultArtifactVersion.parseVersion(DefaultArtifactVersion.java:110)
 at org.apache.maven.artifact.versioning.DefaultArtifactVersion.<init>(DefaultArtifactVersion.java:46)
 at com.castsoftware.dmt.engine.version.MavenComparator.bestMatch(MavenComparator.java:95)
 at com.castsoftware.dmt.engine.version.MetadataVersion.bestMatch(MetadataVersion.java:297)
 at com.castsoftware.dmt.engine.validation.ProjectsValidationEngine$ResolutionReportGenerator$ReferenceResolver.extractReference(ProjectsValidationEngine.java:324)
 at com.castsoftware.dmt.engine.validation.ProjectsValidationEngine$ResolutionReportGenerator$ReferenceResolver.resolveResourceReference(ProjectsValidationEngine.java:271)
 at com.castsoftware.dmt.engine.validation.ProjectsValidationEngine$ResolutionReportGenerator$ReferenceResolver.visitProjectReference(ProjectsValidationEngine.java:527)
 at com.castsoftware.dmt.engine.project.Profile$ResourceReferenceKind$5.accept(Profile.java:693)
 at com.castsoftware.dmt.engine.project.Profile$ResourceReferenceKind$5.accept(Profile.java:688)
 at com.castsoftware.dmt.engine.project.Resource$Reference.accept(Resource.java:386)
 at com.castsoftware.dmt.engine.validation.ProjectsValidationEngine$ResolutionReportGenerator$ReferenceResolver.resolve(ProjectsValidationEngine.java:468)
 at com.castsoftware.dmt.engine.validation.ProjectsValidationEngine$ProfileOrProjectReferences.resolveReference(ProjectsValidationEngine.java:1171)
 at com.castsoftware.dmt.engine.validation.ProjectsValidationEngine$ProfileOrProjectReferences.access$200(ProjectsValidationEngine.java:992)
 at com.castsoftware.dmt.engine.validation.ProjectsValidationEngine$ResolutionReportGenerator.resolveReferences(ProjectsValidationEngine.java:179)
 at com.castsoftware.dmt.engine.validation.ProjectsValidationEngine$ProfileOrProjectReferences.resolveReferencesAndVariables(ProjectsValidationEngine.java:1118)
 at com.castsoftware.dmt.engine.validation.ProjectsValidationEngine$ResolutionReportGenerator.resolve(ProjectsValidationEngine.java:144)
 at com.castsoftware.dmt.engine.validation.ProjectsValidationEngine$ResolutionReportGenerator.resolve(ProjectsValidationEngine.java:128)
 at com.castsoftware.dmt.engine.validation.ProjectsValidationEngine$ProjectsValidator.resolve(ProjectsValidationEngine.java:2276)
 at com.castsoftware.dmt.engine.validation.ProjectsValidationEngine.resolve(ProjectsValidationEngine.java:2614)
 at com.castsoftware.dmt.engine.validation.ProjectsValidationEngine.resolve(ProjectsValidationEngine.java:2588)
 at com.castsoftware.dmt.engine.validation.cli.Validate.processDMTCommand(Validate.java:724)
 at com.castsoftware.dmt.engine.cli.AbstractDeliveryEngineCommandLine.process(AbstractDeliveryEngineCommandLine.java:314)
 at com.castsoftware.cli.CommandLineApplication$4.call(CommandLineApplication.java:1249)
 at com.castsoftware.cli.CommandLineApplication$4.call(CommandLineApplication.java:1230)
 at com.castsoftware.util.logger.Logging.execute(Logging.java:527)
 at com.castsoftware.util.logger.Logging.runInNewContext(Logging.java:386)
 at com.castsoftware.cli.CommandLineApplication.parseAndRun(CommandLineApplication.java:1308)
 at com.castsoftware.cli.CommandLineApplication.access$100(CommandLineApplication.java:35)
 at com.castsoftware.cli.CommandLineApplication$2.call(CommandLineApplication.java:1108)
 at com.castsoftware.cli.CommandLineApplication$2.call(CommandLineApplication.java:1101)
 at com.castsoftware.util.logger.Logging.execute(Logging.java:527)
 at com.castsoftware.util.logger.Logging.runInNewContext(Logging.java:386)
 at com.castsoftware.cli.CommandLineApplication.launch(CommandLineApplication.java:1100)
 at com.castsoftware.cli.CommandLineApplication$1.call(CommandLineApplication.java:1032)
 at com.castsoftware.cli.CommandLineApplication$1.call(CommandLineApplication.java:1025)
 at com.castsoftware.util.logger.Logging.execute(Logging.java:527)
 at com.castsoftware.util.logger.Logging.runInNewContext(Logging.java:415)
 at com.castsoftware.cli.CommandLineApplication.run(CommandLineApplication.java:1024)
 at com.castsoftware.dmt.engine.validation.cli.Validate.main(Validate.java:736)

The error occurs because of the manual remediation's present in the package. 

When DMT is trying to remediate the alert which was part of the previous package, it is unable to find the respective jar from the source package present in the delivery folder of the previous version as it was manually remediated. 
When this occurs, the automatic remediation is also not performed as the manual remediation is already applied. So it fails during the validation step. 

Perform the below actions

  1. Remove all the manual remediation present in the packaging. 
  2. Run the packaging again. During this, the automatic remediation will run and will make sure the jars are picked up accordingly. 
  1. If the above points do not help, contact CAST Technical Support with the Relevant Input in order to reproduce the issue.

 

Notes/comments

Ticket # 17392, #21884

Related Pages