You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2007/10/05 15:38:50 UTC

[jira] Assigned: (SLING-42) Potential NullPointerException when initializing Components

     [ https://issues.apache.org/jira/browse/SLING-42?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger reassigned SLING-42:
--------------------------------------

    Assignee: Felix Meschberger

> Potential NullPointerException when initializing Components
> -----------------------------------------------------------
>
>                 Key: SLING-42
>                 URL: https://issues.apache.org/jira/browse/SLING-42
>             Project: Sling
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.0
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: 2.0.0
>
>
> When a Component is registered with the system, the ComponentResolverFilter gets them and if active calls the Component.init method. This may happen at a time, that the ComponentRequestHandlerImpl is not registered yet with the HttpService and thus the ServletContext is still null. If now the Component init method tries to access the ServletContext of the provided ComponentContext, a NullPointerException is thrown.
> This whole registration mechanism must be modified such as to only call the init methods when the ComponentRequestHandlerImpl is registered with the HttpService and has itself been provided with the ServletConfig and ServletContext of the servlet container.
> This exception may be seen if the Sling sampl bundle is started before the Sling core bundle.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.