Return-Path: X-Original-To: apmail-shiro-dev-archive@www.apache.org Delivered-To: apmail-shiro-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4656AC5E9 for ; Sun, 22 Jul 2012 01:10:36 +0000 (UTC) Received: (qmail 76056 invoked by uid 500); 22 Jul 2012 01:10:36 -0000 Delivered-To: apmail-shiro-dev-archive@shiro.apache.org Received: (qmail 76035 invoked by uid 500); 22 Jul 2012 01:10:36 -0000 Mailing-List: contact dev-help@shiro.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@shiro.apache.org Delivered-To: mailing list dev@shiro.apache.org Received: (qmail 76023 invoked by uid 99); 22 Jul 2012 01:10:36 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 22 Jul 2012 01:10:36 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id CCC1C14281C for ; Sun, 22 Jul 2012 01:10:35 +0000 (UTC) Date: Sun, 22 Jul 2012 01:10:35 +0000 (UTC) From: "Les Hazlewood (JIRA)" To: dev@shiro.apache.org Message-ID: <876463955.87203.1342919435840.JavaMail.jiratomcat@issues-vm> In-Reply-To: <16076462.14794.1331752001841.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Assigned] (SHIRO-350) Creating a subject should not create a session MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SHIRO-350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Les Hazlewood reassigned SHIRO-350: ----------------------------------- Assignee: Les Hazlewood > Creating a subject should not create a session > ---------------------------------------------- > > Key: SHIRO-350 > URL: https://issues.apache.org/jira/browse/SHIRO-350 > Project: Shiro > Issue Type: Bug > Affects Versions: 1.2.0 > Reporter: Dan Finkelstein > Assignee: Les Hazlewood > Fix For: 1.2.1, 1.3.0 > > > When the following method is called: > public Subject getSubjectByLogin(final String login) { > PrincipalCollection principals = new SimplePrincipalCollection(login, REALM_NAME); > return new Subject.Builder().principals(principals).buildSubject(); > } > it throws an exception on buildSubject(): > Caused by: java.lang.IllegalArgumentException: SessionContext must be an HTTP compatible implementation. > at org.apache.shiro.web.session.mgt.ServletContainerSessionManager.createSession(ServletContainerSessionManager.java:103) > at org.apache.shiro.web.session.mgt.ServletContainerSessionManager.start(ServletContainerSessionManager.java:64) > at org.apache.shiro.mgt.SessionsSecurityManager.start(SessionsSecurityManager.java:121) > at org.apache.shiro.subject.support.DelegatingSubject.getSession(DelegatingSubject.java:336) > at org.apache.shiro.subject.support.DelegatingSubject.getSession(DelegatingSubject.java:314) > at org.apache.shiro.mgt.DefaultSubjectDAO.mergePrincipals(DefaultSubjectDAO.java:182) > at org.apache.shiro.mgt.DefaultSubjectDAO.saveToSession(DefaultSubjectDAO.java:163) > at org.apache.shiro.mgt.DefaultSubjectDAO.save(DefaultSubjectDAO.java:144) > at org.apache.shiro.mgt.DefaultSecurityManager.save(DefaultSecurityManager.java:383) > at org.apache.shiro.mgt.DefaultSecurityManager.createSubject(DefaultSecurityManager.java:350) > at org.apache.shiro.subject.Subject$Builder.buildSubject(Subject.java:846) > It tries to create a session but really should not. > Please see forum http://shiro-user.582556.n2.nabble.com/Subject-being-changed-td7370203.html for more details > In our app, in our backoffice area, we display lists of users and their roles, and this functionality is used in this way. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira