{"action":"created","issue":{"url":"https://api.github.com/repos/pac4j/pac4j/issues/297","labels_url":"https://api.github.com/repos/pac4j/pac4j/issues/297/labels{/name}","comments_url":"https://api.github.com/repos/pac4j/pac4j/issues/297/comments","events_url":"https://api.github.com/repos/pac4j/pac4j/issues/297/events","html_url":"https://github.com/pac4j/pac4j/issues/297","id":109355556,"number":297,"title":"SAML support: NoClassDefFoundError: javax/servlet/ServletOutputStream","user":{"login":"leleuj","id":1038508,"avatar_url":"https://avatars.githubusercontent.com/u/1038508?v=3","gravatar_id":"","url":"https://api.github.com/users/leleuj","html_url":"https://github.com/leleuj","followers_url":"https://api.github.com/users/leleuj/followers","following_url":"https://api.github.com/users/leleuj/following{/other_user}","gists_url":"https://api.github.com/users/leleuj/gists{/gist_id}","starred_url":"https://api.github.com/users/leleuj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leleuj/subscriptions","organizations_url":"https://api.github.com/users/leleuj/orgs","repos_url":"https://api.github.com/users/leleuj/repos","events_url":"https://api.github.com/users/leleuj/events{/privacy}","received_events_url":"https://api.github.com/users/leleuj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/pac4j/pac4j/milestones/2","html_url":"https://github.com/pac4j/pac4j/milestones/1.8","labels_url":"https://api.github.com/repos/pac4j/pac4j/milestones/2/labels","id":1159821,"number":2,"title":"1.8","description":null,"creator":{"login":"leleuj","id":1038508,"avatar_url":"https://avatars.githubusercontent.com/u/1038508?v=3","gravatar_id":"","url":"https://api.github.com/users/leleuj","html_url":"https://github.com/leleuj","followers_url":"https://api.github.com/users/leleuj/followers","following_url":"https://api.github.com/users/leleuj/following{/other_user}","gists_url":"https://api.github.com/users/leleuj/gists{/gist_id}","starred_url":"https://api.github.com/users/leleuj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leleuj/subscriptions","organizations_url":"https://api.github.com/users/leleuj/orgs","repos_url":"https://api.github.com/users/leleuj/repos","events_url":"https://api.github.com/users/leleuj/events{/privacy}","received_events_url":"https://api.github.com/users/leleuj/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":53,"state":"open","created_at":"2015-06-11T07:51:25Z","updated_at":"2015-10-07T13:49:41Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-10-01T18:23:34Z","updated_at":"2015-10-07T13:52:38Z","closed_at":null,"body":"When testing the SAML support with the https://github.com/pac4j/play-pac4j-scala-demo, I get the follwing error:\r\n\r\n```\r\n[ERROR] [10/01/2015 20:14:19.050] [application-akka.actor.default-dispatcher-3] [ActorSystem(application)] Uncaught fatal error from thread [application-akka.actor.default-dispatcher-3] shutting down ActorSystem [application]\r\njava.lang.NoClassDefFoundError: javax/servlet/ServletOutputStream\r\n\tat org.pac4j.saml.sso.impl.SAML2WebSSOMessageSender.getMessageEncoder(SAML2WebSSOMessageSender.java:161)\r\n\tat org.pac4j.saml.sso.impl.SAML2WebSSOMessageSender.sendMessage(SAML2WebSSOMessageSender.java:74)\r\n\tat org.pac4j.saml.sso.impl.SAML2WebSSOMessageSender.sendMessage(SAML2WebSSOMessageSender.java:46)\r\n```\r\n\r\nTaking a look at the `Pac4jHTTPPostEncoder`, I see a (forgotten I imagine) reference to the HTTP servlet response: https://github.com/pac4j/pac4j/blob/master/pac4j-saml/src/main/java/org/pac4j/saml/transport/Pac4jHTTPPostEncoder.java#L14, which should be removed.\r\n\r\nMaybe that explained the issue."},"comment":{"url":"https://api.github.com/repos/pac4j/pac4j/issues/comments/146202058","html_url":"https://github.com/pac4j/pac4j/issues/297#issuecomment-146202058","issue_url":"https://api.github.com/repos/pac4j/pac4j/issues/297","id":146202058,"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-07T13:52:38Z","updated_at":"2015-10-07T13:52:38Z","body":"This sort of thing I think can be prevented by adding checkstyle to the project, with a modest ruleset that caused build failures when unused imports are found. "}}