activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Krzysztof Sobkowiak <krzys.sobkow...@gmail.com>
Subject Re: OSGi ClassNotFoundException when trying to upgrade from 5.11.1 to 5.12.0
Date Wed, 26 Aug 2015 11:11:43 GMT
Hi

The problem is caused by the new commons-pool2 2.3.0. The solution is upgrade to commons-pool2
2.4.2. I have described it and provided a patch in this issue https://issues.apache.org/jira/browse/AMQ-5861.
The patch should be applied to 2.12.x and 2.13.x.

Could one take a look at this issue?

Regards
Krzysztof

On 24.08.2015 15:48, lichtin wrote:
> It seems a newer commons-pool2 (introduced with AMQ-5721) will fix this.
>
>
> Martin Lichtin wrote
>> Has anyone tried upgrading to 5.12.0 under OSGi (e.g. Karaf) already?
>> It fails for me with
>>
>> org.osgi.service.blueprint.container.ComponentDefinitionException: Error
>> setting property: PropertyDescriptor &lt;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:266)[:1.8.0_45]
>>      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)
>>      at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:942)
>>      at
>> org.apache.karaf.features.internal.FeaturesServiceImpl.startBundle(FeaturesServiceImpl.java:501)
>>      at
>> org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:459)
>>      at
>> org.apache.karaf.features.internal.BootFeaturesInstaller.installBootFeatures(BootFeaturesInstaller.java:92)
>>      at
>> org.apache.karaf.features.internal.BootFeaturesInstaller.start(BootFeaturesInstaller.java:76)
>>      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>> Method)[:1.8.0_45]
>>      at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_45]
>>      at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_45]
>>      at java.lang.reflect.Method.invoke(Method.java:497)[:1.8.0_45]
>>      at
>> org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:297)[15:org.apache.aries.blueprint.core:1.4.2]
>>      at
>> org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:958)[15:org.apache.aries.blueprint.core:1.4.2]
>>      at
>> org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:712)[15:org.apache.aries.blueprint.core:1.4.2]
>>      at
>> org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:824)[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:266)[:1.8.0_45]
>>      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.Felix.setActiveStartLevel(Felix.java:1291)[org.apache.felix.framework-4.2.1.jar:]
>>      at
>> org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304)[org.apache.felix.framework-4.2.1.jar:]
>>      at java.lang.Thread.run(Thread.java:745)[:1.8.0_45]
>> 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.&lt;init&gt;(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_45]
>>      at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_45]
>>      at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_45]
>>      at java.lang.reflect.Method.invoke(Method.java:497)[:1.8.0_45]
>>      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]
>>      ... 64 more
>> Caused by: java.lang.ClassNotFoundException:
>> org.apache.commons.pool2.impl.DefaultEvictionPolicy
>>      at
>> java.net.URLClassLoader.findClass(URLClassLoader.java:381)[:1.8.0_45]
>>      at java.lang.ClassLoader.loadClass(ClassLoader.java:424)[:1.8.0_45]
>>      at
>> sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)[:1.8.0_45]
>>      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)[:1.8.0_45]
>>      at java.lang.Class.forName0(Native Method)[:1.8.0_45]
>>      at java.lang.Class.forName(Class.java:348)[:1.8.0_45]
>>      at
>> org.apache.commons.pool2.impl.BaseGenericObjectPool.setEvictionPolicyClassName(BaseGenericObjectPool.java:598)
>>      ... 77 more
>>
>> It worked fine with 5.11.1.
>>
>> - Martin
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/OSGi-ClassNotFoundException-when-trying-to-upgrade-from-5-11-1-to-5-12-0-tp4701124p4701321.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.

-- 
Krzysztof Sobkowiak (@ksobkowiak)

JEE & OSS Architect, Integration Architect
Apache Software Foundation <http://apache.org/> Member
V.P. Apache ServiceMix | Apache ServiceMix <http://servicemix.apache.org/> Committer
& PMC Member
Senior Solution Architect @ Capgemini SSC <http://www.capgeminisoftware.pl/>

Mime
View raw message