-
Notifications
You must be signed in to change notification settings - Fork 45
Production_ASSAM_Session timeout issue #269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe changes update the Maven project version in the POM file, adjust JPA persistence annotations in the Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant UserEntity
participant LanguageEntity
participant JPAProvider
Client->>UserEntity: Request User data (JSON)
UserEntity->>JPAProvider: Fetch m_UserLangMappings (EAGER)
JPAProvider-->>UserEntity: Return UserLangMappings
UserEntity-->>Client: Return JSON with "pan", "dob", "doj" fields
Client->>LanguageEntity: Request Language data
LanguageEntity->>JPAProvider: Fetch m_UserLangMappings (now persistent)
JPAProvider-->>LanguageEntity: Return UserLangMappings
LanguageEntity-->>Client: Return Language data with UserLangMappings
Estimated code review effortπ― 2 (Simple) | β±οΈ ~8 minutes Poem
Note β‘οΈ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. π Recent review detailsConfiguration used: CodeRabbit UI π Files selected for processing (3)
π€ Files with no reviewable changes (1)
π§° Additional context usedπ§ Learnings (1)src/main/java/com/iemr/common/data/users/User.java (2)Learnt from: srishtigrp78 Learnt from: Zapper9982 π Additional comments (5)
β¨ Finishing Touches
π§ͺ Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. πͺ§ TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
π Description
JIRA ID: AMM-1670
Please provide a summary of the change and the motivation behind it. Include relevant context and details.
β Type of Change
βΉοΈ Additional Information
Please describe how the changes were tested, and include any relevant screenshots, logs, or other information that provides additional context.
Issue:
When the Redis session expires after 30 minutes, the system attempts to fetch the user details from the database. However, due to issues like incorrect field mappings (e.g., pan), lazy loading failures (m_UserLangMappings), and missing Redis refresh logic, the user object is not returned properlyβresulting in incomplete or failed API responses.
Logs :

Fixes and Corrective Actions
1. Serialization Fixes (PAN, DOB, DOJ fields)
Issue: JSON serialization failed because field names didnβt match β e.g., "pan" in JSON vs pAN in Java class.
Fix:
Added @JsonProperty("pan"), @JsonProperty("dob"), and @JsonProperty("doj") to correctly map JSON fields during deserialization.
2. Lazy Loading Fixes (m_UserLangMappings)
Issue: @onetomany(fetch = FetchType.LAZY) mapping caused deserialization errors when Redis tried to deserialize outside an active Hibernate session:
could not initialize proxy - no Session
Fix:
Changed fetch type to EAGER to ensure complete serialization.
Refer:https://pmp.piramalswasthya.org/confluence/spaces/AMRIT/pages/96043113/AMM-1670+Production_ASSAM_Session+timeout+issue
Summary by CodeRabbit
New Features
Improvements