You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Michael Heß <mh...@ordix.de> on 2008/04/09 18:25:58 UTC

ErrorPageWriter causes Facelets/MyFaces confusion

Hi list,

I just stumbled upon some weired problem. I have a rather basic myfaces
1.2.2 + facelets 1.1.3 setup. What I tried to achieve, is to NOT have
either Facelets nor MyFaces handle any of the error 500 scenarios.

Right now, in case of error 500 I have a facelets error page. "An Error
Occured", and collapsable trees for the components etc. You know the
drill.

So I decided to disable debugging in facelets, by switching
context-parameter facelets.DEVELOPMENT to false. This was the first moment
I got confused, because devmode was already disabled.

BUT: The error page definetly states "Generated by Facelets" in the lower
right corner.

I spent the last hour tracking this down. So far I have confirmed that the
FaceletsViewHandler does not trigger the generation of said errorpage. So
I searched some more, and found javax.faces.webapp._ErrorPageWriter to be
the culprit. The problem is, that it seems to be a copy of the Facelets
DevTools class. And furthermore the filename of the error-template has
been copied as well. It's

"META-INF/rsc/facelet-dev-error.xml"

on both myfaces as well as facelets. I have checked the template included
with myfaces and it is clearly different from the one included with
facelets. So my best guess right now (I have not confirmed this any
further) is, that MyFaces loads the template from facelets.jar due to some
unlucky webapp classloader situation.

Although the solution to my current problem is most likely to just disable
debugging in myfaces as well, I would like to strongly advise to change
the filename of the MyFaces error-template. This really confused me a lot.
:-)

Is this a known issue?
Otherwise I will open a bug for this on jira, to document it properly.

bye, Michael


-- 
Michael Heß
Senior Consultant

ORDIX AG
Westernmauer 12-16
33098 Paderborn

http://www.ordix.de
Tel.: 05251 / 10 63  0
Fax : 05251 / 10 63 99
Mob :  0163 /673 49 43

ORDIX AG - Aktiengesellschaft für Softwareentwicklung, Schulung, Beratung
und Systemintegration
Vorsitzender des Aufsichtsrates: Prof. Dr. Hermann Johannes
Vorstand: Wolfgang Kögler (Vorsitzender), Benedikt Georgi, Christoph
Lafeld, Axel Röber
Firmensitz: Westernmauer 12 - 16, 33098 Paderborn, Tel: 05251 / 1063-0,
Fax: 0180 / 1 67 34 90
Amtsgericht Paderborn, HRB 2941, Ust-IdNr.DE 126333767, Steuernummer:
339/5866/0142



Re: ErrorPageWriter causes Facelets/MyFaces confusion

Posted by Michael Heß <mh...@ordix.de>.
Hi Leonardo,

yes I found this, and as supposed before this actually helped. What
confused me, was the fact that myfaces uses the facelets error page.

Anyway, thank you for pointing this out.

bye, Michael


Leonardo Uribe schrieb:
> Have you seen this:
>
> http://wiki.apache.org/myfaces/Handling_Server_Errors
>
> for disable error handling do this:
>
>   <!-- if you want to disable the behaviour completely -->
>   <context-param>
>     <param-name>org.apache.myfaces.ERROR_HANDLING</param-name>
>     <param-value>false</param-value>
>   </context-param>
>   <!-- if you are using myfaces + facelets don't forget to do this -->
>   <context-param>
>     <param-name>facelets.DEVELOPMENT</param-name>
>     <param-value>false</param-value>
>   </context-param>
>
>
> regards
>
> Leonardo Uribe
>


-- 
Michael Heß
Senior Consultant

ORDIX AG
Westernmauer 12-16
33098 Paderborn

http://www.ordix.de
Tel.: 05251 / 10 63  0
Fax : 05251 / 10 63 99
Mob :  0163 /673 49 43

