You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Mario Ivankovits <ma...@ops.co.at> on 2006/01/19 16:08:25 UTC
Re: HtmlRendererUtils.selectContentType
Hi!
Ok, In my case the FacesContext is null.
html.HtmlRendererUtils - *NULL* context null
Servlet.service() for servlet opsj threw exception
java.lang.NullPointerException
at
org.apache.myfaces.renderkit.html.HtmlRendererUtils.selectContentType(HtmlRendererUtils.java:1008)
at
org.apache.myfaces.component.html.util.AddResource.writeWithFullHeader(AddResource.java:713)
at
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:139)
It will be hard work to determine why the facesContext is null.
One idea I have in mind is, that the given page has an iframe which will
also be a faces page.
Now that exactly this page works multiple times and only fails rarely I
guess this has something to do with concurrency, though, the faces
context is in an thread local, so why should this have something to do
with conc?
Odd, thing - If no one else has a new idea, I have to add more debug
statements.
---
Mario
Re: HtmlRendererUtils.selectContentType
Posted by Wei Chiang <ch...@riihonlahti.com>.
Hi,
Thanks for digging into it.
I don't use iFrame.
In my case, the problem disappears(or does not show), if I don't use
jscookmenu. I wonder if it has something to do with the situation where the
page is redirected back from the login page by the filter. And somehow it
works on a different thread or the threadlocal has been reset?
Thanks again for the trouble.
Wei
On Thursday 19 January 2006 17:08, Mario Ivankovits wrote:
> Hi!
>
> Ok, In my case the FacesContext is null.
>
> html.HtmlRendererUtils - *NULL* context null
> Servlet.service() for servlet opsj threw exception
> java.lang.NullPointerException
> at
> org.apache.myfaces.renderkit.html.HtmlRendererUtils.selectContentType(HtmlR
>endererUtils.java:1008) at
> org.apache.myfaces.component.html.util.AddResource.writeWithFullHeader(AddR
>esource.java:713) at
> org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(Extensions
>Filter.java:139)
>
> It will be hard work to determine why the facesContext is null.
> One idea I have in mind is, that the given page has an iframe which will
> also be a faces page.
>
> Now that exactly this page works multiple times and only fails rarely I
> guess this has something to do with concurrency, though, the faces
> context is in an thread local, so why should this have something to do
> with conc?
>
> Odd, thing - If no one else has a new idea, I have to add more debug
> statements.
>
> ---
> Mario
Re: HtmlRendererUtils.selectContentType
Posted by Volker Weber <us...@weber-oldenburg.de>.
Hi Mario,
the only case i remember where the FacesContext is null was rendering
the errorpage after another error occurs.
I don't think this is the case in your situation, you wrote you see this
in the logs only, if i remember correct.
But maybe it gives you a hint.
Regards,
Volker
Mario Ivankovits wrote:
> Hi!
>
> Ok, In my case the FacesContext is null.
>
> html.HtmlRendererUtils - *NULL* context null
> Servlet.service() for servlet opsj threw exception
> java.lang.NullPointerException
> at
> org.apache.myfaces.renderkit.html.HtmlRendererUtils.selectContentType(HtmlRendererUtils.java:1008)
> at
> org.apache.myfaces.component.html.util.AddResource.writeWithFullHeader(AddResource.java:713)
> at
> org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:139)
>
> It will be hard work to determine why the facesContext is null.
> One idea I have in mind is, that the given page has an iframe which will
> also be a faces page.
>
> Now that exactly this page works multiple times and only fails rarely I
> guess this has something to do with concurrency, though, the faces
> context is in an thread local, so why should this have something to do
> with conc?
>
> Odd, thing - If no one else has a new idea, I have to add more debug
> statements.
>
> ---
> Mario
>
--
Don't answer to From: address!
Mail to this account are droped if not recieved via mailinglist.
To contact me direct create the mail address by
concatenating my forename to my senders domain.