org.springframework.osgi.service.importer.ServiceProxyDestroyedException: service proxy has been destroyed

Atlassian JIRA | Henrik Opel [Utoolity] | 2 years ago
  1. 0

    This occurs in context of Bamboo Plugins implementing Bamboo Task Plugin Modules. When a task's {{TaskConfigurator}} or {{RuntimeTaskDataProvider}} implementation uses an injected dependency object, accessing any method on that object after a plugin disable/enable cycle will trigger a ServiceProxyDestroyedException: {code} [INFO] [talledLocalContainer] 2014-07-17 16:54:57,418 ERROR [http-6990-5] [ExceptionMappingInterceptor] service proxy has been destroyed [INFO] [talledLocalContainer] org.springframework.osgi.service.importer.ServiceProxyDestroyedException: service proxy has been destroyed [INFO] [talledLocalContainer] at org.springframework.osgi.service.importer.support.internal.aop.ServiceDynamicInterceptor$ServiceLookUpCallback.doWithRetry(ServiceDynamicInterceptor.java:105) [INFO] [talledLocalContainer] at org.springframework.osgi.service.importer.support.internal.support.RetryTemplate.execute(RetryTemplate.java:83) [INFO] [talledLocalContainer] at org.springframework.osgi.service.importer.support.internal.aop.ServiceDynamicInterceptor.lookupService(ServiceDynamicInterceptor.java:430) [INFO] [talledLocalContainer] at org.springframework.osgi.service.importer.support.internal.aop.ServiceDynamicInterceptor.getTarget(ServiceDynamicInterceptor.java:415) [INFO] [talledLocalContainer] at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62) [INFO] [talledLocalContainer] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) [INFO] [talledLocalContainer] at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) [INFO] [talledLocalContainer] at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) [INFO] [talledLocalContainer] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) [INFO] [talledLocalContainer] at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56) [INFO] [talledLocalContainer] at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39) [INFO] [talledLocalContainer] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) [INFO] [talledLocalContainer] at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59) [INFO] [talledLocalContainer] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) [INFO] [talledLocalContainer] at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) [INFO] [talledLocalContainer] at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) [INFO] [talledLocalContainer] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) [INFO] [talledLocalContainer] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) [INFO] [talledLocalContainer] at com.sun.proxy.$Proxy960.getBaseUrl(Unknown Source) [INFO] [talledLocalContainer] at net.utoolity.atlassian.bamboo.task.ConfigUITaskConfigurator.populateContextForCreate(ConfigUITaskConfigurator.java:44) [INFO] [talledLocalContainer] at com.atlassian.bamboo.ww2.actions.build.admin.config.task.TaskUIConfigBean.prepareCreateHtml(TaskUIConfigBean.java:109) [INFO] [talledLocalContainer] at com.atlassian.bamboo.ww2.actions.build.admin.config.task.CreateTask.input(CreateTask.java:55) […] {code} (full stacktrace attached as [^ServiceProxyDestroyedException.stacktrace.txt]) (i) The exception is only triggered if the TaskConfigurator or RuntimeTaskDataProvider has been invoked at least once before the disable/enable cycle, hinting on them being instantiated on first use, and not getting updated when the underlying Spring/OSGi context is refreshed. Reinstalling the plugin fixes the issue (until the next disable/enable cycle). The problem exists for a single plugin already, but gets worse in a bundled plugin scenario, where updating a dependency plugin triggers a 'background' disable/enable cycle of the dependent plugin, and thus the SPDE problem. (!) Impact: In the TaskConfigurator scenario, this 'only' prevents the user from creating/configuring tasks all of a sudden, however, for the RuntimeTaskDataProvider scenario, *the impact is a failure of all builds using the affected plugin's tasks!* To ease analysis and allow testing of potential workarounds, we have created a small [reproduction demo plugin|https://bitbucket.org/utoolity/bamboo-task-spde-reproduction]. (basic reproduction instructions can be found in the project readme file).

    Atlassian JIRA | 2 years ago | Henrik Opel [Utoolity]
    org.springframework.osgi.service.importer.ServiceProxyDestroyedException: service proxy has been destroyed
  2. 0

    This occurs in context of Bamboo Plugins implementing Bamboo Task Plugin Modules. When a task's {{TaskConfigurator}} or {{RuntimeTaskDataProvider}} implementation uses an injected dependency object, accessing any method on that object after a plugin disable/enable cycle will trigger a ServiceProxyDestroyedException: {code} [INFO] [talledLocalContainer] 2014-07-17 16:54:57,418 ERROR [http-6990-5] [ExceptionMappingInterceptor] service proxy has been destroyed [INFO] [talledLocalContainer] org.springframework.osgi.service.importer.ServiceProxyDestroyedException: service proxy has been destroyed [INFO] [talledLocalContainer] at org.springframework.osgi.service.importer.support.internal.aop.ServiceDynamicInterceptor$ServiceLookUpCallback.doWithRetry(ServiceDynamicInterceptor.java:105) [INFO] [talledLocalContainer] at org.springframework.osgi.service.importer.support.internal.support.RetryTemplate.execute(RetryTemplate.java:83) [INFO] [talledLocalContainer] at org.springframework.osgi.service.importer.support.internal.aop.ServiceDynamicInterceptor.lookupService(ServiceDynamicInterceptor.java:430) [INFO] [talledLocalContainer] at org.springframework.osgi.service.importer.support.internal.aop.ServiceDynamicInterceptor.getTarget(ServiceDynamicInterceptor.java:415) [INFO] [talledLocalContainer] at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62) [INFO] [talledLocalContainer] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) [INFO] [talledLocalContainer] at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) [INFO] [talledLocalContainer] at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) [INFO] [talledLocalContainer] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) [INFO] [talledLocalContainer] at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56) [INFO] [talledLocalContainer] at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39) [INFO] [talledLocalContainer] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) [INFO] [talledLocalContainer] at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59) [INFO] [talledLocalContainer] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) [INFO] [talledLocalContainer] at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) [INFO] [talledLocalContainer] at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) [INFO] [talledLocalContainer] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) [INFO] [talledLocalContainer] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) [INFO] [talledLocalContainer] at com.sun.proxy.$Proxy960.getBaseUrl(Unknown Source) [INFO] [talledLocalContainer] at net.utoolity.atlassian.bamboo.task.ConfigUITaskConfigurator.populateContextForCreate(ConfigUITaskConfigurator.java:44) [INFO] [talledLocalContainer] at com.atlassian.bamboo.ww2.actions.build.admin.config.task.TaskUIConfigBean.prepareCreateHtml(TaskUIConfigBean.java:109) [INFO] [talledLocalContainer] at com.atlassian.bamboo.ww2.actions.build.admin.config.task.CreateTask.input(CreateTask.java:55) […] {code} (full stacktrace attached as [^ServiceProxyDestroyedException.stacktrace.txt]) (i) The exception is only triggered if the TaskConfigurator or RuntimeTaskDataProvider has been invoked at least once before the disable/enable cycle, hinting on them being instantiated on first use, and not getting updated when the underlying Spring/OSGi context is refreshed. Reinstalling the plugin fixes the issue (until the next disable/enable cycle). The problem exists for a single plugin already, but gets worse in a bundled plugin scenario, where updating a dependency plugin triggers a 'background' disable/enable cycle of the dependent plugin, and thus the SPDE problem. (!) Impact: In the TaskConfigurator scenario, this 'only' prevents the user from creating/configuring tasks all of a sudden, however, for the RuntimeTaskDataProvider scenario, *the impact is a failure of all builds using the affected plugin's tasks!* To ease analysis and allow testing of potential workarounds, we have created a small [reproduction demo plugin|https://bitbucket.org/utoolity/bamboo-task-spde-reproduction]. (basic reproduction instructions can be found in the project readme file).

    Atlassian JIRA | 2 years ago | Henrik Opel [Utoolity]
    org.springframework.osgi.service.importer.ServiceProxyDestroyedException: service proxy has been destroyed
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    stellaritysoftware / TFS Repository Plugin / issues / #33 - TFS plugin has license problems after UPM upgrading — Bitbucket

    bitbucket.org | 1 year ago
    com.atlassian.upm.license.storage.lib.PluginLicenseStoragePluginUnresolvedException: org.springframework.osgi.service.importer.ServiceProxyDestroyedException: service proxy has been destroyed

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.springframework.osgi.service.importer.ServiceProxyDestroyedException

      service proxy has been destroyed

      at org.springframework.osgi.service.importer.support.internal.aop.ServiceDynamicInterceptor$ServiceLookUpCallback.doWithRetry()
    2. Spring OSGi Core
      ServiceInvoker.invoke
      1. org.springframework.osgi.service.importer.support.internal.aop.ServiceDynamicInterceptor$ServiceLookUpCallback.doWithRetry(ServiceDynamicInterceptor.java:105)
      2. org.springframework.osgi.service.importer.support.internal.support.RetryTemplate.execute(RetryTemplate.java:83)
      3. org.springframework.osgi.service.importer.support.internal.aop.ServiceDynamicInterceptor.lookupService(ServiceDynamicInterceptor.java:430)
      4. org.springframework.osgi.service.importer.support.internal.aop.ServiceDynamicInterceptor.getTarget(ServiceDynamicInterceptor.java:415)
      5. org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)
      5 frames
    3. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      2. org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
      3. org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
      4. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      4 frames
    4. Spring OSGi Core
      ServiceTCCLInterceptor.invoke
      1. org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56)
      2. org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39)
      2 frames
    5. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      1 frame
    6. Spring OSGi Core
      LocalBundleContextAdvice.invoke
      1. org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
      1 frame
    7. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      2. org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
      3. org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
      4. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      5. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      5 frames
    8. com.sun.proxy
      $Proxy960.getBaseUrl
      1. com.sun.proxy.$Proxy960.getBaseUrl(Unknown Source)
      1 frame
    9. net.utoolity.atlassian
      ConfigUITaskConfigurator.populateContextForCreate
      1. net.utoolity.atlassian.bamboo.task.ConfigUITaskConfigurator.populateContextForCreate(ConfigUITaskConfigurator.java:44)
      1 frame
    10. com.atlassian.bamboo
      CreateTask.input
      1. com.atlassian.bamboo.ww2.actions.build.admin.config.task.TaskUIConfigBean.prepareCreateHtml(TaskUIConfigBean.java:109)
      2. com.atlassian.bamboo.ww2.actions.build.admin.config.task.CreateTask.input(CreateTask.java:55)
      2 frames