ORDIX AG - Aktiengesellschaft für Softwareentwicklung, Schulung, Beratung
und Systemintegration
Vorsitzender des Aufsichtsrates: Prof. Dr. Hermann Johannes
Vorstand: Wolfgang Kögler (Vorsitzender), Benedikt Georgi, Christoph
Lafeld, Axel Röber
Firmensitz: Westernmauer 12 - 16, 33098 Paderborn, Tel: 05251 / 1063-0,
Fax: 0180 / 1 67 34 90
Amtsgericht Paderborn, HRB 2941, Ust-IdNr.DE 126333767, Steuernummer:
339/5866/0142



Re: ErrorPageWriter causes Facelets/MyFaces confusion

Posted by Leonardo Uribe <lu...@gmail.com>.
Have you seen this:

http://wiki.apache.org/myfaces/Handling_Server_Errors

for disable error handling do this:

  <!-- if you want to disable the behaviour completely -->
  <context-param>
    <param-name>org.apache.myfaces.ERROR_HANDLING</param-name>
    <param-value>false</param-value>
  </context-param>
  <!-- if you are using myfaces + facelets don't forget to do this -->
  <context-param>
    <param-name>facelets.DEVELOPMENT</param-name>
    <param-value>false</param-value>
  </context-param>


regards

Leonardo Uribe

Re: ErrorPageWriter causes Facelets/MyFaces confusion

Posted by Martin Marinschek <ma...@gmail.com>.
Open a jira-issue.

regards,

Martin

On 4/9/08, Michael Heß <mh...@ordix.de> wrote:
> Hi list,
>
> I just stumbled upon some weired problem. I have a rather basic myfaces
> 1.2.2 + facelets 1.1.3 setup. What I tried to achieve, is to NOT have
> either Facelets nor MyFaces handle any of the error 500 scenarios.
>
> Right now, in case of error 500 I have a facelets error page. "An Error
> Occured", and collapsable trees for the components etc. You know the
> drill.
>
> So I decided to disable debugging in facelets, by switching
> context-parameter facelets.DEVELOPMENT to false. This was the first moment
> I got confused, because devmode was already disabled.
>
> BUT: The error page definetly states "Generated by Facelets" in the lower
> right corner.
>
> I spent the last hour tracking this down. So far I have confirmed that the
> FaceletsViewHandler does not trigger the generation of said errorpage. So
> I searched some more, and found javax.faces.webapp._ErrorPageWriter to be
> the culprit. The problem is, that it seems to be a copy of the Facelets
> DevTools class. And furthermore the filename of the error-template has
> been copied as well. It's
>
> "META-INF/rsc/facelet-dev-error.xml"
>
> on both myfaces as well as facelets. I have checked the template included
> with myfaces and it is clearly different from the one included with
> facelets. So my best guess right now (I have not confirmed this any
> further) is, that MyFaces loads the template from facelets.jar due to some
> unlucky webapp classloader situation.
>
> Although the solution to my current problem is most likely to just disable
> debugging in myfaces as well, I would like to strongly advise to change
> the filename of the MyFaces error-template. This really confused me a lot.
> :-)
>
> Is this a known issue?
> Otherwise I will open a bug for this on jira, to document it properly.
>
> bye, Michael
>
>
> --
> Michael Heß
> Senior Consultant
>
> ORDIX AG
> Westernmauer 12-16
> 33098 Paderborn
>
> http://www.ordix.de
> Tel.: 05251 / 10 63  0
> Fax : 05251 / 10 63 99
> Mob :  0163 /673 49 43
>
> ORDIX AG - Aktiengesellschaft für Softwareentwicklung, Schulung, Beratung
> und Systemintegration
> Vorsitzender des Aufsichtsrates: Prof. Dr. Hermann Johannes
> Vorstand: Wolfgang Kögler (Vorsitzender), Benedikt Georgi, Christoph
> Lafeld, Axel Röber
> Firmensitz: Westernmauer 12 - 16, 33098 Paderborn, Tel: 05251 / 1063-0,
> Fax: 0180 / 1 67 34 90
> Amtsgericht Paderborn, HRB 2941, Ust-IdNr.DE 126333767, Steuernummer:
> 339/5866/0142
>
>
>


-- 

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces