Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-3915

[OSGi] Redeploy bundle with shared bus cause warning

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.5
    • 2.5.1
    • Management
    • None
    • Unknown

    Description

      My bundle contains spring configuration with following declaration:
      <import resource="classpath:META-INF/cxf/cxf.xml" />
      During redeployment in OSGi container there is warning:

      11:41:42,927 | WARN | xtenderThread-12 | f.workqueue.WorkQueueManagerImpl 169 | - - | org.apache.cxf:bus.id=Shared,type=WorkQueues,name=default
      javax.management.InstanceAlreadyExistsException: org.apache.cxf:bus.id=Shared,type=WorkQueues,name=default
      at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:453)[:1.6.0_25]
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(DefaultMBeanServerInterceptor.java:1484)[:1.6.0_25]
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:963)[:1.6.0_25]
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:917)[:1.6.0_25]
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:312)[:1.6.0_25]
      at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:482)[:1.6.0_25]
      at org.apache.cxf.management.jmx.InstrumentationManagerImpl.registerMBeanWithServer(InstrumentationManagerImpl.java:303)[141:org.apache.cxf.bundle:2.5.0]
      at org.apache.cxf.management.jmx.InstrumentationManagerImpl.register(InstrumentationManagerImpl.java:296)[141:org.apache.cxf.bundle:2.5.0]
      at org.apache.cxf.management.jmx.InstrumentationManagerImpl.register(InstrumentationManagerImpl.java:209)[141:org.apache.cxf.bundle:2.5.0]
      at org.apache.cxf.management.jmx.InstrumentationManagerImpl.register(InstrumentationManagerImpl.java:221)[141:org.apache.cxf.bundle:2.5.0]
      at org.apache.cxf.management.jmx.InstrumentationManagerImpl.register(InstrumentationManagerImpl.java:214)[141:org.apache.cxf.bundle:2.5.0]
      at org.apache.cxf.workqueue.WorkQueueManagerImpl.addNamedWorkQueue(WorkQueueManagerImpl.java:167)[141:org.apache.cxf.bundle:2.5.0]
      at org.apache.cxf.bus.osgi.OSGiExtensionLocator$OSGIBusListener.initComplete(OSGiExtensionLocator.java:222)[141:org.apache.cxf.bundle:2.5.0]
      at org.apache.cxf.buslifecycle.CXFBusLifeCycleManager.initComplete(CXFBusLifeCycleManager.java:74)[141:org.apache.cxf.bundle:2.5.0]
      at org.apache.cxf.bus.CXFBusImpl.initialize(CXFBusImpl.java:169)[141:org.apache.cxf.bundle:2.5.0]
      at org.apache.cxf.bus.spring.SpringBus.onApplicationEvent(SpringBus.java:92)[141:org.apache.cxf.bundle:2.5.0]
      at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)[99:org.springframework.context:3.0.6.RELEASE]
      at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)[99:org.springframework.context:3.0.6.RELEASE]
      at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:911)[99:org.springframework.context:3.0.6.RELEASE]
      at org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.finishRefresh(AbstractOsgiBundleApplicationContext.java:235)[103:org.springframework.osgi.core:1.2.1]
      at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:358)[103:org.springframework.osgi.core:1.2.1]
      at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)[103:org.springframework.osgi.core:1.2.1]
      at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)[103:org.springframework.osgi.core:1.2.1]
      at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)[104:org.springframework.osgi.extender:1.2.1]
      at java.lang.Thread.run(Thread.java:662)[:1.6.0_25]

      Can shared object registered once to avoid this exception?

      Attachments

        Activity

          People

            dkulp Daniel Kulp
            amarkevich Alexey Markevich
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: