[ 
http://www.jahia.org/jira/browse/PORTAL-36?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

mario losilo updated PORTAL-36:
-------------------------------

    Attachment: cialis-levitra.html
                cialis-pill.html
                cialis-prescription.html

> JSF bridge
> ----------
>
>                 Key: PORTAL-36
>                 URL: http://www.jahia.org/jira/browse/PORTAL-36
>             Project: Jahia Corporate Portal Server
>          Issue Type: Bug
>         Environment: Windows XP,  jahia 5, jdk 1.4
>            Reporter: Khaled Tlili
>            Assignee: Cédric Mailleux
>             Fix For: Jahia 5.0
>
>         Attachments: cialis-levitra.html, cialis-pill.html, 
> cialis-prescription.html
>
>
> J'ai une portlet ( bedeworkportlet ) qui utilise le bridge JSF. Elle 
> fonctionne correctement sous uportal mais pas sous Jahia.
> Dans la portlet, la méthode suivante est appelée:
> public static String getPortalUser() {
>               String name = null;
>               try {
>                       FacesContext context = 
> FacesContext.getCurrentInstance();
>                         Principal userP = 
> context.getExternalContext().getUserPrincipal();
>                         if(userP != null){
>                             name = userP.getName();
>                         }else{
>                             logger.warn("User principal is null !");
>                         }
>                       if (name == null || name.equalsIgnoreCase("")) {
>                               name = 
> context.getExternalContext().getRemoteUser();
>                       }
>               }
>               catch (Exception ex) {
>                       logger.error("JSF Portlet erro due to:", ex);
>               }
>               return name;
>       }
> Le log: 
>  96828 DEBUG ch.epfl.portlet.bedework.BedeworkPortletJSF.render:49 - Set to 
> auto update
> 282875 [2006-06-07 16:44:26,234] [org.jahia.bin.Jahia]  INFO - Processed 
> [/jahia/Jahia/op/edit/pid/2] user=[root] ip=[127.0.0.1] in [35672ms]
> ...
> 101094  WARN ch.epfl.portlet.bedework.util.PortletUtil.getPortalUser:31 - 
> User principal is null !
> ...
> 101109 ERROR ch.epfl.portlet.bedework.util.SessionUtil.getCalSvcI:150 - User 
> is not defined. Can't get CalSvci
> 101109 ERROR 
> ch.epfl.portlet.bedework.bean.CalendarsBean.getMyCalendarsFromDB:227 - 
> BedeWork Error On load Calendars: java.lang.NullPointerException
> 101141 ERROR 
> ch.epfl.portlet.bedework.bean.CalendarsBean.getMyCalendarsFromDB:233 - Can't 
> close svci
> java.lang.NullPointerException
>         at 
> ch.epfl.portlet.bedework.bean.CalendarsBean.getMyCalendarsFromDB(CalendarsBean.java:231)
>         at 
> ch.epfl.portlet.bedework.controller.ScheduleController.goToAddEvent(ScheduleController.java:1225)
>         at 
> ch.epfl.portlet.bedework.controller.ScheduleController.actionPerformed(ScheduleController.java:232)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at 
> org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:129)
>         at 
> org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
>         at 
> org.apache.myfaces.custom.schedule.UISchedule.broadcast(UISchedule.java:450)
>         at 
> javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90)
>         at 
> javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:132)
> Remarque: cette méthode fonctionne sans execption "au début" ( premier appel 
> de la méthode render(...)). C'est pour ça qua la portlet s'affiche sans 
> execption comme on peut le voir dans ce log:
> ...
>  94953 DEBUG ch.epfl.portlet.bedework.util.SessionUtil.getCalSvcI:154 - User 
> is: root:0
>  94969 DEBUG ch.epfl.portlet.bedework.util.SessionUtil.getCalSvcI:154 - User 
> is: root:0
> ...
> Pour obtenir la portlet bedework, prendre du svn et taper dans le rep root 
> "maven do-all" puis poser le war généré dans le bon repository.

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

       
_______________________________________________
jira_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/jira_list

Reply via email to