[cas-user] FacebookObject serialization problem.

70 views
Skip to first unread message

Frederico Guilherme Zveiter de Albuquerque

unread,
Apr 11, 2013, 10:03:20 AM4/11/13
to cas-...@lists.jasig.org
Hi Jérôme and folks!

I'm having a problem after the authentication with Facebook.
It seems to be a problem with the serialization of org.scribe.up.profile.facebook.FacebookObject.
I've found a JIRA ticket (https://issues.jasig.org/browse/CAS-1151) that states this same problem but, as far as I could understand, Jérôme said that in version 3.5.1-SNAPSHOT of CAS Server this problem was fixed but I'm using version 3.5.2.
Below are the console log with full stacktrace. Please, help!

2013-04-11 10:27:24,267 INFO [org.jasig.cas.authentication.AuthenticationManagerImpl] - <org.jasig.cas.support.oauth.authentication.handler.support.OAuthAuthenticationHandler successfully authenticated org.jasig.cas.support.oauth.authentication.principal.OAuthCredentials@70446fb6>
2013-04-11 10:27:24,268 INFO [org.jasig.cas.authentication.AuthenticationManagerImpl] - <Resolved principal FacebookProfile#100001835563456>
2013-04-11 10:27:24,269 INFO [org.jasig.cas.authentication.AuthenticationManagerImpl] - <org.jasig.cas.support.oauth.authentication.handler.support.OAuthAuthenticationHandler@44b7a0d5 authenticated FacebookProfile#100001835563456 with credential org.jasig.cas.support.oauth.authentication.principal.OAuthCredentials@70446fb6.>
2013-04-11 10:27:24,279 INFO [com.github.inspektr.audit.support.Slf4jLoggingAuditTrailManager] - <Audit trail record BEGIN
=============================================================
WHO: org.jasig.cas.support.oauth.authentication.principal.OAuthCredentials@70446fb6
WHAT: supplied credentials: org.jasig.cas.support.oauth.authentication.principal.OAuthCredentials@70446fb6
ACTION: AUTHENTICATION_SUCCESS
APPLICATION: CAS
WHEN: Thu Apr 11 10:27:24 BRT 2013
CLIENT IP ADDRESS: 172.21.30.198
SERVER IP ADDRESS: 172.21.30.198
=============================================================

>
2013-04-11 10:27:24,472 INFO [com.github.inspektr.audit.support.Slf4jLoggingAuditTrailManager] - <Audit trail record BEGIN
=============================================================
WHO: org.jasig.cas.support.oauth.authentication.principal.OAuthCredentials@70446fb6
ACTION: TICKET_GRANTING_TICKET_CREATED
APPLICATION: CAS
WHEN: Thu Apr 11 10:27:24 BRT 2013
CLIENT IP ADDRESS: 172.21.30.198
SERVER IP ADDRESS: 172.21.30.198
=============================================================

