I noticed that too during some testing last night.  What do your DB
connection pool settings look like?


On Tue, Mar 23, 2010 at 8:20 AM, Jin <[email protected]> wrote:

> Hi,
>
> I am getting a LazyInitializationException when using CAS 3.4.  Seems to
> happend during the validation of the service ticket.  It seemed to only
> happen after I have left the CAS server idle (ie not using it), as it seems
> to work immediately after I restart it.  The stack trace is below:
>
> 2010-03-23 10:21:33,772 ERROR [org.hibernate.LazyInitializationException] -
> <failed to lazily initialize a collection of role:
> org.jasig.cas.services.Registe
> redServiceImpl.allowedAttributes, no session or session was closed>
> org.hibernate.LazyInitializationException: failed to lazily initialize a
> collection of role:
> org.jasig.cas.services.RegisteredServiceImpl.allowedAttributes,
> no session or session was closed
>        at
> org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:380)
>        at
> org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:372)
>        at
> org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:365)
>        at
> org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:108)
>        at
> org.hibernate.collection.PersistentList.iterator(PersistentList.java:138)
>        at
> org.jasig.cas.CentralAuthenticationServiceImpl.validateServiceTicket_aroundBody8(CentralAuthenticationServiceImpl.java:354)
>        at
> org.jasig.cas.CentralAuthenticationServiceImpl.validateServiceTicket_aroundBody9$advice(CentralAuthenticationServiceImpl.java:44)
>        at
> org.jasig.cas.CentralAuthenticationServiceImpl.validateServiceTicket(CentralAuthenticationServiceImpl.java:1)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:597)
>        at
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
>        at
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
>        at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
>        at
> org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)
>        at
> org.perf4j.aop.AbstractTimingAspect.doPerfLogging(AbstractTimingAspect.java:71)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:597)
>        at
> org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:622)
>        at
> org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:611)
>        at
> org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)
>        at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
>        at
> org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:108)
>        at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
>        at
> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
>        at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
>        at
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
>        at $Proxy34.validateServiceTicket(Unknown Source)
>        at
> org.jasig.cas.web.ServiceValidateController.handleRequestInternal(ServiceValidateController.java:135)
>        at
> org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
>        at
> org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
>        at
> org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:771)
>        at
> org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
>        at
> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
>        at
> org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>        at
> org.jasig.cas.web.init.SafeDispatcherServlet.service_aroundBody2(SafeDispatcherServlet.java:115)
>        at
> org.jasig.cas.web.init.SafeDispatcherServlet.service_aroundBody3$advice(SafeDispatcherServlet.java:44)
>        at
> org.jasig.cas.web.init.SafeDispatcherServlet.service(SafeDispatcherServlet.java:1)
>        at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>
>
> Also, CAS 3.4 seems to be using Hibernate 3.5.0-CR-2, is JPA working
> correctly with Spring 3.0.1.RELEASE as it seems like these are the
> dependencies dictated by CAS 3.4.  Thanks.
>
> Jin
> --
> You are currently subscribed to [email protected] as:
> [email protected]
> To unsubscribe, change settings or access archives, see
> http://www.ja-sig.org/wiki/display/JSG/cas-user
>

-- 
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to