本番サーバーのgrailsアプリケーションで、いくつかの問題が発生しました。securityFiltersで、springSecurityServiceを注入していて、ある時点で次のような質問をしています。
if(springSecurityService?.currentUser?.client){
...
}
しかし、システムは次のようにエラーをスローします
Error 500: Internal Server Error
Class
org.hibernate.LazyInitializationException
Message
could not initialize proxy - no Session
Trace
Line | Method
->> 32 | doCall in SecurityFilters$_closure1_closure2_closure4
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 82 | doFilterInternal in com.linkedin.grails.profiler.ProfilerFilter
| 190 | invoke . . . . . in org.apache.jk.server.JkCoyoteHandler
| 291 | invoke in org.apache.jk.common.HandlerRequest
| 776 | invoke . . . . . in org.apache.jk.common.ChannelSocket
| 705 | processConnection in ''
| 898 | runIt . . . . . . in org.apache.jk.common.ChannelSocket$SocketConnection
^ 636 | run in java.lang.Thread
32行目は、上記のifステートメントを呼び出す場所です。このLazyInitializationExceptionを解決する方法の手がかりはありますか?私が間違っていることは何ですか?
注:「client」は、このユーザーが属するドメインクラスですが、PersonのbelongsToパラメーターには記載されていません。
ありがとう。