Skip to content

Fix: add Transactional annotation to method to fix "no session" error#157

Merged
pieterlukasse merged 2 commits into
2.15.0-DEVfrom
fix/feature_analysis_get_endpoint
Oct 15, 2024
Merged

Fix: add Transactional annotation to method to fix "no session" error#157
pieterlukasse merged 2 commits into
2.15.0-DEVfrom
fix/feature_analysis_get_endpoint

Conversation

@pieterlukasse

@pieterlukasse pieterlukasse commented Sep 6, 2024

Copy link
Copy Markdown

Link to JIRA ticket if there is one: https://ctds-planx.atlassian.net/browse/VADC-1319

Bug Fixes

  • fixes the error in feature analysis endpoint
2024-08-29 15:03:15.050 ERROR http-nio-8080-exec-16 org.ohdsi.webapi.util.GenericExceptionMapper - [] - 
org.springframework.core.convert.ConversionFailedException: Failed to convert from type 
[org.ohdsi.webapi.feanalysis.domain.FeAnalysisWithPrevalenceCriteriaEntity] to type 
[org.ohdsi.webapi.feanalysis.dto.FeAnalysisDTO] for value 
'org.ohdsi.webapi.feanalysis.domain.FeAnalysisWithPrevalenceCriteriaEntity@8b'; nested exception is 
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: 
org.ohdsi.webapi.feanalysis.domain.FeAnalysisWithCriteriaEntity.design, could not initialize proxy - no Session

...
at...
 org.ohdsi.webapi.feanalysis.converter.FeAnalysisEntityToFeAnalysisDTOConverter.convertDesignToJson(FeAnalysisEntityToFeAnalysisDTOConverter.java:53)
	at org.ohdsi.webapi.feanalysis.converter.FeAnalysisEntityToFeAnalysisDTOConverter.convert(FeAnalysisEntityToFeAnalysisDTOConverter.java:26)
	at org.ohdsi.webapi.feanalysis.converter.FeAnalysisEntityToFeAnalysisDTOConverter.convert(FeAnalysisEntityToFeAnalysisDTOConverter.java:17)

@pieterlukasse pieterlukasse force-pushed the fix/feature_analysis_get_endpoint branch from c5795b3 to 1e1f83d Compare October 15, 2024 13:35
@pieterlukasse pieterlukasse marked this pull request as ready for review October 15, 2024 13:37

@m0nhawk m0nhawk left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@pieterlukasse pieterlukasse merged commit 0692cbb into 2.15.0-DEV Oct 15, 2024
@pieterlukasse pieterlukasse deleted the fix/feature_analysis_get_endpoint branch October 15, 2024 16:49
@pieterlukasse

Copy link
Copy Markdown
Author

upstream PR: OHDSI#2437

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants