Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-4893

Service already unregistered exception in ScriptCacheImpl

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: Scripting Core 2.0.30
    • Fix Version/s: Scripting Core 2.0.32
    • Component/s: Scripting
    • Labels:
      None

      Description

      Seeing following error on startup with latest Launchpad from trunk

      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)
      

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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                radu Radu Cotescu
                Reporter:
                chetanm Chetan Mehrotra
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: