Re: Retrieve reference of JMS ConnectionFactory

2015-03-25 Thread Sobkowiak Krzysztof
Hi

I think, you do everything correct. You can test the connection factory 
successful. The way you reference the connection factory is correct too. You 
can have the problem
reported  for ARIES. I have tested simillar problem for ServiceMix yesterday 
and I have found this problem occurs only in Karaf 2.3.x. It would clarify why 
do you have this
problem using Karaf 2.3.6. In Karaf 2.4.x and 3.0.x it seems to be fixed. 
Probably it has been fixed in the newer version for Felix or Arieused in 2.4+.

This problem usually occurs while  updating the bundle. You write you have the 
problem while deploying (also no update should occur). I can remember, one of 
the Karaf
releases  from the line 2.3.x had a problem with hot deployment - it looked 
like the bundle was refreshed while deploying. Could you please test it on the 
newer versions of
2.3.x (e.g. 2.3.10)?

Regards
Krzysztof

On 25.03.2015 09:11, niels wrote:
> Hey Krzysztof,
>
> I forgot to mention versions:
> - Karaf 2.3.6
> - ActiveMQ 5.9.0
> - Camel 2.13.2
>
> I also installed the JMS bundle and was able to list the connection factory:
>
> karaf@flux>jms:connectionfactories
> JMS Connection Factory
> localhost
>
> I'm also able to list the queues from AMQ without ClassNotFoundException you
> first received.
>
> karaf@flux>jms:queues localhost
> JMS Queues
> ID_550952684d6163871467_f934b9e9-fd31-470b-a924-1a7c306f6b22
> tracing
> elasticsearch_log
> ID_550952684d6163871467_9701e4b3-37ef-4934-8882-deddb2d033fa
> invoicing
>
> The only thing I try to do in the second bundle is to capture a reference to
> the exported ConnectionFactory like I mentioned earlier:
>
>  interface="javax.jms.ConnectionFactory"/>
>
> The blueprint file are deployed by the dropping them in de deploy directory
> for hot deploys. 
>
>
>
>
>
>
> --
> View this message in context: 
> http://karaf.922171.n3.nabble.com/Retrieve-reference-of-JMS-ConnectionFactory-tp4039259p4039286.html
> Sent from the Karaf - User mailing list archive at Nabble.com.

-- 
Krzysztof Sobkowiak

JEE & OSS Architect
Senior Solution Architect @ Capgemini SSC <http://www.pl.capgemini-sdm.com/en/>
Apache ServiceMix <http://servicemix.apache.org/> Committer & PMC


Re: Retrieve reference of JMS ConnectionFactory

2015-03-25 Thread niels
Hey Krzysztof,

I forgot to mention versions:
- Karaf 2.3.6
- ActiveMQ 5.9.0
- Camel 2.13.2

I also installed the JMS bundle and was able to list the connection factory:

karaf@flux>jms:connectionfactories
JMS Connection Factory
localhost

I'm also able to list the queues from AMQ without ClassNotFoundException you
first received.

karaf@flux>jms:queues localhost
JMS Queues
ID_550952684d6163871467_f934b9e9-fd31-470b-a924-1a7c306f6b22
tracing
elasticsearch_log
ID_550952684d6163871467_9701e4b3-37ef-4934-8882-deddb2d033fa
invoicing

The only thing I try to do in the second bundle is to capture a reference to
the exported ConnectionFactory like I mentioned earlier:



The blueprint file are deployed by the dropping them in de deploy directory
for hot deploys. 






--
View this message in context: 
http://karaf.922171.n3.nabble.com/Retrieve-reference-of-JMS-ConnectionFactory-tp4039259p4039286.html
Sent from the Karaf - User mailing list archive at Nabble.com.


Re: Retrieve reference of JMS ConnectionFactory