>
2013-04-11 10:27:24,812 ERROR [org.jasig.cas.ticket.registry.MemCacheTicketRegistry] - <Failed fetching TGT-1-4XaPVFPSwCwdnboasWHUNyZr5f6zpaGHYgDQ0naNTnWZNhFYjW-pu-sso.peixeurbano.com.br >
java.lang.RuntimeException: Exception waiting for value
at net.spy.memcached.MemcachedClient.get(MemcachedClient.java:1001)
at net.spy.memcached.MemcachedClient.get(MemcachedClient.java:1018)
at org.jasig.cas.ticket.registry.MemCacheTicketRegistry.getTicket(MemCacheTicketRegistry.java:146)
at org.jasig.cas.ticket.registry.AbstractTicketRegistry.getTicket_aroundBody0(AbstractTicketRegistry.java:48)
at org.jasig.cas.ticket.registry.AbstractTicketRegistry.getTicket_aroundBody1$advice(AbstractTicketRegistry.java:57)
at org.jasig.cas.ticket.registry.AbstractTicketRegistry.getTicket(AbstractTicketRegistry.java:1)
at org.jasig.cas.CentralAuthenticationServiceImpl.grantServiceTicket_aroundBody2(CentralAuthenticationServiceImpl.java:187)
at org.jasig.cas.CentralAuthenticationServiceImpl.grantServiceTicket_aroundBody3$advice(CentralAuthenticationServiceImpl.java:57)
at org.jasig.cas.CentralAuthenticationServiceImpl.grantServiceTicket(CentralAuthenticationServiceImpl.java:1)
at org.jasig.cas.CentralAuthenticationServiceImpl.grantServiceTicket_aroundBody4(CentralAuthenticationServiceImpl.java:276)
at org.jasig.cas.CentralAuthenticationServiceImpl.grantServiceTicket_aroundBody5$advice(CentralAuthenticationServiceImpl.java:57)
at org.jasig.cas.CentralAuthenticationServiceImpl.grantServiceTicket(CentralAuthenticationServiceImpl.java:1)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318)
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$1.proceed(AbstractTimingAspect.java:47)
at org.perf4j.aop.AgnosticTimingAspect.runProfiledMethod(AgnosticTimingAspect.java:53)
at org.perf4j.aop.AbstractTimingAspect.doPerfLogging(AbstractTimingAspect.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)
at com.github.inspektr.audit.AuditTrailManagementAspect.handleAuditTrail(AuditTrailManagementAspect.java:126)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at sun.proxy.$Proxy42.grantServiceTicket(Unknown Source)
at org.jasig.cas.web.flow.GenerateServiceTicketAction.doExecute(GenerateServiceTicketAction.java:52)
at org.springframework.webflow.action.AbstractAction.execute(AbstractAction.java:188)
at org.springframework.webflow.execution.ActionExecutor.execute(ActionExecutor.java:51)
at org.springframework.webflow.action.EvaluateAction.doExecute(EvaluateAction.java:77)
at org.springframework.webflow.action.AbstractAction.execute(AbstractAction.java:188)
at org.springframework.webflow.execution.AnnotatedAction.execute(AnnotatedAction.java:145)
at org.springframework.webflow.execution.ActionExecutor.execute(ActionExecutor.java:51)
at org.springframework.webflow.engine.ActionState.doEnter(ActionState.java:101)
at org.springframework.webflow.engine.State.enter(State.java:194)
at org.springframework.webflow.engine.Transition.execute(Transition.java:227)
at org.springframework.webflow.engine.DecisionState.doEnter(DecisionState.java:51)
at org.springframework.webflow.engine.State.enter(State.java:194)
at org.springframework.webflow.engine.Transition.execute(Transition.java:227)
at org.springframework.webflow.engine.impl.FlowExecutionImpl.execute(FlowExecutionImpl.java:393)
at org.springframework.webflow.engine.impl.RequestControlContextImpl.execute(RequestControlContextImpl.java:214)
at org.springframework.webflow.engine.TransitionableState.handleEvent(TransitionableState.java:119)
at org.springframework.webflow.engine.Flow.handleEvent(Flow.java:555)
at org.springframework.webflow.engine.impl.FlowExecutionImpl.handleEvent(FlowExecutionImpl.java:388)
at org.springframework.webflow.engine.impl.RequestControlContextImpl.handleEvent(RequestControlContextImpl.java:210)
at org.springframework.webflow.engine.ActionState.doEnter(ActionState.java:105)
at org.springframework.webflow.engine.State.enter(State.java:194)
at org.springframework.webflow.engine.Transition.execute(Transition.java:227)
at org.springframework.webflow.engine.impl.FlowExecutionImpl.execute(FlowExecutionImpl.java:393)
at org.springframework.webflow.engine.impl.RequestControlContextImpl.execute(RequestControlContextImpl.java:214)
at org.springframework.webflow.engine.TransitionableState.handleEvent(TransitionableState.java:119)
at org.springframework.webflow.engine.Flow.handleEvent(Flow.java:555)
at org.springframework.webflow.engine.impl.FlowExecutionImpl.handleEvent(FlowExecutionImpl.java:388)
at org.springframework.webflow.engine.impl.RequestControlContextImpl.handleEvent(RequestControlContextImpl.java:210)
at org.springframework.webflow.engine.ActionState.doEnter(ActionState.java:105)
at org.springframework.webflow.engine.State.enter(State.java:194)
at org.springframework.webflow.engine.Flow.start(Flow.java:535)
at org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:366)
at org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:225)
at org.springframework.webflow.executor.FlowExecutorImpl.launchExecution(FlowExecutorImpl.java:140)
at org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:193)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.jasig.cas.web.init.SafeDispatcherServlet.service_aroundBody2(SafeDispatcherServlet.java:128)
at org.jasig.cas.web.init.SafeDispatcherServlet.service_aroundBody3$advice(SafeDispatcherServlet.java:57)
at org.jasig.cas.web.init.SafeDispatcherServlet.service(SafeDispatcherServlet.java:1)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.github.inspektr.common.web.ClientInfoThreadLocalFilter.doFilter(ClientInfoThreadLocalFilter.java:63)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1680)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.util.concurrent.ExecutionException: com.esotericsoftware.kryo.SerializationException: Unable to deserialize object of type: org.jasig.cas.ticket.TicketGrantingTicketImpl
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)
at java.util.concurrent.FutureTask.get(FutureTask.java:111)
at net.spy.memcached.transcoders.TranscodeService$Task.get(TranscodeService.java:97)
at net.spy.memcached.internal.GetFuture.get(GetFuture.java:63)
at net.spy.memcached.MemcachedClient.get(MemcachedClient.java:997)
... 113 more
Caused by: com.esotericsoftware.kryo.SerializationException: Unable to deserialize object of type: org.jasig.cas.ticket.TicketGrantingTicketImpl
at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:571)
at org.jasig.cas.ticket.registry.support.kryo.KryoTranscoder.decode(KryoTranscoder.java:165)
at net.spy.memcached.transcoders.TranscodeService$1.call(TranscodeService.java:63)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at net.spy.memcached.transcoders.TranscodeService$Task.run(TranscodeService.java:110)
at net.spy.memcached.transcoders.TranscodeService$Task.get(TranscodeService.java:96)
... 115 more
Caused by: com.esotericsoftware.kryo.SerializationException: Serialization trace:
authentication (org.jasig.cas.ticket.TicketGrantingTicketImpl)
at com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:238)
at com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:200)
at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:566)
... 121 more
Caused by: java.lang.IllegalStateException: Unexpected attribute value type class org.scribe.up.profile.facebook.FacebookObject
at org.jasig.cas.ticket.registry.support.kryo.serial.AttributeMapSerializer.read(AttributeMapSerializer.java:89)
at org.jasig.cas.ticket.registry.support.kryo.serial.SimplePrincipalSerializer.read(SimplePrincipalSerializer.java:51)
at org.jasig.cas.ticket.registry.support.kryo.serial.SimplePrincipalSerializer.read(SimplePrincipalSerializer.java:1)
at com.esotericsoftware.kryo.serialize.SimpleSerializer.readObjectData(SimpleSerializer.java:13)
at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:566)
at org.jasig.cas.ticket.registry.support.kryo.serial.AbstractAuthenticationSerializer.read(AbstractAuthenticationSerializer.java:56)
at org.jasig.cas.ticket.registry.support.kryo.serial.AbstractAuthenticationSerializer.read(AbstractAuthenticationSerializer.java:1)
at com.esotericsoftware.kryo.serialize.SimpleSerializer.readObjectData(SimpleSerializer.java:13)
at com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:220)
... 123 more
2013-04-11 10:27:25,014 ERROR [org.jasig.cas.ticket.registry.MemCacheTicketRegistry] - <Failed fetching TGT-1-4XaPVFPSwCwdnboasWHUNyZr5f6zpaGHYgDQ0naNTnWZNhFYjW-pu-sso.peixeurbano.com.br >
java.lang.RuntimeException: Exception waiting for value
at net.spy.memcached.MemcachedClient.get(MemcachedClient.java:1001)
at net.spy.memcached.MemcachedClient.get(MemcachedClient.java:1018)
at org.jasig.cas.ticket.registry.MemCacheTicketRegistry.getTicket(MemCacheTicketRegistry.java:146)
at org.jasig.cas.audit.spi.TicketOrCredentialPrincipalResolver.resolveFromInternal(TicketOrCredentialPrincipalResolver.java:70)
at org.jasig.cas.audit.spi.TicketOrCredentialPrincipalResolver.resolveFrom_aroundBody2(TicketOrCredentialPrincipalResolver.java:58)
at org.jasig.cas.audit.spi.TicketOrCredentialPrincipalResolver.resolveFrom_aroundBody3$advice(TicketOrCredentialPrincipalResolver.java:57)
at org.jasig.cas.audit.spi.TicketOrCredentialPrincipalResolver.resolveFrom(TicketOrCredentialPrincipalResolver.java:1)
at com.github.inspektr.audit.AuditTrailManagementAspect.handleAuditTrail(AuditTrailManagementAspect.java:134)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at sun.proxy.$Proxy42.grantServiceTicket(Unknown Source)
at org.jasig.cas.web.flow.GenerateServiceTicketAction.doExecute(GenerateServiceTicketAction.java:52)
at org.springframework.webflow.action.AbstractAction.execute(AbstractAction.java:188)
at org.springframework.webflow.execution.ActionExecutor.execute(ActionExecutor.java:51)
at org.springframework.webflow.action.EvaluateAction.doExecute(EvaluateAction.java:77)
at org.springframework.webflow.action.AbstractAction.execute(AbstractAction.java:188)
at org.springframework.webflow.execution.AnnotatedAction.execute(AnnotatedAction.java:145)
at org.springframework.webflow.execution.ActionExecutor.execute(ActionExecutor.java:51)
at org.springframework.webflow.engine.ActionState.doEnter(ActionState.java:101)
at org.springframework.webflow.engine.State.enter(State.java:194)
at org.springframework.webflow.engine.Transition.execute(Transition.java:227)
at org.springframework.webflow.engine.DecisionState.doEnter(DecisionState.java:51)
at org.springframework.webflow.engine.State.enter(State.java:194)
at org.springframework.webflow.engine.Transition.execute(Transition.java:227)
at org.springframework.webflow.engine.impl.FlowExecutionImpl.execute(FlowExecutionImpl.java:393)
at org.springframework.webflow.engine.impl.RequestControlContextImpl.execute(RequestControlContextImpl.java:214)
at org.springframework.webflow.engine.TransitionableState.handleEvent(TransitionableState.java:119)
at org.springframework.webflow.engine.Flow.handleEvent(Flow.java:555)
at org.springframework.webflow.engine.impl.FlowExecutionImpl.handleEvent(FlowExecutionImpl.java:388)
at org.springframework.webflow.engine.impl.RequestControlContextImpl.handleEvent(RequestControlContextImpl.java:210)
at org.springframework.webflow.engine.ActionState.doEnter(ActionState.java:105)
at org.springframework.webflow.engine.State.enter(State.java:194)
at org.springframework.webflow.engine.Transition.execute(Transition.java:227)
at org.springframework.webflow.engine.impl.FlowExecutionImpl.execute(FlowExecutionImpl.java:393)
at org.springframework.webflow.engine.impl.RequestControlContextImpl.execute(RequestControlContextImpl.java:214)
at org.springframework.webflow.engine.TransitionableState.handleEvent(TransitionableState.java:119)
at org.springframework.webflow.engine.Flow.handleEvent(Flow.java:555)
at org.springframework.webflow.engine.impl.FlowExecutionImpl.handleEvent(FlowExecutionImpl.java:388)
at org.springframework.webflow.engine.impl.RequestControlContextImpl.handleEvent(RequestControlContextImpl.java:210)
at org.springframework.webflow.engine.ActionState.doEnter(ActionState.java:105)
at org.springframework.webflow.engine.State.enter(State.java:194)
at org.springframework.webflow.engine.Flow.start(Flow.java:535)
at org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:366)
at org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:225)
at org.springframework.webflow.executor.FlowExecutorImpl.launchExecution(FlowExecutorImpl.java:140)
at org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:193)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.jasig.cas.web.init.SafeDispatcherServlet.service_aroundBody2(SafeDispatcherServlet.java:128)
at org.jasig.cas.web.init.SafeDispatcherServlet.service_aroundBody3$advice(SafeDispatcherServlet.java:57)
at org.jasig.cas.web.init.SafeDispatcherServlet.service(SafeDispatcherServlet.java:1)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.github.inspektr.common.web.ClientInfoThreadLocalFilter.doFilter(ClientInfoThreadLocalFilter.java:63)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1680)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.util.concurrent.ExecutionException: com.esotericsoftware.kryo.SerializationException: Unable to deserialize object of type: org.jasig.cas.ticket.TicketGrantingTicketImpl
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)
at java.util.concurrent.FutureTask.get(FutureTask.java:111)
at net.spy.memcached.transcoders.TranscodeService$Task.get(TranscodeService.java:97)
at net.spy.memcached.internal.GetFuture.get(GetFuture.java:63)
at net.spy.memcached.MemcachedClient.get(MemcachedClient.java:997)
... 88 more
Caused by: com.esotericsoftware.kryo.SerializationException: Unable to deserialize object of type: org.jasig.cas.ticket.TicketGrantingTicketImpl
at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:571)
at org.jasig.cas.ticket.registry.support.kryo.KryoTranscoder.decode(KryoTranscoder.java:165)
at net.spy.memcached.transcoders.TranscodeService$1.call(TranscodeService.java:63)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at net.spy.memcached.transcoders.TranscodeService$Task.run(TranscodeService.java:110)
at net.spy.memcached.transcoders.TranscodeService$Task.get(TranscodeService.java:96)
... 90 more
Caused by: com.esotericsoftware.kryo.SerializationException: Serialization trace:
authentication (org.jasig.cas.ticket.TicketGrantingTicketImpl)
at com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:238)
at com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:200)
at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:566)
... 96 more
Caused by: java.lang.IllegalStateException: Unexpected attribute value type class org.scribe.up.profile.facebook.FacebookObject
at org.jasig.cas.ticket.registry.support.kryo.serial.AttributeMapSerializer.read(AttributeMapSerializer.java:89)
at org.jasig.cas.ticket.registry.support.kryo.serial.SimplePrincipalSerializer.read(SimplePrincipalSerializer.java:51)
at org.jasig.cas.ticket.registry.support.kryo.serial.SimplePrincipalSerializer.read(SimplePrincipalSerializer.java:1)
at com.esotericsoftware.kryo.serialize.SimpleSerializer.readObjectData(SimpleSerializer.java:13)
at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:566)
at org.jasig.cas.ticket.registry.support.kryo.serial.AbstractAuthenticationSerializer.read(AbstractAuthenticationSerializer.java:56)
at org.jasig.cas.ticket.registry.support.kryo.serial.AbstractAuthenticationSerializer.read(AbstractAuthenticationSerializer.java:1)
at com.esotericsoftware.kryo.serialize.SimpleSerializer.readObjectData(SimpleSerializer.java:13)
at com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:220)
... 98 more
2013-04-11 10:27:25,022 INFO [com.github.inspektr.audit.support.Slf4jLoggingAuditTrailManager] - <Audit trail record BEGIN
=============================================================
WHO: audit:unknown
ACTION: SERVICE_TICKET_NOT_CREATED
APPLICATION: CAS
WHEN: Thu Apr 11 10:27:25 BRT 2013
CLIENT IP ADDRESS: 172.21.30.198
SERVER IP ADDRESS: 172.21.30.198
=============================================================

Thanks!
Frederico Zveiter
-- 
You are currently subscribed to cas-...@lists.jasig.org as: jasig-cas-user...@googlegroups.com
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user

jleleu

unread,
Apr 11, 2013, 10:07:36 AM4/11/13
to cas-...@lists.jasig.org
Hi,

CAS-1151 is not exactly the same problem, it was about serialization also but Java serialization not Kryo serialization. It has been fixed, but there might be a new one.

I will make some tests and let you know.

Best regards,
Jérôme

Frederico Guilherme Zveiter de Albuquerque

unread,
Apr 11, 2013, 1:03:48 PM4/11/13
to cas-...@lists.jasig.org
Thanks, Jérôme.

Any tip on a temporary workarounds?

Frederico Zveiter



On Thu, Apr 11, 2013 at 11:07 AM, jleleu <lel...@gmail.com> wrote:
Hi,

CAS-1151 is not exactly the same problem, it was about serialization also but Java serialization not Kryo serialization. It has been fixed, but there might be a new one.

I will make some tests and let you know.

Best regards,
Jérôme

--
You are currently subscribed to cas-...@lists.jasig.org as: frederic...@peixeurbano.com

To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user

jleleu

unread,
Apr 11, 2013, 1:17:17 PM4/11/13
to cas-...@lists.jasig.org
Hi,

I did some tests : all classes that should be serialized with Kryo must be registered in Kryo. It's done here : https://github.com/Jasig/cas/blob/3.5.x/cas-server-integration-memcached/src/main/java/org/jasig/cas/ticket/registry/support/kryo/KryoTranscoder.java, initialize method.

Classes used in OAuth module are not registered in Kryo. Though, you can do that by using the setSerializerMap method.

If you find it too complicated or if it doesn't work for any reason, you can still use the SerializingTranscoder from spymemcached client instead of the KryoTranscoder.

Best regards,
Jérôme

--

Frederico Guilherme Zveiter de Albuquerque

unread,
Apr 12, 2013, 1:19:07 PM4/12/13
to cas-...@lists.jasig.org
Hi, Jérôme!

As far as I could understand, the initialize method of KryoTranscoder register many classes with Kryo as well as any other in serializerMap map but how and where can I call setSerializerMap to add FacebookObject to the map if KryoTranscoder is registered as a bean in /cas-server-webapp/src/main/webapp/WEB-INF/spring-configuration/ticketRegistry.xml with init-method="initialize"? Doesn't the method initialize will be called internally by Spring when factorying the bean? After that, what is the point in set FacebookObject to serializerMap?

About the option to choose for SerializingTranscoder from spymemcached, you have commented that using Kryo will significantly increase efficiency and will improve throughput and storage footprint. This factors are of great importance in my scenario, so I think I cannot ignore this comment and go on with the easy solution. ;)

When we came to a working solution, I think it would be good to write down a note on https://wiki.jasig.org/display/CASUM/MemcacheTicketRegistry and on https://wiki.jasig.org/display/CASUM/OpenID, don't you?

Thank you very much!
Frederico Zveiter

jleleu

unread,
Apr 13, 2013, 6:18:51 AM4/13/13
to cas-...@lists.jasig.org
Hi,

You need to define a KryTranscoder Spring bean with the serializerMap property setting all the new types with their associated serializers. That's not the easy part. I think you're right you need to explicitely call the initalize() method (with init-method=).

That said, I'm not sure it will work, you're some kind of early adopter on this. I should add some Kryo serialization tests on pac4j to ensure it really works (and add the missing serializers). Hope I could do that for the coming release : 1.4.0.

Any feedback will be of course appreciated and we'll document it. It makes me think about couchbase : you use it, don't you ? Could you add some ticketRegistry.xml sample for it in the following page : https://wiki.jasig.org/display/CASUM/MemcacheTicketRegistry ?

Thanks.
Best regards,
Jérôme

jleleu

unread,
Apr 15, 2013, 9:43:17 AM4/15/13
to cas-...@lists.jasig.org
Hi

I just add tests for Kryo serialization to ensure it will work with pac4j 1.4.0 (in CAS server 4.0) : https://github.com/leleuj/pac4j/commit/c162fcb68ab9639b8089768abeffc8f3f9e134f6.

Frederico Guilherme Zveiter de Albuquerque

unread,
Apr 16, 2013, 8:39:37 AM4/16/13
to cas-...@lists.jasig.org
Hi, Jérôme.

Unfortunately, due to time constraints for project delivery and several failed attempts to implement the use of MemcachedClient + Kryo Serialization + OAuth Support, I had to choose to use the net.spy.memcached.transcoders.SerializingTranscoder.

Also, I don't believe that the effort to make this deprecated implementation work is worthy since version 4 of the CAS Server is already integrated with pac4j and this problem will no longer exist.

Thank you very much for the assistance.

Frederico Zveiter


On Mon, Apr 15, 2013 at 10:43 AM, jleleu <lel...@gmail.com> wrote:
Hi

I just add tests for Kryo serialization to ensure it will work with pac4j 1.4.0 (in CAS server 4.0) : https://github.com/leleuj/pac4j/commit/c162fcb68ab9639b8089768abeffc8f3f9e134f6.
Best regards,
Jérôme

--
You are currently subscribed to cas-...@lists.jasig.org as: frederic...@peixeurbano.com

To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user
Reply all
Reply to author
Forward
0 new messages