You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Aleksey Masny <pr...@gmail.com> on 2010/02/11 11:55:24 UTC

camel-xmpp not sends message in Felix Karaf

Through camel-xmpp my message sended succesfully in standalone camel
application, but message not sends if application as a bundle deployed to
Felix Karaf. May be it is a bug in camel-xmpp component?

Apache Felix Karaf 1.2.0
Apache Camel 2.1.0

My route:
from("timer://foo?fixedRate=true&period=10000&delay=10000").setBody(constant("Hello,
i am message")).
  to("xmpp://" + XMPP_FROM_NAME + "/masny@websphere" + "?password=" +
XMPP_FROM_PASS);

camel:run command runs this route and succesfully sends message.

Then i create a bundle and deploy it to Felix Karaf. On Felix installed all
requirement bundles (camel-osgi, camel-xmpp, etc). But on Felix my route not
sends message, in DEBUG log i see:

 DEBUG | xtenderThread-42 | DefaultCamelContext              |
e.camel.impl.DefaultCamelContext  994 | ... Routes started
 INFO  | xtenderThread-42 | DefaultCamelContext              |
e.camel.impl.DefaultCamelContext  997 | Apache Camel 2.1.0
(CamelContext:camelContext) started
 INFO  | xtenderThread-42 | OsgiBundleXmlApplicationContext  |
ractOsgiBundleApplicationContext  327 | Publishing application context as
OSGi service with properties
{org.springframework.context.service.name=try-xmpp,
Bundle-SymbolicName=try-xmpp, Bundle-Version=0.1.0}
 DEBUG | xtenderThread-42 | OsgiBundleXmlApplicationContext  |
ractOsgiBundleApplicationContext  341 | Publishing service under classes
{org.springframework.osgi.context.DelegatedExecutionOsgiBundleApplicationContext,
org.springframework.osgi.context.ConfigurableOsgiBundleApplicationContext,
org.springframework.context.ConfigurableApplicationContext,
org.springframework.context.ApplicationContext,
org.springframework.context.Lifecycle,
org.springframework.beans.factory.ListableBeanFactory,
org.springframework.beans.factory.HierarchicalBeanFactory,
org.springframework.context.MessageSource,
org.springframework.context.ApplicationEventPublisher,
org.springframework.core.io.support.ResourcePatternResolver,
org.springframework.beans.factory.BeanFactory,
org.springframework.core.io.ResourceLoader,
org.springframework.beans.factory.DisposableBean}
 DEBUG | xtenderThread-42 | try-xmpp                         | ?                                  
? | ServiceEvent REGISTERED
 DEBUG | xtenderThread-42 | BlueprintListener                |
actory$SpringApplicationListener  140 | Spring app state changed to Started
for bundle 93
 DEBUG | xtenderThread-42 | BlueprintListener                |
actory$SpringApplicationListener  140 | Spring app state changed to Started
for bundle 93
 INFO  | xtenderThread-42 | ContextLoaderListener            |
BundleApplicationContextListener   45 | Application context successfully
refreshed (OsgiBundleXmlApplicationContext(bundle=try-xmpp,
config=osgibundle:/META-INF/spring/*.xml))
 INFO  | foo              | Tracer                           |
rg.apache.camel.processor.Logger   88 | 8f812d3e-15cc-4ca3-b6c0-4077beef75bc
>>> (route30) from(timer://foo?delay=10000&fixedRate=true&period=10000) -->
setBody[Hello, i am message] <<< Pattern:InOnly, Headers:{firedTime=Thu Feb
11 12:18:13 EET 2010}, BodyType:null, Body:null
 INFO  | foo              | Tracer                           |
rg.apache.camel.processor.Logger   88 | 8f812d3e-15cc-4ca3-b6c0-4077beef75bc
>>> (route30) setBody[Hello, i am message] -->
xmpp://wsbise@websphere/masny@websphere?password=123456789 <<<
Pattern:InOnly, Headers:{firedTime=Thu Feb 11 12:18:13 EET 2010},
BodyType:String, Body:Hello, i am message
 DEBUG | foo              | XmppPrivateChatProducer          |
ent.xmpp.XmppPrivateChatProducer   46 | Creating XmppPrivateChatProducer to
participant masny@websphere
 DEBUG | foo              | CachedIntrospectionResults       |
beans.CachedIntrospectionResults  151 | Not strongly caching class
[org.apache.camel.management.mbean.ManagedProducer] because it is not
cache-safe
 DEBUG | foo              | DefaultManagementAgent           |
anagement.DefaultManagementAgent  304 | Registered MBean with objectname:
org.apache.camel:context=masny/camelContext,type=producers,name=XmppPrivateChatProducer(0x11c0dc6)
 DEBUG | foo              | XmppPrivateChatProducer          |
pache.camel.impl.DefaultProducer   66 | Starting producer:
Producer[xmpp://wsbise@websphere/masny@websphere?password=123456789]
 DEBUG | foo              | ProducerCache                    |
.apache.camel.impl.ProducerCache  211 | Adding to producer cache with key:
Endpoint[xmpp://wsbise@websphere/masny@websphere?password=123456789] for
producer:
Producer[xmpp://wsbise@websphere/masny@websphere?password=123456789]
 DEBUG | foo              | DefaultErrorHandler              |
rg.apache.camel.processor.Logger  197 | Failed delivery for exchangeId:
8f812d3e-15cc-4ca3-b6c0-4077beef75bc. On delivery attempt: 0 caught:
java.lang.NullPointerException
 DEBUG | foo              | DefaultErrorHandler              |
processor.RedeliveryErrorHandler  411 | This exchange is not handled so its
marked as failed: Exchange[Message: Hello, i am message]
 DEBUG | foo              | Pipeline                         |
.apache.camel.processor.Pipeline   99 | Message exchange has failed so
breaking out of pipeline: Exchange[Message: Hello, i am message] Exception:
java.lang.NullPointerException
 ERROR | foo              | TimerConsumer                    |
rg.apache.camel.processor.Logger  248 | 
java.lang.NullPointerException
	at
org.jivesoftware.smackx.muc.MultiUserChat$1.connectionCreated(MultiUserChat.java:84)
	at
org.jivesoftware.smack.XMPPConnection.initConnection(XMPPConnection.java:887)
	at
org.jivesoftware.smack.XMPPConnection.connectUsingConfiguration(XMPPConnection.java:834)
	at org.jivesoftware.smack.XMPPConnection.connect(XMPPConnection.java:1276)
	at
org.apache.camel.component.xmpp.XmppEndpoint.createConnection(XmppEndpoint.java:140)
	at
org.apache.camel.component.xmpp.XmppPrivateChatProducer.process(XmppPrivateChatProducer.java:52)
	at
org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:97)
	at
org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:95)
	at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:146)
	at
org.apache.camel.processor.SendProcessor.doProcess(SendProcessor.java:94)
	at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:82)
	at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
	at
org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:53)
	at
org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:82)
	at
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:162)
	at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
	at
org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:223)
	at
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:153)
	at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:91)
	at
org.apache.camel.processor.DefaultErrorHandler.process(DefaultErrorHandler.java:49)
	at
org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:206)
	at org.apache.camel.processor.Pipeline.process(Pipeline.java:74)
	at
org.apache.camel.processor.UnitOfWorkProcessor.processNext(UnitOfWorkProcessor.java:54)
	at
org.apache.camel.processor.DelegateProcessor.process(DelegateProcessor.java:48)
	at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
	at
org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:103)
	at
org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:50)
	at java.util.TimerThread.mainLoop(Timer.java:512)
	at java.util.TimerThread.run(Timer.java:462)

MANIFEST.MF
Manifest-Version: 1.0
Bundle-Name: try-xmpp [mti]
Built-By: masny
Build-Jdk: 1.5.0_17
Created-By: Apache Maven Bundle Plugin
Import-Package: mti.try_xmpp,org.apache.camel;version="2.1",org.apache
 .camel.builder;version="2.1",org.apache.camel.component;version="2.1"
 ,org.apache.camel.component.stream;version="2.1",org.apache.camel.com
 ponent.xmpp;version="2.1",org.apache.camel.model;version="2.1",org.ap
 ache.camel.spring;version="2.1",org.apache.commons.logging
Bundle-ManifestVersion: 2
Bundle-SymbolicName: try-xmpp
Tool: Bnd-0.0.255
Bnd-LastModified: 1265883469593
Export-Package: mti.try_xmpp;uses:="org.apache.camel.model,org.apache.
 camel.builder,org.apache.camel,org.apache.camel.spring"
Bundle-Version: 0.1


My small project attached.
http://old.nabble.com/file/p27544316/try-xmpp-project.jar
try-xmpp-project.jar 


Thanks a lot for any answer!
-- 
View this message in context: http://old.nabble.com/camel-xmpp-not-sends-message-in-Felix-Karaf-tp27544316p27544316.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel-xmpp not sends message in Felix Karaf

Posted by Ashwin Karpe <as...@progress.com>.
Hi,

This looks very suspiciously like a bug. Can you please create a Jira entry
for this at
https://issues.apache.org/activemq/secure/Dashboard.jspa
https://issues.apache.org/activemq/secure/Dashboard.jspa 

Cheers,

Ashwin...



Aleksey Masny wrote:
> 
> Through camel-xmpp my message sended succesfully in standalone camel
> application, but message not sends if application as a bundle deployed to
> Felix Karaf. May be it is a bug in camel-xmpp component?
> 
> Apache Felix Karaf 1.2.0
> Apache Camel 2.1.0
> 
> My route:
> from("timer://foo?fixedRate=true&period=10000&delay=10000").setBody(constant("Hello,
> i am message")).
>   to("xmpp://" + XMPP_FROM_NAME + "/masny@websphere" + "?password=" +
> XMPP_FROM_PASS);
> 
> camel:run command runs this route and succesfully sends message.
> 
> Then i create a bundle and deploy it to Felix Karaf. On Felix installed
> all requirement bundles (camel-osgi, camel-xmpp, etc). But on Felix my
> route not sends message, in DEBUG log i see:
> 
>  DEBUG | xtenderThread-42 | DefaultCamelContext              |
> e.camel.impl.DefaultCamelContext  994 | ... Routes started
>  INFO  | xtenderThread-42 | DefaultCamelContext              |
> e.camel.impl.DefaultCamelContext  997 | Apache Camel 2.1.0
> (CamelContext:camelContext) started
>  INFO  | xtenderThread-42 | OsgiBundleXmlApplicationContext  |
> ractOsgiBundleApplicationContext  327 | Publishing application context as
> OSGi service with properties
> {org.springframework.context.service.name=try-xmpp,
> Bundle-SymbolicName=try-xmpp, Bundle-Version=0.1.0}
>  DEBUG | xtenderThread-42 | OsgiBundleXmlApplicationContext  |
> ractOsgiBundleApplicationContext  341 | Publishing service under classes
> {org.springframework.osgi.context.DelegatedExecutionOsgiBundleApplicationContext,
> org.springframework.osgi.context.ConfigurableOsgiBundleApplicationContext,
> org.springframework.context.ConfigurableApplicationContext,
> org.springframework.context.ApplicationContext,
> org.springframework.context.Lifecycle,
> org.springframework.beans.factory.ListableBeanFactory,
> org.springframework.beans.factory.HierarchicalBeanFactory,
> org.springframework.context.MessageSource,
> org.springframework.context.ApplicationEventPublisher,
> org.springframework.core.io.support.ResourcePatternResolver,
> org.springframework.beans.factory.BeanFactory,
> org.springframework.core.io.ResourceLoader,
> org.springframework.beans.factory.DisposableBean}
>  DEBUG | xtenderThread-42 | try-xmpp                         | ?                                  
> ? | ServiceEvent REGISTERED
>  DEBUG | xtenderThread-42 | BlueprintListener                |
> actory$SpringApplicationListener  140 | Spring app state changed to
> Started for bundle 93
>  DEBUG | xtenderThread-42 | BlueprintListener                |
> actory$SpringApplicationListener  140 | Spring app state changed to
> Started for bundle 93
>  INFO  | xtenderThread-42 | ContextLoaderListener            |
> BundleApplicationContextListener   45 | Application context successfully
> refreshed (OsgiBundleXmlApplicationContext(bundle=try-xmpp,
> config=osgibundle:/META-INF/spring/*.xml))
>  INFO  | foo              | Tracer                           |
> rg.apache.camel.processor.Logger   88 |
> 8f812d3e-15cc-4ca3-b6c0-4077beef75bc >>> (route30)
> from(timer://foo?delay=10000&fixedRate=true&period=10000) -->
> setBody[Hello, i am message] <<< Pattern:InOnly, Headers:{firedTime=Thu
> Feb 11 12:18:13 EET 2010}, BodyType:null, Body:null
>  INFO  | foo              | Tracer                           |
> rg.apache.camel.processor.Logger   88 |
> 8f812d3e-15cc-4ca3-b6c0-4077beef75bc >>> (route30) setBody[Hello, i am
> message] --> xmpp://wsbise@websphere/masny@websphere?password=123456789
> <<< Pattern:InOnly, Headers:{firedTime=Thu Feb 11 12:18:13 EET 2010},
> BodyType:String, Body:Hello, i am message
>  DEBUG | foo              | XmppPrivateChatProducer          |
> ent.xmpp.XmppPrivateChatProducer   46 | Creating XmppPrivateChatProducer
> to participant masny@websphere
>  DEBUG | foo              | CachedIntrospectionResults       |
> beans.CachedIntrospectionResults  151 | Not strongly caching class
> [org.apache.camel.management.mbean.ManagedProducer] because it is not
> cache-safe
>  DEBUG | foo              | DefaultManagementAgent           |
> anagement.DefaultManagementAgent  304 | Registered MBean with objectname:
> org.apache.camel:context=masny/camelContext,type=producers,name=XmppPrivateChatProducer(0x11c0dc6)
>  DEBUG | foo              | XmppPrivateChatProducer          |
> pache.camel.impl.DefaultProducer   66 | Starting producer:
> Producer[xmpp://wsbise@websphere/masny@websphere?password=123456789]
>  DEBUG | foo              | ProducerCache                    |
> .apache.camel.impl.ProducerCache  211 | Adding to producer cache with key:
> Endpoint[xmpp://wsbise@websphere/masny@websphere?password=123456789] for
> producer:
> Producer[xmpp://wsbise@websphere/masny@websphere?password=123456789]
>  DEBUG | foo              | DefaultErrorHandler              |
> rg.apache.camel.processor.Logger  197 | Failed delivery for exchangeId:
> 8f812d3e-15cc-4ca3-b6c0-4077beef75bc. On delivery attempt: 0 caught:
> java.lang.NullPointerException
>  DEBUG | foo              | DefaultErrorHandler              |
> processor.RedeliveryErrorHandler  411 | This exchange is not handled so
> its marked as failed: Exchange[Message: Hello, i am message]
>  DEBUG | foo              | Pipeline                         |
> .apache.camel.processor.Pipeline   99 | Message exchange has failed so
> breaking out of pipeline: Exchange[Message: Hello, i am message]
> Exception: java.lang.NullPointerException
>  ERROR | foo              | TimerConsumer                    |
> rg.apache.camel.processor.Logger  248 | 
> java.lang.NullPointerException
> 	at
> org.jivesoftware.smackx.muc.MultiUserChat$1.connectionCreated(MultiUserChat.java:84)
> 	at
> org.jivesoftware.smack.XMPPConnection.initConnection(XMPPConnection.java:887)
> 	at
> org.jivesoftware.smack.XMPPConnection.connectUsingConfiguration(XMPPConnection.java:834)
> 	at
> org.jivesoftware.smack.XMPPConnection.connect(XMPPConnection.java:1276)
> 	at
> org.apache.camel.component.xmpp.XmppEndpoint.createConnection(XmppEndpoint.java:140)
> 	at
> org.apache.camel.component.xmpp.XmppPrivateChatProducer.process(XmppPrivateChatProducer.java:52)
> 	at
> org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:97)
> 	at
> org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:95)
> 	at
> org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:146)
> 	at
> org.apache.camel.processor.SendProcessor.doProcess(SendProcessor.java:94)
> 	at
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:82)
> 	at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
> 	at
> org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:53)
> 	at
> org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:82)
> 	at
> org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:162)
> 	at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
> 	at
> org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:223)
> 	at
> org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:153)
> 	at
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:91)
> 	at
> org.apache.camel.processor.DefaultErrorHandler.process(DefaultErrorHandler.java:49)
> 	at
> org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:206)
> 	at org.apache.camel.processor.Pipeline.process(Pipeline.java:74)
> 	at
> org.apache.camel.processor.UnitOfWorkProcessor.processNext(UnitOfWorkProcessor.java:54)
> 	at
> org.apache.camel.processor.DelegateProcessor.process(DelegateProcessor.java:48)
> 	at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
> 	at
> org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:103)
> 	at
> org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:50)
> 	at java.util.TimerThread.mainLoop(Timer.java:512)
> 	at java.util.TimerThread.run(Timer.java:462)
> 
> MANIFEST.MF
> Manifest-Version: 1.0
> Bundle-Name: try-xmpp [mti]
> Built-By: masny
> Build-Jdk: 1.5.0_17
> Created-By: Apache Maven Bundle Plugin
> Import-Package: mti.try_xmpp,org.apache.camel;version="2.1",org.apache
>  .camel.builder;version="2.1",org.apache.camel.component;version="2.1"
>  ,org.apache.camel.component.stream;version="2.1",org.apache.camel.com
>  ponent.xmpp;version="2.1",org.apache.camel.model;version="2.1",org.ap
>  ache.camel.spring;version="2.1",org.apache.commons.logging
> Bundle-ManifestVersion: 2
> Bundle-SymbolicName: try-xmpp
> Tool: Bnd-0.0.255
> Bnd-LastModified: 1265883469593
> Export-Package: mti.try_xmpp;uses:="org.apache.camel.model,org.apache.
>  camel.builder,org.apache.camel,org.apache.camel.spring"
> Bundle-Version: 0.1
> 
> 
> My small project attached.
> http://old.nabble.com/file/p27544316/try-xmpp-project.jar
> try-xmpp-project.jar 
> 
> 
> Thanks a lot for any answer!
> 


-----
--- 
Ashwin Karpe, Principal Consultant, PS - Opensource Center of Competence 
Progress Software Corporation
14 Oak Park Drive
Bedford, MA 01730
--- 
+1-972-304-9084 (Office) 
+1-972-971-1700 (Mobile) 
---- 
Blog: http://opensourceknowledge.blogspot.com/


-- 
View this message in context: http://old.nabble.com/camel-xmpp-not-sends-message-in-Felix-Karaf-tp27544316p27544562.html
Sent from the Camel - Users mailing list archive at Nabble.com.