Uninstalling a bundle for a JBI packaged component does not update the 
org.apache.servicemix.jbi.management.InstallationService installers
------------------------------------------------------------------------------------------------------------------------------------------

                 Key: SMX4NMR-77
                 URL: https://issues.apache.org/activemq/browse/SMX4NMR-77
             Project: ServiceMix NMR
          Issue Type: Bug
            Reporter: Guillaume Nodet
             Fix For: 1.0.0


When reinstalling through JBI ant tasks, this lead to the following exception:

{code}
javax.jbi.management.DeploymentException: Component XXXXX is already installed
         at 
org.apache.servicemix.jbi.management.InstallationService.install(InstallationService.java:305)
         at 
org.apache.servicemix.jbi.management.InstallationService.install(InstallationService.java:284)
         at 
org.apache.servicemix.jbi.management.AdminCommandsService.installComponent(AdminCommandsService.java:80)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
{code}

When uninstalling the bundle, there are also lots of stack traces in the 
console:
{code}
java.lang.IllegalStateException: Service already unregistered.
        at 
org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:108)
        at 
org.apache.servicemix.jbi.deployer.impl.Deployer.unregister(Deployer.java:222)
        at 
org.apache.servicemix.jbi.deployer.impl.AbstractBundleWatcher.onBundleStopped(AbstractBundleWatcher.java:87)
        at 
org.apache.servicemix.jbi.deployer.impl.AbstractBundleWatcher.access$100(AbstractBundleWatcher.java:34)
        at 
org.apache.servicemix.jbi.deployer.impl.AbstractBundleWatcher$1.bundleChanged(AbstractBundleWatcher.java:56)
        at 
org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:690)
        at 
org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:619)
        at 
org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:532)
        at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:3586)
        at org.apache.felix.framework.Felix._stopBundle(Felix.java:2042)
        at org.apache.felix.framework.Felix.stopBundle(Felix.java:1952)
        at org.apache.felix.framework.Felix._uninstallBundle(Felix.java:2106)
        at org.apache.felix.framework.Felix.uninstallBundle(Felix.java:2076)
        at org.apache.felix.framework.BundleImpl.uninstall(BundleImpl.java:425)
        at 
org.apache.servicemix.kernel.gshell.osgi.UninstallBundle.doExecute(UninstallBundle.java:24)
        at 
org.apache.servicemix.kernel.gshell.osgi.BundleCommand.doExecute(BundleCommand.java:75)
        at 
org.apache.servicemix.kernel.gshell.core.OsgiCommandSupport.execute(OsgiCommandSupport.java:48)
        at 
org.apache.geronimo.gshell.wisdom.command.CommandSupport.executeAction(CommandSupport.java:303)
        at 
org.apache.geronimo.gshell.wisdom.command.StatefulCommand.executeAction(StatefulCommand.java:94)
        at 
org.apache.geronimo.gshell.wisdom.command.CommandSupport.execute(CommandSupport.java:194)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at 
org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:64)
        at 
org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:78)
        at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at 
org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
        at 
org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
        at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at 
org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:57)
        at 
org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:40)
        at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at 
org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
        at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at 
org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
        at 
org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
        at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        at $Proxy15.execute(Unknown Source)
        at 
org.apache.geronimo.gshell.wisdom.shell.CommandLineExecutorImpl.doExecute(CommandLineExecutorImpl.java:127)
        at 
org.apache.geronimo.gshell.wisdom.shell.CommandLineExecutorImpl.execute(CommandLineExecutorImpl.java:106)
        at 
org.apache.geronimo.gshell.parser.visitor.ExecutingVisitor$1.run(ExecutingVisitor.java:208)
        at 
org.apache.geronimo.gshell.parser.visitor.ExecutingVisitor.executePiped(ExecutingVisitor.java:231)
        at 
org.apache.geronimo.gshell.parser.visitor.ExecutingVisitor.visit(ExecutingVisitor.java:107)
        at 
org.apache.geronimo.gshell.parser.ASTExpression.jjtAccept(ASTExpression.java:17)
        at 
org.apache.geronimo.gshell.parser.SimpleNode.childrenAccept(SimpleNode.java:61)
        at 
org.apache.geronimo.gshell.parser.visitor.ExecutingVisitor.visit(ExecutingVisitor.java:90)
        at 
org.apache.geronimo.gshell.parser.ASTCommandLine.jjtAccept(ASTCommandLine.java:17)
        at 
org.apache.geronimo.gshell.wisdom.shell.CommandLineBuilderImpl$1.execute(CommandLineBuilderImpl.java:96)
        at 
org.apache.geronimo.gshell.wisdom.shell.CommandLineExecutorImpl.execute(CommandLineExecutorImpl.java:71)
        at 
org.apache.geronimo.gshell.wisdom.shell.ShellImpl.execute(ShellImpl.java:172)
        at 
org.apache.geronimo.gshell.wisdom.shell.ShellImpl$2.execute(ShellImpl.java:208)
        at org.apache.geronimo.gshell.console.Console.work(Console.java:187)
        at org.apache.geronimo.gshell.console.Console.run(Console.java:128)
        at 
org.apache.geronimo.gshell.wisdom.shell.ShellImpl.run(ShellImpl.java:252)
        at 
org.apache.servicemix.kernel.gshell.core.ShellWrapper.run(ShellWrapper.java:81)
        at 
org.apache.servicemix.kernel.gshell.core.LocalConsole.run(LocalConsole.java:125)
        at java.lang.Thread.run(Thread.java:613)
{code}


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

Reply via email to