2015-03-24 Thread Krzysztof Sobkowiak
irectoryWatcher.startAllBundles(DirectoryWatcher.java:1207)[6:org.apache.felix.fileinstall:3.4.0]
>>  at
>> org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:504)[6:org.apache.felix.fileinstall:3.4.0]
>>  at
>> org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:358)[6:org.apache.felix.fileinstall:3.4.0]
>>  at
>> org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:310)[6:org.apache.felix.fileinstall:3.4.0]
>> Caused by: java.lang.NullPointerException
>>  at
>> org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1432)[org.apache.felix.framework-4.0.3.jar:]
>>  at
>> org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:72)[org.apache.felix.framework-4.0.3.jar:]
>>  at
>> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1843)
>>  at java.lang.ClassLoader.loadClass(ClassLoader.java:410)[:1.7.0_11]
>>  at java.lang.ClassLoader.loadClass(ClassLoader.java:356)[:1.7.0_11]
>>  at java.lang.Class.forName0(Native Method)[:1.7.0_11]
>>  at java.lang.Class.forName(Class.java:264)[:1.7.0_11]
>>  at
>> org.apache.aries.proxy.impl.interfaces.ProxyClassLoader.isInvalid(ProxyClassLoader.java:109)[12:org.apache.aries.proxy.impl:1.0.2]
>>  at
>> org.apache.aries.proxy.impl.interfaces.InterfaceProxyGenerator.getProxyInstance(InterfaceProxyGenerator.java:84)[12:org.apache.aries.proxy.impl:1.0.2]
>>  at
>> org.apache.aries.proxy.impl.AsmProxyManager.createNewProxy(AsmProxyManager.java:72)[12:org.apache.aries.proxy.impl:1.0.2]
>>      at
>> org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingInterceptingProxy(AbstractProxyManager.java:75)[12:org.apache.aries.proxy.impl:1.0.2]
>>  at
>> org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingProxy(AbstractProxyManager.java:40)[12:org.apache.aries.proxy.impl:1.0.2]
>>  at
>> org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.createProxy(AbstractServiceReferenceRecipe.java:338)[7:org.apache.aries.blueprint.core:1.4.0]
>>  at
>> org.apache.aries.blueprint.container.ReferenceRecipe.internalCreate(ReferenceRecipe.java:106)[7:org.apache.aries.blueprint.core:1.4.0]/
>>
>> So apparently no service is found for the specific interface. I find this
>> strange since I have several bundles running with Camel and also using the
>> ActiveMQ queues in between. Those bundles don't complain of a
>> ConnectionFactory missing. 
>> I'm assuming I'm missing something to export the service. Is there anybody
>> who could point me in the right direction? All help is welcome.
>>
>> Cheers,
>>
>> Niels
>>
>>
>>
>>
>>
>>
>> --
>> View this message in context: 
>> http://karaf.922171.n3.nabble.com/Retrieve-reference-of-JMS-ConnectionFactory-tp4039259.html
>> Sent from the Karaf - User mailing list archive at Nabble.com.

-- 
Krzysztof Sobkowiak

JEE & OSS Architect
Senior Solution Architect @ Capgemini SSC <http://www.pl.capgemini-sdm.com/en>
Apache ServiceMix <http://servicemix.apache.org/> Committer & PMC


Re: Retrieve reference of JMS ConnectionFactory

2015-03-24 Thread Krzysztof Sobkowiak
dleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:433)[10:org.apache.aries.util:1.1.0]
>   at
> org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:725)[10:org.apache.aries.util:1.1.0]
>   at
> org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:463)[10:org.apache.aries.util:1.1.0]
>   at
> org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:422)[10:org.apache.aries.util:1.1.0]
>   at
> org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(SecureAction.java:1103)[org.apache.felix.framework-4.0.3.jar:]
>   at
> org.apache.felix.framework.util.EventDispatcher.createWhitelistFromHooks(EventDispatcher.java:695)[org.apache.felix.framework-4.0.3.jar:]
>   at
> org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:483)[org.apache.felix.framework-4.0.3.jar:]
>   at
> org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4244)[org.apache.felix.framework-4.0.3.jar:]
>   at
> org.apache.felix.framework.Felix.startBundle(Felix.java:1923)[org.apache.felix.framework-4.0.3.jar:]
>   at
> org.apache.felix.framework.BundleImpl.start(BundleImpl.java:944)[org.apache.felix.framework-4.0.3.jar:]
>   at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1245)[6:org.apache.felix.fileinstall:3.4.0]
>   at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1217)[6:org.apache.felix.fileinstall:3.4.0]
>   at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1207)[6:org.apache.felix.fileinstall:3.4.0]
>   at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:504)[6:org.apache.felix.fileinstall:3.4.0]
>   at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:358)[6:org.apache.felix.fileinstall:3.4.0]
>   at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:310)[6:org.apache.felix.fileinstall:3.4.0]
> Caused by: java.lang.NullPointerException
>   at
> org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1432)[org.apache.felix.framework-4.0.3.jar:]
>   at
> org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:72)[org.apache.felix.framework-4.0.3.jar:]
>   at
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1843)
>   at java.lang.ClassLoader.loadClass(ClassLoader.java:410)[:1.7.0_11]
>   at java.lang.ClassLoader.loadClass(ClassLoader.java:356)[:1.7.0_11]
>   at java.lang.Class.forName0(Native Method)[:1.7.0_11]
>   at java.lang.Class.forName(Class.java:264)[:1.7.0_11]
>   at
> org.apache.aries.proxy.impl.interfaces.ProxyClassLoader.isInvalid(ProxyClassLoader.java:109)[12:org.apache.aries.proxy.impl:1.0.2]
>   at
> org.apache.aries.proxy.impl.interfaces.InterfaceProxyGenerator.getProxyInstance(InterfaceProxyGenerator.java:84)[12:org.apache.aries.proxy.impl:1.0.2]
>   at
> org.apache.aries.proxy.impl.AsmProxyManager.createNewProxy(AsmProxyManager.java:72)[12:org.apache.aries.proxy.impl:1.0.2]
>   at
> org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingInterceptingProxy(AbstractProxyManager.java:75)[12:org.apache.aries.proxy.impl:1.0.2]
>   at
> org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingProxy(AbstractProxyManager.java:40)[12:org.apache.aries.proxy.impl:1.0.2]
>   at
> org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.createProxy(AbstractServiceReferenceRecipe.java:338)[7:org.apache.aries.blueprint.core:1.4.0]
>       at
> org.apache.aries.blueprint.container.ReferenceRecipe.internalCreate(ReferenceRecipe.java:106)[7:org.apache.aries.blueprint.core:1.4.0]/
>
> So apparently no service is found for the specific interface. I find this
> strange since I have several bundles running with Camel and also using the
> ActiveMQ queues in between. Those bundles don't complain of a
> ConnectionFactory missing. 
> I'm assuming I'm missing something to export the service. Is there anybody
> who could point me in the right direction? All help is welcome.
>
> Cheers,
>
> Niels
>
>
>
>
>
>
> --
> View this message in context: 
> http://karaf.922171.n3.nabble.com/Retrieve-reference-of-JMS-ConnectionFactory-tp4039259.html
> Sent from the Karaf - User mailing list archive at Nabble.com.

