We are seeing a reproducible issue in cohort characterization where execution succeeds with predefined features but fails when user-defined features are included.
This is not an upgrade-related issue. The environment was a de novo installation. According to our OHDSI/OMOP admin, ATLAS 2.15.0 and WebAPI 2.15.1 are compatible and are the latest released versions.
Based on the error pattern, we suspect this may be a bug introduced in WebAPI 2.15.0, potentially related to the implementation of Temporal/Annual Prevalence in Cohort Characterization. We could not find an existing GitHub issue describing this behavior, and there does not appear to be a fix for it in WebAPI 2.15.1.
SUMMARY
In ATLAS cohort characterization:
- execution works when using only predefined features such as demographics
- execution fails when including user-defined/custom features
The failure appears to happen in WebAPI during conversion of feature analysis entities to DTOs in the feanalysis module.
Expected behavior
- Characterization should execute successfully for both predefined and user-defined features in a clean installation of ATLAS 2.15.0 / WebAPI 2.15.1.
Actual behavior
- Characterization execution fails when custom features are included, with a conversion/casting exception in feanalysis.
ERROR:
org.ohdsi.webapi.exception.AtlasException: org.springframework.core.convert.ConversionFailedException: Failed to convert from type [org.ohdsi.webapi.feanalysis.domain.FeAnalysisEntity$HibernateProxy$3QgdLRlJ] to type [org.ohdsi.webapi.feanalysis.dto.FeAnalysisDTO] for value 'org.ohdsi.webapi.feanalysis.domain.FeAnalysisWithPrevalenceCriteriaEntity@89'; nested exception is java.lang.ClassCastException: org.ohdsi.webapi.feanalysis.domain.FeAnalysisEntity$HibernateProxy$3QgdLRlJ cannot be cast to org.ohdsi.webapi.feanalysis.domain.FeAnalysisWithCriteriaEntity
at org.ohdsi.webapi.common.generation.TransactionalTasklet.execute(TransactionalTasklet.java:42)
at org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:406)
at org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:330)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
at org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:272)
at org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:81)
at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:374)
at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:215)
at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:144)
at org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:257)
at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:200)
at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:148)
at org.springframework.batch.core.job.AbstractJob.handleStep(AbstractJob.java:392)
at org.springframework.batch.core.job.SimpleJob.doExecute(SimpleJob.java:135)
at org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:306)
at org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:135)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
ENVIRONMENT:
ATLAS version: 2.15.0
WebAPI version: 2.15.1
Installation type: de novo installation
Issue present in: WebAPI 2.15.1 hotfix
Compatibility check: confirmed by admin that ATLAS 2.15.0 and WebAPI 2.15.1 are compatible
QUESTIONS:
Can this be confirmed as a bug in the feanalysis mapping/conversion logic introduced around WebAPI 2.15.0?
Is it related to the Temporal/Annual Prevalence in Cohort Characterization changes?
Is there a workaround for user-defined features until a fix is available?
We are seeing a reproducible issue in cohort characterization where execution succeeds with predefined features but fails when user-defined features are included.
This is not an upgrade-related issue. The environment was a de novo installation. According to our OHDSI/OMOP admin, ATLAS 2.15.0 and WebAPI 2.15.1 are compatible and are the latest released versions.
Based on the error pattern, we suspect this may be a bug introduced in WebAPI 2.15.0, potentially related to the implementation of Temporal/Annual Prevalence in Cohort Characterization. We could not find an existing GitHub issue describing this behavior, and there does not appear to be a fix for it in WebAPI 2.15.1.
SUMMARY
In ATLAS cohort characterization:
The failure appears to happen in WebAPI during conversion of feature analysis entities to DTOs in the feanalysis module.
Expected behavior
Actual behavior
ERROR:
org.ohdsi.webapi.exception.AtlasException: org.springframework.core.convert.ConversionFailedException: Failed to convert from type [org.ohdsi.webapi.feanalysis.domain.FeAnalysisEntity$HibernateProxy$3QgdLRlJ] to type [org.ohdsi.webapi.feanalysis.dto.FeAnalysisDTO] for value 'org.ohdsi.webapi.feanalysis.domain.FeAnalysisWithPrevalenceCriteriaEntity@89'; nested exception is java.lang.ClassCastException: org.ohdsi.webapi.feanalysis.domain.FeAnalysisEntity$HibernateProxy$3QgdLRlJ cannot be cast to org.ohdsi.webapi.feanalysis.domain.FeAnalysisWithCriteriaEntity
at org.ohdsi.webapi.common.generation.TransactionalTasklet.execute(TransactionalTasklet.java:42)
at org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:406)
at org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:330)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
at org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:272)
at org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:81)
at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:374)
at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:215)
at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:144)
at org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:257)
at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:200)
at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:148)
at org.springframework.batch.core.job.AbstractJob.handleStep(AbstractJob.java:392)
at org.springframework.batch.core.job.SimpleJob.doExecute(SimpleJob.java:135)
at org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:306)
at org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:135)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
ENVIRONMENT:
ATLAS version: 2.15.0
WebAPI version: 2.15.1
Installation type: de novo installation
Issue present in: WebAPI 2.15.1 hotfix
Compatibility check: confirmed by admin that ATLAS 2.15.0 and WebAPI 2.15.1 are compatible
QUESTIONS:
Can this be confirmed as a bug in the feanalysis mapping/conversion logic introduced around WebAPI 2.15.0?
Is it related to the Temporal/Annual Prevalence in Cohort Characterization changes?
Is there a workaround for user-defined features until a fix is available?