[
https://issues.apache.org/jira/browse/KARAF-3895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14653956#comment-14653956
]
Jon Fields commented on KARAF-3895:
-----------------------------------
Yes it is version specific. I had followed the steps in
http://karaf.apache.org/manual/latest/users-guide/jms.html to configure a
broker running in Karaf 4.0.0, and did not specify a version. This results in
version 5.12-SNAPSHOT being used:
{code}
karaf@root()> feature:repo-add activemq
Adding feature url mvn:org.apache.activemq/activemq-karaf/LATEST/xml/features
karaf@root()> feature:repo-list | grep activemq
activemq-core-5.12-SNAPSHOT |
mvn:org.apache.activemq/activemq-karaf/5.12-SNAPSHOT/xml/features-core
activemq-5.12-SNAPSHOT |
mvn:org.apache.activemq/activemq-karaf/LATEST/xml/features
{code}
I tried 5.11.1, which is the most stable ActiveMQ release, but was then not
able to install the activemq-broker feature:
{code}
karaf@root()> feature:install activemq-broker
Error executing command: Unable to resolve root: missing requirement [root]
osgi.identity; osgi.identity=activemq-web-console; type=karaf.feature;
version=5.11.1 [caused by: Unable to resolve activemq-web-console/5.11.1:
missing requirement [activemq-web-console/5.11.1] osgi.identity;
osgi.identity=org.apache.activemq.activemq-web-console; type=osgi.bundle;
version="[5.11.1,5.11.1]"; resolution:=mandatory [caused by: Unable to resolve
org.apache.activemq.activemq-web-console/5.11.1: missing requirement
[org.apache.activemq.activemq-web-console/5.11.1] osgi.wiring.package;
filter:="(&(osgi.wiring.package=javax.servlet.resources)(version>=2.5.0)(!(version>=4.0.0)))"]]
{code}
I then tried the activemq-broker-noweb feature instead, which worked, and I was
able to create a connection factory, send and consume a message to the embedded
broker.
I will need to resolve the web console issue as I would like to be able to use
the ActiveMQ web console, but that is a separate issue.
Thanks for your help.
> jms:create command fails to create connection factory for activemq
> ------------------------------------------------------------------
>
> Key: KARAF-3895
> URL: https://issues.apache.org/jira/browse/KARAF-3895
> Project: Karaf
> Issue Type: Bug
> Affects Versions: 4.0.0
> Environment: RHEL7; Oracle JDK 1.8.0_31
> Reporter: Jon Fields
> Assignee: Jean-Baptiste Onofré
>
> Start with a fresh apache-karaf-4.0.0:
> Follow the instructions found here:
> http://karaf.apache.org/manual/latest/users-guide/jms.html to create a
> connection factory for activemq named "test".
> After the jms:create command, the deploy/connectionfactory-test.xml file has
> been created. However, the jms:connectionfactories command does not list
> anything, and any of the other jms:* commands fail with "no JMS connection
> factory found for test".
> In the log, I find a class not found exception, that has apparently prevented
> the connection factory from being deployed:
> 2015-07-29 14:01:31,450 | INFO | raf-4.0.0/deploy | fileinstall
> | 4 - org.apache.felix.fileinstall - 3.5.0 | Installing bundle
> connectionfactory-test.xml / 0.0.0
> 2015-07-29 14:01:31,530 | WARN | raf-4.0.0/deploy | BeanRecipe
> | 12 - org.apache.aries.blueprint.core - 1.4.3 | Object to be
> destroyed is not an instance of UnwrapperedBeanHolder, type: null
> 2015-07-29 14:01:31,530 | ERROR | raf-4.0.0/deploy | BlueprintContainerImpl
> | 12 - org.apache.aries.blueprint.core - 1.4.3 | Unable to start
> blueprint container for bundle connectionfactory-test.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)[12:org.apache.aries.blueprint.core:1.4.3]
> at
> org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:907)[12:org.apache.aries.blueprint.core:1.4.3]
> at
> org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:888)[12:org.apache.aries.blueprint.core:1.4.3]
> at
> org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:820)[12:org.apache.aries.blueprint.core:1.4.3]
> at
> org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[12:org.apache.aries.blueprint.core:1.4.3]
> at
> org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[12:org.apache.aries.blueprint.core:1.4.3]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_31]
> at
> org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[12:org.apache.aries.blueprint.core:1.4.3]
> at
> org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:245)[12:org.apache.aries.blueprint.core:1.4.3]
> at
> org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:183)[12:org.apache.aries.blueprint.core:1.4.3]
> at
> org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:682)[12:org.apache.aries.blueprint.core:1.4.3]
> at
> org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:377)[12:org.apache.aries.blueprint.core:1.4.3]
> at
> org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:269)[12:org.apache.aries.blueprint.core:1.4.3]
> at
> org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:294)[12:org.apache.aries.blueprint.core:1.4.3]
> at
> org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:263)[12:org.apache.aries.blueprint.core:1.4.3]
> at
> org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:253)[12:org.apache.aries.blueprint.core:1.4.3]
> at
> org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:500)[21:org.apache.aries.util:1.1.0]
> at
> org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:433)[21:org.apache.aries.util:1.1.0]
> at
> org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:725)[21:org.apache.aries.util:1.1.0]
> at
> org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:463)[21:org.apache.aries.util:1.1.0]
> at
> org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:422)[21:org.apache.aries.util:1.1.0]
> at
> org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(SecureAction.java:1179)[org.apache.felix.framework-5.0.1.jar:]
> at
> org.apache.felix.framework.util.EventDispatcher.createWhitelistFromHooks(EventDispatcher.java:730)[org.apache.felix.framework-5.0.1.jar:]
> at
> org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:485)[org.apache.felix.framework-5.0.1.jar:]
> at
> org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4544)[org.apache.felix.framework-5.0.1.jar:]
> at
> org.apache.felix.framework.Felix.startBundle(Felix.java:2166)[org.apache.felix.framework-5.0.1.jar:]
> at
> org.apache.felix.framework.BundleImpl.start(BundleImpl.java:977)[org.apache.felix.framework-5.0.1.jar:]
> at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1245)[4:org.apache.felix.fileinstall:3.5.0]
> at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1217)[4:org.apache.felix.fileinstall:3.5.0]
> at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:509)[4:org.apache.felix.fileinstall:3.5.0]
> at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:358)[4:org.apache.felix.fileinstall:3.5.0]
> at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:310)[4:org.apache.felix.fileinstall:3.5.0]
> 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.8.0_31]
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_31]
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_31]
> at java.lang.reflect.Method.invoke(Method.java:483)[:1.8.0_31]
> at
> org.apache.aries.blueprint.utils.ReflectionUtils$MethodPropertyDescriptor.internalSet(ReflectionUtils.java:628)[12:org.apache.aries.blueprint.core:1.4.3]
> at
> org.apache.aries.blueprint.utils.ReflectionUtils$PropertyDescriptor.set(ReflectionUtils.java:378)[12:org.apache.aries.blueprint.core:1.4.3]
> at
> org.apache.aries.blueprint.container.BeanRecipe.setProperty(BeanRecipe.java:939)[12:org.apache.aries.blueprint.core:1.4.3]
> ... 31 more
> Caused by: java.lang.ClassNotFoundException:
> org.apache.commons.pool2.impl.DefaultEvictionPolicy
> at java.net.URLClassLoader$1.run(URLClassLoader.java:372)[:1.8.0_31]
> at java.net.URLClassLoader$1.run(URLClassLoader.java:361)[:1.8.0_31]
> at java.security.AccessController.doPrivileged(Native Method)[:1.8.0_31]
> at java.net.URLClassLoader.findClass(URLClassLoader.java:360)[:1.8.0_31]
> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)[:1.8.0_31]
> at
> sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)[:1.8.0_31]
> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)[:1.8.0_31]
> at java.lang.Class.forName0(Native Method)[:1.8.0_31]
> at java.lang.Class.forName(Class.java:344)[:1.8.0_31]
> at
> org.apache.commons.pool2.impl.BaseGenericObjectPool.setEvictionPolicyClassName(BaseGenericObjectPool.java:598)
> ... 44 more
> 2015-07-29 14:01:31,538 | INFO | raf-4.0.0/deploy | fileinstall
> | 4 - org.apache.felix.fileinstall - 3.5.0 | Started bundle:
> blueprint:file:/home/jon/apache-karaf-4.0.0/deploy/connectionfactory-test.xml
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)