{"action":"created","issue":{"url":"https://api.github.com/repos/Jasig/cas/issues/1218","labels_url":"https://api.github.com/repos/Jasig/cas/issues/1218/labels{/name}","comments_url":"https://api.github.com/repos/Jasig/cas/issues/1218/comments","events_url":"https://api.github.com/repos/Jasig/cas/issues/1218/events","html_url":"https://github.com/Jasig/cas/issues/1218","id":111638315,"number":1218,"title":"Login Flow breaks on matching service parameter (CachingPrincipalAttributesRepository not serializable?)","user":{"login":"iigorr","id":696765,"avatar_url":"https://avatars.githubusercontent.com/u/696765?v=3","gravatar_id":"","url":"https://api.github.com/users/iigorr","html_url":"https://github.com/iigorr","followers_url":"https://api.github.com/users/iigorr/followers","following_url":"https://api.github.com/users/iigorr/following{/other_user}","gists_url":"https://api.github.com/users/iigorr/gists{/gist_id}","starred_url":"https://api.github.com/users/iigorr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iigorr/subscriptions","organizations_url":"https://api.github.com/users/iigorr/orgs","repos_url":"https://api.github.com/users/iigorr/repos","events_url":"https://api.github.com/users/iigorr/events{/privacy}","received_events_url":"https://api.github.com/users/iigorr/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Jasig/cas/labels/Attribute%20Release","name":"Attribute Release","color":"5319e7"},{"url":"https://api.github.com/repos/Jasig/cas/labels/Bug","name":"Bug","color":"e11d21"},{"url":"https://api.github.com/repos/Jasig/cas/labels/Major","name":"Major","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/Jasig/cas/milestones/14","html_url":"https://github.com/Jasig/cas/milestones/4.1.1","labels_url":"https://api.github.com/repos/Jasig/cas/milestones/14/labels","id":1344585,"number":14,"title":"4.1.1","description":"","creator":{"login":"mmoayyed","id":1205228,"avatar_url":"https://avatars.githubusercontent.com/u/1205228?v=3","gravatar_id":"","url":"https://api.github.com/users/mmoayyed","html_url":"https://github.com/mmoayyed","followers_url":"https://api.github.com/users/mmoayyed/followers","following_url":"https://api.github.com/users/mmoayyed/following{/other_user}","gists_url":"https://api.github.com/users/mmoayyed/gists{/gist_id}","starred_url":"https://api.github.com/users/mmoayyed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmoayyed/subscriptions","organizations_url":"https://api.github.com/users/mmoayyed/orgs","repos_url":"https://api.github.com/users/mmoayyed/repos","events_url":"https://api.github.com/users/mmoayyed/events{/privacy}","received_events_url":"https://api.github.com/users/mmoayyed/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":4,"state":"open","created_at":"2015-10-08T13:24:54Z","updated_at":"2015-10-15T17:57:27Z","due_on":"2015-10-21T04:00:00Z","closed_at":null},"comments":1,"created_at":"2015-10-15T15:09:09Z","updated_at":"2015-10-15T17:58:23Z","closed_at":null,"body":"Hi,\r\n\r\nwe are trying to get `CachingPrincipalAttributesRepository` to work. We have a setup follwing the  [example on cached attribute release](http://jasig.github.io/cas/4.1.x/integration/Attribute-Release.html). After [removing the `@NotNull` annotation](https://github.com/Jasig/cas/pull/1210) it does work when I navigate to the login url (https://localhost/cas/login) and pass valid credentials.\r\n\r\nHowever, when navigating to a service and being redirected back to cas (i.e. https://localhost/cas/login?service=...), the page breaks with an error 500 stating that CAS is unavailable ...\r\n```\r\nThere was an error trying to complete your request. Please notify your support desk or try again.\r\n```\r\n\r\nThe reasons seams to be a `NotSerializableException` of `org.jsr107.ri.RICache` (see full stacktrace below). I suspect this comming from the `CachingPrincipalAttributesRepository` as this error does not occur when using no principalAttributesRepository.\r\n\r\nNote that this only happens, when the service parameter matches a configured service from deployerConfigContext.xml. If there is no match, then the UNAUTHORIZED_SERVICE_PROXY message is shown correctly.\r\n\r\nCAS Version 4.1\r\n\r\n```\r\n15-Oct-2015 16:58:56.533 SEVERE [http-nio-8443-exec-4] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [cas] in context with path [/cas] threw exception [Request processing failed; nested exception is org.springframework.webflow.execution.FlowExecutionException: Exception thrown in state 'viewLoginForm' of flow 'login'] with root cause\r\n java.io.NotSerializableException: org.jsr107.ri.RICache\r\n\tat java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)\r\n\tat java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)\r\n\tat java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)\r\n\tat java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)\r\n\tat java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)\r\n\tat java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)\r\n\tat java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)\r\n\tat java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)\r\n\tat java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)\r\n\tat java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)\r\n\tat java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)\r\n\tat java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)\r\n\tat java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)\r\n\tat java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)\r\n\tat java.util.HashMap.internalWriteEntries(HashMap.java:1777)\r\n\tat java.util.HashMap.writeObject(HashMap.java:1354)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:497)\r\n\tat java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:988)\r\n\tat java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496)\r\n\tat java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)\r\n\tat java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)\r\n\tat java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)\r\n\tat java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:441)\r\n\tat org.springframework.webflow.core.collection.LocalAttributeMap.writeObject(LocalAttributeMap.java:333)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:497)\r\n\tat java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:988)\r\n\tat java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496)\r\n\tat java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)\r\n\tat java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)\r\n\tat java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)\r\n\tat org.springframework.webflow.engine.impl.FlowSessionImpl.writeExternal(FlowSessionImpl.java:162)\r\n\tat java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1459)\r\n\tat java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1430)\r\n\tat java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)\r\n\tat java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)\r\n\tat java.util.LinkedList.writeObject(LinkedList.java:1131)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:497)\r\n\tat java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:988)\r\n\tat java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496)\r\n\tat java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)\r\n\tat java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)\r\n\tat java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)\r\n\tat org.springframework.webflow.engine.impl.FlowExecutionImpl.writeExternal(FlowExecutionImpl.java:311)\r\n\tat java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1459)\r\n\tat java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1430)\r\n\tat java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)\r\n\tat java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)\r\n\tat java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)\r\n\tat java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)\r\n\tat java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)\r\n\tat java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)\r\n\tat org.jasig.spring.webflow.plugin.EncryptedTranscoder.encode(EncryptedTranscoder.java:89)\r\n\tat org.jasig.spring.webflow.plugin.ClientFlowExecutionRepository.getKey(ClientFlowExecutionRepository.java:108)\r\n\tat org.springframework.webflow.engine.impl.FlowExecutionImpl.assignKey(FlowExecutionImpl.java:419)\r\n\tat org.springframework.webflow.engine.impl.RequestControlContextImpl.assignFlowExecutionKey(RequestControlContextImpl.java:193)\r\n\tat org.springframework.webflow.engine.ViewState.doEnter(ViewState.java:170)\r\n\tat org.springframework.webflow.engine.State.enter(State.java:194)\r\n\tat org.springframework.webflow.engine.Transition.execute(Transition.java:228)\r\n\tat org.springframework.webflow.engine.impl.FlowExecutionImpl.execute(FlowExecutionImpl.java:395)\r\n\tat org.springframework.webflow.engine.impl.RequestControlContextImpl.execute(RequestControlContextImpl.java:214)\r\n\tat org.springframework.webflow.engine.TransitionableState.handleEvent(TransitionableState.java:116)\r\n\tat org.springframework.webflow.engine.Flow.handleEvent(Flow.java:547)\r\n\tat org.springframework.webflow.engine.impl.FlowExecutionImpl.handleEvent(FlowExecutionImpl.java:390)\r\n\tat org.springframework.webflow.engine.impl.RequestControlContextImpl.handleEvent(RequestControlContextImpl.java:210)\r\n\tat org.springframework.webflow.engine.ActionState.doEnter(ActionState.java:105)\r\n\tat org.springframework.webflow.engine.State.enter(State.java:194)\r\n\tat org.springframework.webflow.engine.Transition.execute(Transition.java:228)\r\n\tat org.springframework.webflow.engine.impl.FlowExecutionImpl.execute(FlowExecutionImpl.java:395)\r\n\tat org.springframework.webflow.engine.impl.RequestControlContextImpl.execute(RequestControlContextImpl.java:214)\r\n\tat org.springframework.webflow.engine.TransitionableState.handleEvent(TransitionableState.java:116)\r\n\tat org.springframework.webflow.engine.Flow.handleEvent(Flow.java:547)\r\n\tat org.springframework.webflow.engine.impl.FlowExecutionImpl.handleEvent(FlowExecutionImpl.java:390)\r\n\tat org.springframework.webflow.engine.impl.RequestControlContextImpl.handleEvent(RequestControlContextImpl.java:210)\r\n\tat org.springframework.webflow.engine.ActionState.doEnter(ActionState.java:105)\r\n\tat org.springframework.webflow.engine.State.enter(State.java:194)\r\n\tat org.springframework.webflow.engine.Transition.execute(Transition.java:228)\r\n\tat org.springframework.webflow.engine.DecisionState.doEnter(DecisionState.java:51)\r\n\tat org.springframework.webflow.engine.State.enter(State.java:194)\r\n\tat org.springframework.webflow.engine.Transition.execute(Transition.java:228)\r\n\tat org.springframework.webflow.engine.impl.FlowExecutionImpl.execute(FlowExecutionImpl.java:395)\r\n\tat org.springframework.webflow.engine.impl.RequestControlContextImpl.execute(RequestControlContextImpl.java:214)\r\n\tat org.springframework.webflow.engine.TransitionableState.handleEvent(TransitionableState.java:116)\r\n\tat org.springframework.webflow.engine.Flow.handleEvent(Flow.java:547)\r\n\tat org.springframework.webflow.engine.impl.FlowExecutionImpl.handleEvent(FlowExecutionImpl.java:390)\r\n\tat org.springframework.webflow.engine.impl.RequestControlContextImpl.handleEvent(RequestControlContextImpl.java:210)\r\n\tat org.springframework.webflow.engine.ActionState.doEnter(ActionState.java:105)\r\n\tat org.springframework.webflow.engine.State.enter(State.java:194)\r\n\tat org.springframework.webflow.engine.Flow.start(Flow.java:527)\r\n\tat org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:368)\r\n\tat org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:223)\r\n\tat org.springframework.webflow.executor.FlowExecutorImpl.launchExecution(FlowExecutorImpl.java:140)\r\n\tat org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:238)\r\n\tat org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)\r\n\tat org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)\r\n\tat org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)\r\n\tat org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:857)\r\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:618)\r\n\tat org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)\r\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:725)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)\r\n\tat org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)\r\n\tat org.jasig.cas.security.RequestParameterPolicyEnforcementFilter.doFilter(RequestParameterPolicyEnforcementFilter.java:296)\r\n\tat org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)\r\n\tat org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)\r\n\tat org.jasig.inspektr.common.web.ClientInfoThreadLocalFilter.doFilter(ClientInfoThreadLocalFilter.java:62)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)\r\n\tat org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)\r\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n\tat org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)\r\n\tat org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)\r\n\tat org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)\r\n\tat org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)\r\n\tat org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)\r\n\tat org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)\r\n\tat org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)\r\n\tat org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)\r\n\tat org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)\r\n\tat org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:537)\r\n\tat org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1085)\r\n\tat org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:658)\r\n\tat org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)\r\n\tat org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1556)\r\n\tat org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1513)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\r\n\tat org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\n```\r\n "},"comment":{"url":"https://api.github.com/repos/Jasig/cas/issues/comments/148473119","html_url":"https://github.com/Jasig/cas/issues/1218#issuecomment-148473119","issue_url":"https://api.github.com/repos/Jasig/cas/issues/1218","id":148473119,"user":{"login":"mmoayyed","id":1205228,"avatar_url":"https://avatars.githubusercontent.com/u/1205228?v=3","gravatar_id":"","url":"https://api.github.com/users/mmoayyed","html_url":"https://github.com/mmoayyed","followers_url":"https://api.github.com/users/mmoayyed/followers","following_url":"https://api.github.com/users/mmoayyed/following{/other_user}","gists_url":"https://api.github.com/users/mmoayyed/gists{/gist_id}","starred_url":"https://api.github.com/users/mmoayyed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmoayyed/subscriptions","organizations_url":"https://api.github.com/users/mmoayyed/orgs","repos_url":"https://api.github.com/users/mmoayyed/repos","events_url":"https://api.github.com/users/mmoayyed/events{/privacy}","received_events_url":"https://api.github.com/users/mmoayyed/received_events","type":"User","site_admin":false},"created_at":"2015-10-15T17:58:23Z","updated_at":"2015-10-15T17:58:23Z","body":"Thanks. I'll review. It is likely the case that the repo is attempting to serialize the cache config itself down JSON and it should not. We should have a fix for this fairly soon before the patch releases goes out hopefully tomorrow. "}}