-- 
Krzysztof Sobkowiak

JEE & OSS Architect
Senior Solution Architect @ Capgemini SSC <http://www.pl.capgemini-sdm.com/en>
Apache ServiceMix <http://servicemix.apache.org/> Committer & PMC


Retrieve reference of JMS ConnectionFactory

2015-03-24 Thread niels
  at
org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1245)[6:org.apache.felix.fileinstall:3.4.0]
at
org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1217)[6:org.apache.felix.fileinstall:3.4.0]
at
org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1207)[6:org.apache.felix.fileinstall:3.4.0]
at
org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:504)[6:org.apache.felix.fileinstall:3.4.0]
at
org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:358)[6:org.apache.felix.fileinstall:3.4.0]
at
org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:310)[6:org.apache.felix.fileinstall:3.4.0]
Caused by: java.lang.NullPointerException
at
org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1432)[org.apache.felix.framework-4.0.3.jar:]
at
org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:72)[org.apache.felix.framework-4.0.3.jar:]
at
org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1843)
at java.lang.ClassLoader.loadClass(ClassLoader.java:410)[:1.7.0_11]
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)[:1.7.0_11]
at java.lang.Class.forName0(Native Method)[:1.7.0_11]
at java.lang.Class.forName(Class.java:264)[:1.7.0_11]
at
org.apache.aries.proxy.impl.interfaces.ProxyClassLoader.isInvalid(ProxyClassLoader.java:109)[12:org.apache.aries.proxy.impl:1.0.2]
at
org.apache.aries.proxy.impl.interfaces.InterfaceProxyGenerator.getProxyInstance(InterfaceProxyGenerator.java:84)[12:org.apache.aries.proxy.impl:1.0.2]
at
org.apache.aries.proxy.impl.AsmProxyManager.createNewProxy(AsmProxyManager.java:72)[12:org.apache.aries.proxy.impl:1.0.2]
at
org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingInterceptingProxy(AbstractProxyManager.java:75)[12:org.apache.aries.proxy.impl:1.0.2]
at
org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingProxy(AbstractProxyManager.java:40)[12:org.apache.aries.proxy.impl:1.0.2]
at
org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.createProxy(AbstractServiceReferenceRecipe.java:338)[7:org.apache.aries.blueprint.core:1.4.0]
at
org.apache.aries.blueprint.container.ReferenceRecipe.internalCreate(ReferenceRecipe.java:106)[7:org.apache.aries.blueprint.core:1.4.0]/

So apparently no service is found for the specific interface. I find this
strange since I have several bundles running with Camel and also using the
ActiveMQ queues in between. Those bundles don't complain of a
ConnectionFactory missing. 
I'm assuming I'm missing something to export the service. Is there anybody
who could point me in the right direction? All help is welcome.

Cheers,

Niels






--
View this message in context: 
http://karaf.922171.n3.nabble.com/Retrieve-reference-of-JMS-ConnectionFactory-tp4039259.html
Sent from the Karaf - User mailing list archive at Nabble.com.