This error indicates that GORM is either not initialized correctly or has been shut down when your application tries to access the domain class. This can happen for various reasons, particularly when doing something in an event-based system (Queue) or a job.
It would be helpful to find out the exact piece of code where this might happen and the flow of code execution. The session might be already been closed by the time the GORM operation is executed,