Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-5861

Unable to create connection factory using jms:create

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.12.0, 5.13.0
    • 5.12.1, 5.13.0
    • OSGi/Karaf
    • None
    • ActiveMQ 5.12-SNAPSHOT, Karaf 4.0.0, Karaf 3.0.3

    Description

      I have installed successfully ActiveMQ on Karaf and tried to create a connection factory using jms:create

      karaf@root()> feature:repo-add activemq 
      Adding feature url mvn:org.apache.activemq/activemq-karaf/LATEST/xml/features
      karaf@root()> feature:install activemq-broker-noweb activemq-blueprint jms 
      Refreshing bundles org.apache.activemq.activemq-osgi (105)
      karaf@root()> jms:create -t ActiveMQ --username karaf --password karaf --url tcp://localhost:61616 test1
      

      The last operation fails with following error

      2015-06-24 22:16:10,932 | ERROR | raf-3.0.3/deploy | BlueprintContainerImpl           | 15 - org.apache.aries.blueprint.core - 1.4.2 | Unable to start blueprint container for bundle connectionfactory-test1.xml
      org.osgi.service.blueprint.container.ComponentDefinitionException: Error setting property: PropertyDescriptor <name: maxConnections, getter: class org.apache.activemq.jms.pool.PooledConnectionFactory.getMaxConnections(), setter: [class org.apache.activemq.jms.pool.PooledConnectionFactory.setMaxConnections(int)]
      	at org.apache.aries.blueprint.container.BeanRecipe.setProperty(BeanRecipe.java:941)[15:org.apache.aries.blueprint.core:1.4.2]
      	at org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:907)[15:org.apache.aries.blueprint.core:1.4.2]
      	at org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:888)[15:org.apache.aries.blueprint.core:1.4.2]
      	at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:820)[15:org.apache.aries.blueprint.core:1.4.2]
      	at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[15:org.apache.aries.blueprint.core:1.4.2]
      	at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[15:org.apache.aries.blueprint.core:1.4.2]
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_80]
      	at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[15:org.apache.aries.blueprint.core:1.4.2]
      	at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:245)[15:org.apache.aries.blueprint.core:1.4.2]
      	at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:183)[15:org.apache.aries.blueprint.core:1.4.2]
      	at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:682)[15:org.apache.aries.blueprint.core:1.4.2]
      	at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:377)[15:org.apache.aries.blueprint.core:1.4.2]
      	at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:269)[15:org.apache.aries.blueprint.core:1.4.2]
      	at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:294)[15:org.apache.aries.blueprint.core:1.4.2]
      	at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:263)[15:org.apache.aries.blueprint.core:1.4.2]
      	at org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:253)[15:org.apache.aries.blueprint.core:1.4.2]
      	at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:500)[9:org.apache.aries.util:1.1.0]
      	at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:433)[9:org.apache.aries.util:1.1.0]
      	at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:725)[9:org.apache.aries.util:1.1.0]
      	at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:463)[9:org.apache.aries.util:1.1.0]
      	at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:422)[9:org.apache.aries.util:1.1.0]
      	at org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(SecureAction.java:1103)[org.apache.felix.framework-4.2.1.jar:]
      	at org.apache.felix.framework.util.EventDispatcher.createWhitelistFromHooks(EventDispatcher.java:695)[org.apache.felix.framework-4.2.1.jar:]
      	at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:483)[org.apache.felix.framework-4.2.1.jar:]
      	at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4403)[org.apache.felix.framework-4.2.1.jar:]
      	at org.apache.felix.framework.Felix.startBundle(Felix.java:2092)[org.apache.felix.framework-4.2.1.jar:]
      	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:955)[org.apache.felix.framework-4.2.1.jar:]
      	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1245)[7:org.apache.felix.fileinstall:3.4.2]
      	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1217)[7:org.apache.felix.fileinstall:3.4.2]
      	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:509)[7:org.apache.felix.fileinstall:3.4.2]
      	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:358)[7:org.apache.felix.fileinstall:3.4.2]
      	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:310)[7:org.apache.felix.fileinstall:3.4.2]
      Caused by: java.lang.IllegalArgumentException: Unable to create EvictionPolicy instance of type org.apache.commons.pool2.impl.DefaultEvictionPolicy
      	at org.apache.commons.pool2.impl.BaseGenericObjectPool.setEvictionPolicyClassName(BaseGenericObjectPool.java:607)
      	at org.apache.commons.pool2.impl.GenericKeyedObjectPool.setConfig(GenericKeyedObjectPool.java:257)
      	at org.apache.commons.pool2.impl.GenericKeyedObjectPool.<init>(GenericKeyedObjectPool.java:111)
      	at org.apache.commons.pool2.impl.GenericKeyedObjectPool.<init>(GenericKeyedObjectPool.java:86)
      	at org.apache.activemq.jms.pool.PooledConnectionFactory.initConnectionsPool(PooledConnectionFactory.java:89)
      	at org.apache.activemq.jms.pool.PooledConnectionFactory.getConnectionsPool(PooledConnectionFactory.java:496)
      	at org.apache.activemq.jms.pool.PooledConnectionFactory.setMaxConnections(PooledConnectionFactory.java:396)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_80]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_80]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_80]
      	at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_80]
      	at org.apache.aries.blueprint.utils.ReflectionUtils$MethodPropertyDescriptor.internalSet(ReflectionUtils.java:628)[15:org.apache.aries.blueprint.core:1.4.2]
      	at org.apache.aries.blueprint.utils.ReflectionUtils$PropertyDescriptor.set(ReflectionUtils.java:378)[15:org.apache.aries.blueprint.core:1.4.2]
      	at org.apache.aries.blueprint.container.BeanRecipe.setProperty(BeanRecipe.java:939)[15:org.apache.aries.blueprint.core:1.4.2]
      	... 31 more
      Caused by: java.lang.ClassNotFoundException: org.apache.commons.pool2.impl.DefaultEvictionPolicy
      	at java.net.URLClassLoader$1.run(URLClassLoader.java:366)[:1.7.0_80]
      	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)[:1.7.0_80]
      	at java.security.AccessController.doPrivileged(Native Method)[:1.7.0_80]
      	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)[:1.7.0_80]
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:425)[:1.7.0_80]
      	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)[:1.7.0_80]
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)[:1.7.0_80]
      	at java.lang.Class.forName0(Native Method)[:1.7.0_80]
      	at java.lang.Class.forName(Class.java:278)[:1.7.0_80]
      	at org.apache.commons.pool2.impl.BaseGenericObjectPool.setEvictionPolicyClassName(BaseGenericObjectPool.java:598)
      	... 44 more
      

      ActiveMQ 5.11.1 works with no problem

      Attachments

        Issue Links

          Activity

            People

              jbonofre Jean-Baptiste Onofré
              sobkowiak Krzysztof Sobkowiak
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: