AIP Console - Application Onboarding/Delivery - Add version - Run Analysis step fails - ERROR com.castsoftware.aip.node.services.reports.AnalysisReportServiceImpl - Fail to read analysis list of files


Purpose

This page will help you to solve problems related to failure at the run analysis step while adding a version of an application to the CAST AIP Console.

The error encountered is ERROR com.castsoftware.aip.node.services.reports.AnalysisReportServiceImpl - Fail to read analysis list of files.

Applicable Platform

AIP Platform

Yes/No

CAST AIP 8.3(tick) 
AIP Console VersionYes/No
AIP Console 1.8.x  or greater(tick)
Step by Step: Scenario
  1. Add an application in the AIP console.
  2. Add a version.
  3. Rename the application name from the admin centre
  4. Add a version, the analysis will fail after running the analysis step while generating the reports.
Action Plan

If while adding a version in AIP Console, it fails at the step run analysis while generating the report:  

                               

There is no error reported during the Analysis, but when the analysis report is generated we can see the below logs in the CMSAPI log file:       

 2
11:58:10.903 [http-nio-8082-exec-7] INFO  com.castsoftware.aip.node.services.snapshotindicator.SnapshotIndicatorServiceImpl - Snapshot indicator definitions from Modules.xml read successfully
11:58:10.906 [http-nio-8082-exec-7] INFO  com.castsoftware.aip.node.services.snapshotindicator.SnapshotIndicatorServiceImpl - Snapshot indicator definitions from Quality Measure.xml read successfully
11:58:10.909 [http-nio-8082-exec-7] INFO  com.castsoftware.aip.node.services.snapshotindicator.SnapshotIndicatorServiceImpl - Snapshot indicator definitions from Source Code.xml read successfully
11:58:10.911 [http-nio-8082-exec-7] INFO  com.castsoftware.aip.node.services.snapshotindicator.SnapshotIndicatorServiceImpl - Snapshot indicator definitions from Transactions.xml read successfully
12:00:04.774 [scheduling-1] INFO  com.castsoftware.aip.node.services.cleanup.BackupCleanupServiceImpl - Backup retention settings are disabled, no backups will be deleted.
12:21:37.111 [getMultipleThreadsTaskExecutor-1] INFO  com.castsoftware.aip.node.services.CustomSpringEventPublisher - Publishing change entity event: EntityChangeDto{entityType=version, entityGuid='c5f76d8f-3d04-42dd-8a1d-25be9d9c16c8', operation=update, createdDate=2022-09-13T12:21:37.111}
12:21:37.146 [getMultipleThreadsTaskExecutor-1] ERROR com.castsoftware.aip.node.services.reports.AnalysisReportServiceImpl - Fail to read analysis list of files.
12:21:37.146 [getMultipleThreadsTaskExecutor-1] INFO  com.castsoftware.aip.node.services.reports.AnalysisReportServiceImpl - Updating the analysis report
12:21:37.176 [getMultipleThreadsTaskExecutor-1] ERROR com.castsoftware.aip.node.jobs.ApplicationJob - Encountered fatal error executing job
org.springframework.dao.InvalidDataAccessApiUsageException: The given id must not be null!; nested exception is java.lang.IllegalArgumentException: The given id must not be null!
    at org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:374) ~[spring-orm-5.3.9.jar!/:5.3.9]
    at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:235) ~[spring-orm-5.3.9.jar!/:5.3.9]
    at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:551) ~[spring-orm-5.3.9.jar!/:5.3.9]
    at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:61) ~[spring-tx-5.3.9.jar!/:5.3.9]
    at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:242) ~[spring-tx-5.3.9.jar!/:5.3.9]
    at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:152) ~[spring-tx-5.3.9.jar!/:5.3.9]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.9.jar!/:5.3.9]
    at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:174) ~[spring-data-jpa-2.4.12.jar!/:2.4.12]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.9.jar!/:5.3.9]
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) ~[spring-aop-5.3.9.jar!/:5.3.9]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.9.jar!/:5.3.9]
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215) ~[spring-aop-5.3.9.jar!/:5.3.9]
    at com.sun.proxy.$Proxy201.findById(Unknown Source) ~[?:?]
    at com.castsoftware.aip.node.services.overview.VersionOverviewServiceImpl.getVersion(VersionOverviewServiceImpl.java:51) ~[aip-node-services-1.28.5.jar!/:1.28.5]
    at com.castsoftware.aip.node.services.reports.AnalysisReportServiceImpl.getPreviousPath(AnalysisReportServiceImpl.java:299) ~[aip-node-services-1.28.5.jar!/:1.28.5]
    at com.castsoftware.aip.node.services.reports.AnalysisReportServiceImpl.getDeployPaths(AnalysisReportServiceImpl.java:257) ~[aip-node-services-1.28.5.jar!/:1.28.5]
    at com.castsoftware.aip.node.services.reports.AnalysisReportServiceImpl.updateAnalysisReportWithProcessed(AnalysisReportServiceImpl.java:204) ~[aip-node-services-1.28.5.jar!/:1.28.5]
    at com.castsoftware.aip.node.services.reports.AnalysisReportServiceImpl.updateAnalysisReportWithAnalysed(AnalysisReportServiceImpl.java:355) ~[aip-node-services-1.28.5.jar!/:1.28.5]
    at com.castsoftware.aip.node.jobs.steps.analysis.AnalysisJobStep.execute(AnalysisJobStep.java:129) ~[aip-node-services-1.28.5.jar!/:1.28.5]
    at com.castsoftware.aip.node.jobs.ApplicationJob.doExecute(ApplicationJob.java:182) ~[aip-node-services-1.28.5.jar!/:1.28.5]
    at com.castsoftware.aip.node.jobs.ApplicationJob.execute(ApplicationJob.java:116) [aip-node-services-1.28.5.jar!/:1.28.5]
    at com.castsoftware.aip.node.jobs.JobThread.run(JobThread.java:41) [aip-node-services-1.28.5.jar!/:1.28.5]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_202]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_202]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_202]
