myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yee CN <>
Subject addMessage(...SEVERITY_ERROR...) cause hibernate lazy initialization error???
Date Thu, 06 Apr 2006 15:25:08 GMT


I have a jsf page that with a simple action as follows:


public String myAction() {

            try {


            } catch (Exception e) {

                        String msg = e.getMessage();

FacesContext.getCurrentInstance().addMessage(null, new
FacesMessage(FacesMessage.SEVERITY_ERROR, msg,msg));


            Return ResultPage;




I find that when an exception did actually occurs, the ResultPage will raise
an hibernate initialization error.

However if I change FacesMessage.SEVERITY_ERROR to
FacesMessages.SEVERITY_WARN, the page will display OK.


I am using last night's build of MyFaces 1.1.3 snapshot plus Tomahawk 1.1.2


I only noticed this problem after changing to Facelets, so I do not rule out
Facelets as a culprit.


Does anybody noticed this behaviour? What is the explanation for the
difference in behavior? 

This is something that is bugging me big time, so I would appreciate any


Many thanks in advance.



View raw message