You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Chetan Mehrotra (JIRA)" <ji...@apache.org> on 2015/07/20 17:08:04 UTC

[jira] [Created] (SLING-4893) Service already unregistered exception in ScriptCacheImpl

Chetan Mehrotra created SLING-4893:
--------------------------------------

             Summary: Service already unregistered exception in ScriptCacheImpl
                 Key: SLING-4893
                 URL: https://issues.apache.org/jira/browse/SLING-4893
             Project: Sling
          Issue Type: Bug
          Components: Scripting
    Affects Versions: Scripting Core 2.0.28
            Reporter: Chetan Mehrotra
            Assignee: Radu Cotescu
            Priority: Minor


Seeing following error on startup with latest Launchpad from trunk

{noformat}
20.07.2015 20:29:10.310 *INFO* [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.sling.scripting.core.impl.ScriptCacheImpl)] org.apache.sling.scripting.core.impl.ScriptEngineManagerFactory Script extension 'jspf' is now handled by ScriptEngine 'Apache Sling Scripting JSP Support', version='2.1.6', class='org.apache.sling.scripting.jsp.JspScriptEngineFactory$JspScriptEngine'
20.07.2015 20:29:10.310 *INFO* [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.sling.scripting.core.impl.ScriptCacheImpl)] org.apache.sling.scripting.core.impl.ScriptEngineManagerFactory Script extension 'jspx' is now handled by ScriptEngine 'Apache Sling Scripting JSP Support', version='2.1.6', class='org.apache.sling.scripting.jsp.JspScriptEngineFactory$JspScriptEngine'
20.07.2015 20:29:10.311 *INFO* [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.sling.scripting.core.impl.ScriptCacheImpl)] org.apache.sling.scripting.core Service [361, [org.osgi.service.event.EventHandler]] ServiceEvent UNREGISTERING
20.07.2015 20:29:10.316 *ERROR* [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.sling.scripting.core.impl.ScriptCacheImpl)] org.apache.sling.scripting.core [org.apache.sling.scripting.core.impl.ScriptCacheImpl(114)] The deactivate method has thrown an exception (java.lang.IllegalStateException: Service already unregistered.)
java.lang.IllegalStateException: Service already unregistered.
	at org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:136)
	at org.apache.sling.scripting.core.impl.ScriptCacheImpl.deactivate(ScriptCacheImpl.java:269)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:231)
	at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:39)
	at org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:624)
	at org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:508)
	at org.apache.felix.scr.impl.helper.ActivateMethod.invoke(ActivateMethod.java:149)
	at org.apache.felix.scr.impl.manager.SingleComponentManager.disposeImplementationObject(SingleComponentManager.java:355)
	at org.apache.felix.scr.impl.manager.SingleComponentManager.deleteComponent(SingleComponentManager.java:170)
	at org.apache.felix.scr.impl.manager.SingleComponentManager.ungetService(SingleComponentManager.java:929)
	at org.apache.felix.scr.impl.manager.SingleComponentManager.ungetService(SingleComponentManager.java:915)
	at org.apache.felix.framework.ServiceRegistrationImpl.ungetFactoryUnchecked(ServiceRegistrationImpl.java:384)
{noformat}

Looking at {{ScriptCacheImpl}} the service reg is getting unregistered at two place. So probably at {{configureCache}} it should null the reference



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)