Uploaded image for project: 'CAS Server'
  1. CAS-1393

Memcached serialization fails when creating a proxy ticket

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.0 RC2
    • Fix Version/s: 4.0
    • Component/s: None
    • Labels:
      None

      Description

      When using Memcached as the tickets registry and calling : http://localhost:8080/cas/proxy?targetService=x&y, I get the following serialization error :

      2013-12-02 16:13:36,341 ERROR org.jasig.cas.ticket.registry.MemCacheTicketRegistry - <Failed fetching TGT-4-JnrWXv1VG95xtuE3OelgIeD6tdw6Oyxy5hZgUxnSgXVOamqPmh-cas01.example.org >
      java.lang.RuntimeException: Exception waiting for value
      at net.spy.memcached.MemcachedClient.get(MemcachedClient.java:1132)
      at net.spy.memcached.MemcachedClient.get(MemcachedClient.java:1151)
      at org.jasig.cas.ticket.registry.MemCacheTicketRegistry.getTicket(MemCacheTicketRegistry.java:150)
      at org.jasig.cas.ticket.registry.AbstractTicketRegistry.getTicket_aroundBody0(AbstractTicketRegistry.java:50)
      at org.jasig.cas.ticket.registry.AbstractTicketRegistry.getTicket_aroundBody1$advice(AbstractTicketRegistry.java:54)
      at org.jasig.cas.ticket.registry.AbstractTicketRegistry.getTicket(AbstractTicketRegistry.java:1)
      at org.jasig.cas.CentralAuthenticationServiceImpl.grantServiceTicket_aroundBody2(CentralAuthenticationServiceImpl.java:247)
      at org.jasig.cas.CentralAuthenticationServiceImpl.grantServiceTicket_aroundBody3$advice(CentralAuthenticationServiceImpl.java:54)
      at org.jasig.cas.CentralAuthenticationServiceImpl.grantServiceTicket(CentralAuthenticationServiceImpl.java:1)
      at org.jasig.cas.CentralAuthenticationServiceImpl.grantServiceTicket_aroundBody4(CentralAuthenticationServiceImpl.java:344)
      at org.jasig.cas.CentralAuthenticationServiceImpl.grantServiceTicket_aroundBody5$advice(CentralAuthenticationServiceImpl.java:54)
      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:317)
      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 com.github.inspektr.audit.AuditTrailManagementAspect.handleAuditTrail(AuditTrailManagementAspect.java:126)
      at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
      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 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.GeneratedMethodAccessor19.invoke(Unknown Source)
      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:91)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      at $Proxy41.grantServiceTicket(Unknown Source)
      at org.jasig.cas.web.ProxyController.handleRequestInternal(ProxyController.java:87)
      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:925)
      at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
      at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
      at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
      at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
      at org.jasig.cas.web.init.SafeDispatcherServlet.service_aroundBody2(SafeDispatcherServlet.java:125)
      at org.jasig.cas.web.init.SafeDispatcherServlet.service_aroundBody3$advice(SafeDispatcherServlet.java:54)
      at org.jasig.cas.web.init.SafeDispatcherServlet.service(SafeDispatcherServlet.java:1)
      at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:648)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1336)
      at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
      at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307)
      at com.github.inspektr.common.web.ClientInfoThreadLocalFilter.doFilter(ClientInfoThreadLocalFilter.java:63)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:453)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:559)
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382)
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
      at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
      at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
      at org.eclipse.jetty.server.Server.handle(Server.java:365)
      at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485)
      at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:926)
      at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:988)
      at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)
      at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
      at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
      at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:627)
      at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:51)
      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
      at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
      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:1125)
      ... 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:143)
      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: Unable to deserialize object of type: org.jasig.cas.authentication.HandlerResult
      Serialization trace:
      successes (org.jasig.cas.authentication.ImmutableAuthentication)
      authentication (org.jasig.cas.ticket.TicketGrantingTicketImpl)
      at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:571)
      at com.esotericsoftware.kryo.serialize.MapSerializer.readObjectData(MapSerializer.java:129)
      at com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:220)
      at com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:200)
      at com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:220)
      at com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:200)
      at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:566)
      ... 96 more
      Caused by: com.esotericsoftware.kryo.SerializationException: Class cannot be created (missing no-arg constructor): org.jasig.cas.authentication.HttpBasedServiceCredential
      Serialization trace:
      credentialMetaData (org.jasig.cas.authentication.HandlerResult)
      at com.esotericsoftware.kryo.Kryo.newInstance(Kryo.java:688)
      at com.esotericsoftware.kryo.Serializer.newInstance(Serializer.java:75)
      at com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:200)
      at com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:220)
      at com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:200)
      at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:566)
      ... 102 more
      Caused by: java.lang.InstantiationException: org.jasig.cas.authentication.HttpBasedServiceCredential
      at java.lang.Class.newInstance0(Class.java:357)
      at java.lang.Class.newInstance(Class.java:325)
      at com.esotericsoftware.kryo.Kryo.newInstance(Kryo.java:676)
      ... 107 more

        Attachments

          Activity

            People

            • Assignee:
              jleleu Jérôme LELEU
              Reporter:
              jleleu Jérôme LELEU
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: