dev@javaserverfaces.java.net

Re: NPE in factory.getApplication()

From: Ryan Lubke <Ryan.Lubke_at_Sun.COM>
Date: Mon, 07 Jan 2008 15:06:03 -0800

The ApplicationAssociate throws the NPE as the FacesContext we provide
during initialization isn't
available.

So, based on the info provided, it seems the Filter is initializing on
its own thread after the JSF factories have been initialized
but before the application object has been called for to be initialized
by the config thread where the FacesContext
exists.

What container are they running on?

Matthias Wessendorf wrote:
> from an init() of a Filter.
>
> On Jan 7, 2008 10:10 PM, Ryan Lubke <Ryan.Lubke_at_sun.com> wrote:
>
>> Matthias Wessendorf wrote:
>>
>>> Hi,
>>>
>>> this code:
>>>
>>> ApplicationFactory factory = (ApplicationFactory)
>>> FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
>>> Application application = factory.getApplication();
>>>
>>> did throw this error:
>>> java.lang.NullPointerException
>>> at com.sun.faces.application.ApplicationAssociate.<init>(ApplicationAssociate.
>>> java:143)
>>> at com.sun.faces.application.ApplicationImpl.<init>(ApplicationImpl.java:132)
>>> at com.sun.faces.application.ApplicationFactoryImpl.getApplication(Application
>>> FactoryImpl.java:97)
>>>
>>> I haven't observed this myself, but a customer did report it.
>>> So, just curios, if some of you saw this already...
>>> (looks like 1.2_04-b10-p01 was used)
>>>
>>> Thanks,
>>> Matthias
>>>
>>>
>>>
>> Where/when are they calling this code?
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
>> For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net
>>
>>
>>
>
>
>
>