{"action":"created","issue":{"url":"https://api.github.com/repos/magro/memcached-session-manager/issues/123","labels_url":"https://api.github.com/repos/magro/memcached-session-manager/issues/123/labels{/name}","comments_url":"https://api.github.com/repos/magro/memcached-session-manager/issues/123/comments","events_url":"https://api.github.com/repos/magro/memcached-session-manager/issues/123/events","html_url":"https://github.com/magro/memcached-session-manager/issues/123","id":102671203,"number":123,"title":"Webapp context reload causes ClassCastException with sticky sessions","user":{"login":"google-code-exporter","id":13935235,"avatar_url":"https://avatars.githubusercontent.com/u/13935235?v=3","gravatar_id":"","url":"https://api.github.com/users/google-code-exporter","html_url":"https://github.com/google-code-exporter","followers_url":"https://api.github.com/users/google-code-exporter/followers","following_url":"https://api.github.com/users/google-code-exporter/following{/other_user}","gists_url":"https://api.github.com/users/google-code-exporter/gists{/gist_id}","starred_url":"https://api.github.com/users/google-code-exporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google-code-exporter/subscriptions","organizations_url":"https://api.github.com/users/google-code-exporter/orgs","repos_url":"https://api.github.com/users/google-code-exporter/repos","events_url":"https://api.github.com/users/google-code-exporter/events{/privacy}","received_events_url":"https://api.github.com/users/google-code-exporter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/magro/memcached-session-manager/labels/bug","name":"bug","color":"FFFFFF"},{"url":"https://api.github.com/repos/magro/memcached-session-manager/labels/imported","name":"imported","color":"FFFFFF"},{"url":"https://api.github.com/repos/magro/memcached-session-manager/labels/Milestone-1.4.0-RC3","name":"Milestone-1.4.0-RC3","color":"FFFFFF"},{"url":"https://api.github.com/repos/magro/memcached-session-manager/labels/Priority-Medium","name":"Priority-Medium","color":"FFFFFF"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-08-23T23:26:29Z","updated_at":"2015-08-23T23:26:38Z","closed_at":null,"body":"_From [rusla...@gmail.com](https://code.google.com/u/104677000896359185454/) on February 04, 2011 13:37:53_\n\n<b>What steps will reproduce the problem?</b>\n1. Some package in jar in WEB-INF/lib&#13;\n2. Init app, put object in session&#13;\n3. Redeploy&#13;\n4. Try to access object in session&#13;\n5. ClassCastException&#13;\n&#13;\n<b>What is the expected output? What do you see instead?</b>\n&#13;\nWorking without ClassCastException&#13;\n&#13;\n<b>What version of the product are you using? On what operating system?</b>\n&#13;\ntc7-1.4.0-RC1 &#13;\nTomcat 7.0.6&#13;\nJDK 1.6.0_18 x86&#13;\nWindows 7 x64&#13;\n&#13;\n<b>Please provide any additional information below.</b>\n&#13;\nObject o = session.getAttribute(\"cache\");&#13;\nru.cache.Cache cache = (ru.cache.Cache) o;&#13;\n&#13;\njava.lang.ClassCastException: ru.cache.CacheImpl cannot be cast to ru.cache.Cache&#13;\n    at ru.web.application.WebContext.getCache(WebContext.java:349)&#13;\n    at ..&#13;\n    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)&#13;\n&#13;\nBoth ru.cache.Cache is interface, ru.cache.CacheImpl is class,&#13;\nboth in same jar, this jar is inside WEB-INF/lib.&#13;\n&#13;\nDoublechecked not having this class in application server classpath.&#13;\n&#13;\nWhen running under debugging, surprisingly&#13;\no.getClass().getClassLoader() != ru.cache.Cache.class.getClassLoader()&#13;\n\n_Original issue: http://code.google.com/p/memcached-session-manager/issues/detail?id=80_"},"comment":{"url":"https://api.github.com/repos/magro/memcached-session-manager/issues/comments/133958218","html_url":"https://github.com/magro/memcached-session-manager/issues/123#issuecomment-133958218","issue_url":"https://api.github.com/repos/magro/memcached-session-manager/issues/123","id":133958218,"user":{"login":"google-code-exporter","id":13935235,"avatar_url":"https://avatars.githubusercontent.com/u/13935235?v=3","gravatar_id":"","url":"https://api.github.com/users/google-code-exporter","html_url":"https://github.com/google-code-exporter","followers_url":"https://api.github.com/users/google-code-exporter/followers","following_url":"https://api.github.com/users/google-code-exporter/following{/other_user}","gists_url":"https://api.github.com/users/google-code-exporter/gists{/gist_id}","starred_url":"https://api.github.com/users/google-code-exporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google-code-exporter/subscriptions","organizations_url":"https://api.github.com/users/google-code-exporter/orgs","repos_url":"https://api.github.com/users/google-code-exporter/repos","events_url":"https://api.github.com/users/google-code-exporter/events{/privacy}","received_events_url":"https://api.github.com/users/google-code-exporter/received_events","type":"User","site_admin":false},"created_at":"2015-08-23T23:26:38Z","updated_at":"2015-08-23T23:26:38Z","body":"_From [rusla...@gmail.com](https://code.google.com/u/104677000896359185454/) on February 07, 2011 03:47:04_\n\nSorry I can`t run it, I don`t have POM and my target environment is not Linux. However I`ve made simpler test, just unpack over fresh apache-tomcat-7.0.6. \r\n\r\nI am experiencing odd behaviour - on subsequential request, value is not stored into session. Also in log, I see double initialization of MSM.\n\n**Attachment:** [testmsm-artefacts.zip](http://code.google.com/p/memcached-session-manager/issues/detail?id=80#hc5)"}}