Caused by: java.lang.IllegalArgumentException: The given id must not be null!
    at org.springframework.util.Assert.notNull(Assert.java:201) ~[spring-core-5.3.9.jar!/:5.3.9]
    at org.springframework.data.jpa.repository.support.SimpleJpaRepository.findById(SimpleJpaRepository.java:269) ~[spring-data-jpa-2.4.12.jar!/:2.4.12]
    at sun.reflect.GeneratedMethodAccessor342.invoke(Unknown Source) ~[?:?]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_202]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_202]
    at org.springframework.data.repository.core.support.RepositoryMethodInvoker$RepositoryFragmentMethodInvoker.lambda$new$0(RepositoryMethodInvoker.java:289) ~[spring-data-commons-2.4.12.jar!/:2.4.12]
    at org.springframework.data.repository.core.support.RepositoryMethodInvoker.doInvoke(RepositoryMethodInvoker.java:137) ~[spring-data-commons-2.4.12.jar!/:2.4.12]
    at org.springframework.data.repository.core.support.RepositoryMethodInvoker.invoke(RepositoryMethodInvoker.java:121) ~[spring-data-commons-2.4.12.jar!/:2.4.12]
    at org.springframework.data.repository.core.support.RepositoryComposition$RepositoryFragments.invoke(RepositoryComposition.java:524) ~[spring-data-commons-2.4.12.jar!/:2.4.12]
    at org.springframework.data.repository.core.support.RepositoryComposition.invoke(RepositoryComposition.java:285) ~[spring-data-commons-2.4.12.jar!/:2.4.12]
    at org.springframework.data.repository.core.support.RepositoryFactorySupport$ImplementationMethodExecutionInterceptor.invoke(RepositoryFactorySupport.java:531) ~[spring-data-commons-2.4.12.jar!/:2.4.12]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.9.jar!/:5.3.9]
    at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.doInvoke(QueryExecutorMethodInterceptor.java:156) ~[spring-data-commons-2.4.12.jar!/:2.4.12]
    at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.invoke(QueryExecutorMethodInterceptor.java:131) ~[spring-data-commons-2.4.12.jar!/:2.4.12]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.9.jar!/:5.3.9]
    at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123) ~[spring-tx-5.3.9.jar!/:5.3.9]
    at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388) ~[spring-tx-5.3.9.jar!/:5.3.9]
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119) ~[spring-tx-5.3.9.jar!/:5.3.9]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.9.jar!/:5.3.9]
    at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:137) ~[spring-tx-5.3.9.jar!/:5.3.9]
    ... 19 more   

Then as a workaround follow the steps described below.

  1. Launch file explorer and navigate to the Deployment folder.
  2. Edit the application name in the deploy folder, by renaming the old application name to the new one.
  3. Launch the PG_admin tool and connect to your mngt schema and update the above path in the deploy path column:

    Set search_path to <schema_name_MNGT>
    
    update <schema_mngt>.cms_portf_application set deploypath=<'Path_to_new_application_name_in_deploy_path'>
    
  4. Now restart the node and console services and trigger the Analysis.
  5. If the problem you are facing do not match any case listed in this page, report your problem to CAST Technical Support and provide the following Relevant input for CAST Technical Support to reproduce the issue.                
Notes/comments
Ticket # 37883
Related Pages