[ 
http://jira.nuxeo.org/browse/NXP-2261?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stéfane Fermigier updated NXP-2261:
-----------------------------------

    Fix Version/s:     (was: 5.2 M2)
                   5.2 M3

> UserSessionBean currentUser factory crashes with NPE when called from a 
> non-JSF context
> ---------------------------------------------------------------------------------------
>
>                 Key: NXP-2261
>                 URL: http://jira.nuxeo.org/browse/NXP-2261
>             Project: Nuxeo Enterprise Platform
>          Issue Type: Bug
>    Affects Versions: 5.1.4
>            Reporter: Olivier Grisel
>            Assignee: Alexandre Russel
>             Fix For: 5.1.6, 5.2 M3
>
>   Original Estimate: 4 hours
>  Remaining Estimate: 4 hours
>
> FacesContext.getCurrentInstance() is null in :
>     @Factory(value = "currentUser", scope = SESSION)
>     public Principal getCurrentUser() throws Exception {
>         if (currentUser == null) {
>             ExternalContext context = 
> FacesContext.getCurrentInstance().getExternalContext();
>             currentUser = context.getUserPrincipal();
>         }
>         return currentUser;
>     }
> UserSessionBean use to be a SFSB able it fetch the principal from the EJB 
> context when FacesContext.getCurrentInstance() is null.
> The JSF context is null when using Seam enabled restlet used by the LiveEdit 
> client, for instance:
>   http://localhost:8080/nuxeo/restAPI/creationContainerList?docType=File
> (CreationContainerListRestlet)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.nuxeo.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets

Reply via email to