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 2010/06/04 09:24:54 UTC

[jira] Created: (SLING-1544) ScripteEngineManagerFactory.refreshScriptEngineManager may throw exceptions

ScripteEngineManagerFactory.refreshScriptEngineManager may throw exceptions
---------------------------------------------------------------------------

                 Key: SLING-1544
                 URL: https://issues.apache.org/jira/browse/SLING-1544
             Project: Sling
          Issue Type: Bug
          Components: Scripting
    Affects Versions: Scripting Core 2.0.12
            Reporter: Felix Meschberger
            Assignee: Felix Meschberger
             Fix For: Scripting Core 2.0.12


The ScripteEngineManagerFactory.refreshScriptEngineManager method throw the following exceptions on startup of shutdown:

NullPointerException
while trying to register the ScriptEngineManager service because the BundleContext field is null

IllegalStateException
while trying to unregister the ScriptEngineManager service because a previous unregistration succeeded but re-registration failed due to the NullPointerException due to bundle context being null. As a result the the ServiceRegistration field is still set  but invalid actually.

Fixes:
  * Ensure registration is only tried if bundle context is not null
  * Clear the service registration field after unregistering the service

Plus, the refreshScriptEngineManager method must make sure to be thread-safe.

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


[jira] Closed: (SLING-1544) ScripteEngineManagerFactory.refreshScriptEngineManager may throw exceptions

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-1544?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler closed SLING-1544.
-----------------------------------


> ScripteEngineManagerFactory.refreshScriptEngineManager may throw exceptions
> ---------------------------------------------------------------------------
>
>                 Key: SLING-1544
>                 URL: https://issues.apache.org/jira/browse/SLING-1544
>             Project: Sling
>          Issue Type: Bug
>          Components: Scripting
>    Affects Versions: Scripting Core 2.0.14
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: Scripting Core 2.0.14
>
>
> The ScripteEngineManagerFactory.refreshScriptEngineManager method throw the following exceptions on startup of shutdown:
> NullPointerException
> while trying to register the ScriptEngineManager service because the BundleContext field is null
> IllegalStateException
> while trying to unregister the ScriptEngineManager service because a previous unregistration succeeded but re-registration failed due to the NullPointerException due to bundle context being null. As a result the the ServiceRegistration field is still set  but invalid actually.
> Fixes:
>   * Ensure registration is only tried if bundle context is not null
>   * Clear the service registration field after unregistering the service
> Plus, the refreshScriptEngineManager method must make sure to be thread-safe.

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


[jira] Resolved: (SLING-1544) ScripteEngineManagerFactory.refreshScriptEngineManager may throw exceptions

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-1544?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger resolved SLING-1544.
--------------------------------------

    Resolution: Fixed

Implemented precaution against IllegalStateException and NullPointerException being thrown from the refreshScriptEngineManager method in Rev. 951311.

Deferring the thread-saftey issue to SLING-1545 because there are further thread-safety issues in the ScriptEngineManagerFactory class, e.g. when accessing internal collections.

> ScripteEngineManagerFactory.refreshScriptEngineManager may throw exceptions
> ---------------------------------------------------------------------------
>
>                 Key: SLING-1544
>                 URL: https://issues.apache.org/jira/browse/SLING-1544
>             Project: Sling
>          Issue Type: Bug
>          Components: Scripting
>    Affects Versions: Scripting Core 2.0.12
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: Scripting Core 2.0.12
>
>
> The ScripteEngineManagerFactory.refreshScriptEngineManager method throw the following exceptions on startup of shutdown:
> NullPointerException
> while trying to register the ScriptEngineManager service because the BundleContext field is null
> IllegalStateException
> while trying to unregister the ScriptEngineManager service because a previous unregistration succeeded but re-registration failed due to the NullPointerException due to bundle context being null. As a result the the ServiceRegistration field is still set  but invalid actually.
> Fixes:
>   * Ensure registration is only tried if bundle context is not null
>   * Clear the service registration field after unregistering the service
> Plus, the refreshScriptEngineManager method must make sure to be thread-safe.

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