LazyInitializationExceptionを回避するために OpenSessionInViewInterceptorを使用しています。
それはうまくいきましたが、OSIVを使用していても、いつかLazyInitializationExceptionが発生します。例外は次のとおりです。
SEVERE: Servlet.service() for servlet [appServlet] in context with path []
threw exception [Request processing failed; nested exception is
org.apache.tiles.impl.CannotRenderException: ServletException including path
'/WEB-INF/views/home/master.jsp'.] with root cause org.hibernate.LazyInitializationException:
failed to lazily initialize a collection of role: com...,
no session or session was closed
at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersisten
tCollection.java:383)
at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(Abs
tractPersistentCollection.java:375)
at
さらに奇妙なことは、例外ログがログ ファイルにのみあり、Web サイトをナビゲートするのに問題がないことです。
これはどうしてですか?