Hi,

 

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

 

public String myAction() {

            try {

                        myService.doSomething();

            } 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 Snapshot.

 

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 help.

 

Many thanks in advance.

 

Yee

Reply via email to