xmpp endpoint exception

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

xmpp endpoint exception

Steve A.
Greetings!

Pardon the newbie question, but I've been trying to modify the apache-camel-1.5-SNAPSHOT\examples\camel-example-spring-xquery to send the transformed message1.xml via xmpp to a jabber user, but I'm getting a NoSuchEndpointException.

I changed the route defined in camelContext.xml by replacing <to uri="file:target/outputFiles"/> with <to uri="xmpp:fromuser@jabber.server/touser@jabber.server?password=frompassword" />, and added smack_3_0_4/smack*.jar to my classpath.

Do I need to define a xmpp endpoint in camelContext.xml?  If so, can you please provide an example.

Thanks,

Steve


Reply | Threaded
Open this post in threaded view
|

Re: xmpp endpoint exception

Jon Anstey
Did you add camel-xmpp as a dependency in your pom.xml?

Cheers,
Jon

On Wed, Aug 27, 2008 at 5:01 PM, Steve A. <[hidden email]> wrote:

>
> Greetings!
>
> Pardon the newbie question, but I've been trying to modify the
> apache-camel-1.5-SNAPSHOT\examples\camel-example-spring-xquery to send the
> transformed message1.xml via xmpp to a jabber user, but I'm getting a
> NoSuchEndpointException.
>
> I changed the route defined in camelContext.xml by replacing <to
> uri="file:target/outputFiles"/> with <to
> uri="xmpp:[hidden email]/[hidden email]
> ?password=frompassword"
> />, and added smack_3_0_4/smack*.jar to my classpath.
>
> Do I need to define a xmpp endpoint in camelContext.xml?  If so, can you
> please provide an example.
>
> Thanks,
>
> Steve
>
>
>
> --
> View this message in context:
> http://www.nabble.com/xmpp-endpoint-exception-tp19188057s22882p19188057.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
Reply | Threaded
Open this post in threaded view
|

RE: xmpp endpoint exception

Claus Ibsen
In reply to this post by Steve A.
Hi

You need camel-xmpp.jar as well on the classpath.

However I would love Camel to provide better feedback when it can not resolve and endpoint, hinting that maybe xxx is missing in the classpth.

I have forgotten myself once in a while to add camel-xxxx.jar also.

If you are using maven 2 then you get all this for free with its dependency resolution.


Med venlig hilsen
 
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk
-----Original Message-----
From: Steve A. [mailto:[hidden email]]
Sent: 27. august 2008 21:32
To: [hidden email]
Subject: xmpp endpoint exception


Greetings!

Pardon the newbie question, but I've been trying to modify the
apache-camel-1.5-SNAPSHOT\examples\camel-example-spring-xquery to send the
transformed message1.xml via xmpp to a jabber user, but I'm getting a
NoSuchEndpointException.

I changed the route defined in camelContext.xml by replacing <to
uri="file:target/outputFiles"/> with <to
uri="xmpp:[hidden email]/[hidden email]?password=frompassword"
/>, and added smack_3_0_4/smack*.jar to my classpath.

Do I need to define a xmpp endpoint in camelContext.xml?  If so, can you
please provide an example.

Thanks,

Steve



--
View this message in context: http://www.nabble.com/xmpp-endpoint-exception-tp19188057s22882p19188057.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

RE: xmpp endpoint exception

Steve A.
Claus Ibsen wrote
You need camel-xmpp.jar as well on the classpath.
Of course!  Thanks!

Now, I'm getting a java.lang.IllegalArgumentException: No room or participant configured on this endpoint:

How do I configure a participant for xmpp via Spring?

Steve
Reply | Threaded
Open this post in threaded view
|

Re: xmpp endpoint exception

Steve A.
In reply to this post by Jon Anstey
janstey wrote
Did you add camel-xmpp as a dependency in your pom.xml?
Actually, I'm just using ant, but the same solution applies.

Thanks for the quick reply!

Steve
Reply | Threaded
Open this post in threaded view
|

Re: xmpp endpoint exception

Vadim Chekan
In reply to this post by Steve A.
Hi Steve,
Where to do you wan to send messages?
There are 2 options: private chat or a multiuser room.

Please see examples at http://activemq.apache.org/camel/xmpp.html and
let me know if it is not clear.

Vadim.

Steve A. wrote:

>
> Claus Ibsen wrote:
>> You need camel-xmpp.jar as well on the classpath.
>>
>
> Of course!  Thanks!
>
> Now, I'm getting a java.lang.IllegalArgumentException: No room or
> participant configured on this endpoint:
>
> How do I configure a participant for xmpp via Spring?
>
> Steve

Reply | Threaded
Open this post in threaded view
|

Re: xmpp endpoint exception

Steve A.

Vadim Chekan wrote
Hi Steve,
Where to do you wan to send messages?
There are 2 options: private chat or a multiuser room.
Please see examples at http://activemq.apache.org/camel/xmpp.html and
let me know if it is not clear.
I'm trying to send a private chat.

I was actually trying to follow those examples.  I got that error when I was using the xmpp://superman@jabber.org/joker@jabber.org?password=secret style URI, so then I tried the xmpp://superman@jabber.org/?participant=joker@jabber.org&password=secret style URI and got different results.

Now, it looks like it's trying to establish a connection, but I'm getting a NPE in the smack API. Any thoughts on the stack trace below?

[java] java.lang.NullPointerException
     [java] at org.jivesoftware.smack.util.DNSUtil.resolveXMPPDomain(DNSUtil.java:97)
     [java] at org.jivesoftware.smack.ConnectionConfiguration.<init>(ConnectionConfiguration.java:81)
     [java] at org.jivesoftware.smack.XMPPConnection.<init>(XMPPConnection.java:190)
     [java] at org.apache.camel.component.xmpp.XmppEndpoint.createConnection(XmppEndpoint.java:213)
     [java] at org.apache.camel.component.xmpp.XmppEndpoint.getConnection(XmppEndpoint.java:197)
     [java] at org.apache.camel.component.xmpp.XmppPrivateChatProducer.process(XmppPrivateChatProducer.java:50)
     [java] at org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:43)
     [java] at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:75)
     [java] at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:57)
     [java] at org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:155)
     [java] at org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:91)
     [java] at org.apache.camel.processor.Pipeline.process(Pipeline.java:101)
     [java] at org.apache.camel.processor.Pipeline.process(Pipeline.java:85)
     [java] at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:57)
     [java] at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:39)
     [java] at org.apache.camel.component.file.FileConsumer.pollFile(FileConsumer.java:152)
     [java] at org.apache.camel.component.file.FileConsumer.pollFileOrDirectory(FileConsumer.java:88)
     [java] at org.apache.camel.component.file.FileConsumer.pollFileOrDirectory(FileConsumer.java:98)
     [java] at org.apache.camel.component.file.FileConsumer.poll(FileConsumer.java:64)
     [java] at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:65)
     [java] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
     [java] at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
     [java] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
     [java] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
     [java] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
     [java] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
     [java] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
     [java] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)

Steve



Reply | Threaded
Open this post in threaded view
|

Re: xmpp endpoint exception

Vadim Chekan
Steve,

Here is my configuration and it gives me
"org.apache.camel.component.xmpp.RuntimeXmppException: SASL
authentication failed" which is expected.

<from uri="timer://kickoff?period=10000&amp;delay=1"/>
<setBody><constant>bla-bla</constant></setBody>
<to uri="xmpp://[hidden email]/[hidden email]?password=secret" />

If I set my real credentials then it works fine:
2008-08-29 04:45:18,341 [d=10000&delay=1] INFO  TraceInterceptor
        - ID-ubuntu/54546-1219985108338/1-1 -> to1
To[xmpp://[hidden email]/[hidden email]?password=xxxxxxx] InOnly
Properties:{org.apache.camel.timer.firedtime=Fri Aug 29 04:45:18 GMT
2008, org.apache.camel.timer.name=kickoff,
org.apache.camel.timer.period=10000} Headers:{} BodyType:String Body:bla-bla
2008-08-29 04:45:18,341 [d=10000&delay=1] DEBUG XmppPrivateChatProducer
        - >>>> message: bla-bla

Could you provide your configuration or java route builder please?

Vadim.

Steve A. wrote:

>
>
> Vadim Chekan wrote:
>> Hi Steve,
>> Where to do you wan to send messages?
>> There are 2 options: private chat or a multiuser room.
>> Please see examples at http://activemq.apache.org/camel/xmpp.html and
>> let me know if it is not clear.
>>
>
> I'm trying to send a private chat.
>
> I was actually trying to follow those examples.  I got that error when I was
> using the xmpp://[hidden email]/[hidden email]?password=secret style
> URI, so then I tried the
> xmpp://[hidden email]/?participant=[hidden email]&password=secret
> style URI and got different results.
>
> Now, it looks like it's trying to establish a connection, but I'm getting a
> NPE in the smack API. Any thoughts on the stack trace below?
>
> [java] java.lang.NullPointerException
>      [java] at
> org.jivesoftware.smack.util.DNSUtil.resolveXMPPDomain(DNSUtil.java:97)
>      [java] at
> org.jivesoftware.smack.ConnectionConfiguration.<init>(ConnectionConfiguration.java:81)
>      [java] at
> org.jivesoftware.smack.XMPPConnection.<init>(XMPPConnection.java:190)
>      [java] at
> org.apache.camel.component.xmpp.XmppEndpoint.createConnection(XmppEndpoint.java:213)
>      [java] at
> org.apache.camel.component.xmpp.XmppEndpoint.getConnection(XmppEndpoint.java:197)
>      [java] at
> org.apache.camel.component.xmpp.XmppPrivateChatProducer.process(XmppPrivateChatProducer.java:50)
>      [java] at
> org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:43)
>      [java] at
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:75)
>      [java] at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:57)
>      [java] at
> org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:155)
>      [java] at
> org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:91)
>      [java] at
> org.apache.camel.processor.Pipeline.process(Pipeline.java:101)
>      [java] at
> org.apache.camel.processor.Pipeline.process(Pipeline.java:85)
>      [java] at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:57)
>      [java] at
> org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:39)
>      [java] at
> org.apache.camel.component.file.FileConsumer.pollFile(FileConsumer.java:152)
>      [java] at
> org.apache.camel.component.file.FileConsumer.pollFileOrDirectory(FileConsumer.java:88)
>      [java] at
> org.apache.camel.component.file.FileConsumer.pollFileOrDirectory(FileConsumer.java:98)
>      [java] at
> org.apache.camel.component.file.FileConsumer.poll(FileConsumer.java:64)
>      [java] at
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:65)
>      [java] at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>      [java] at
> java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>      [java] at
> java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>      [java] at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
>      [java] at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
>      [java] at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
>      [java] at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
>      [java] at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
>
> Steve
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: xmpp endpoint exception

Steve A.
Vadim Chekan wrote
Here is my configuration and it gives me
"org.apache.camel.component.xmpp.RuntimeXmppException: SASL
authentication failed" which is expected.

<from uri="timer://kickoff?period=10000&amp;delay=1"/>
<setBody><constant>bla-bla</constant></setBody>
<to uri="xmpp://superman@jabber.org/joker@jabber.org?password=secret" />

If I set my real credentials then it works fine:
Actually, your example above was most helpful.  I didn't get how to set the body from the documentation, so I appreciate your example above.

I got past my previous problem to actually connect to the Openfire server.  Now I just have to figure out why the Openfire server does not respond.

Thanks for your help!

Steve
Reply | Threaded
Open this post in threaded view
|

Re: xmpp endpoint exception

Steve A.
In reply to this post by Vadim Chekan

Vadim Chekan wrote
<from uri="timer://kickoff?period=10000&amp;delay=1"/>
<setBody><constant>bla-bla</constant></setBody>
<to uri="xmpp://superman@jabber.org/joker@jabber.org?password=secret" />

Could you provide your configuration or java route builder please?
Although it works, exactly where should are the valid Spring XML elements documented?  I don't see it in the XML reference.

I've been all of the Camel documentation, but I don't remember reading anywhere that there was a one-to-one mapping of the Java DSL function names to Spring XML tags.


Steve
Reply | Threaded
Open this post in threaded view
|

Re: xmpp endpoint exception

vchekan
I'm new to camel too and I have to admit that building xml route is
not the easiest thing to do for novice. It becomes much easier when
you understand how configuration builder works.
Good xml editor helps a lot ( some with context prompts which xan read
xml schemas).

I'll add xml expamples to xmpp documentation later today.

Vadim.

On Fri, Aug 29, 2008 at 8:25 AM, Steve A. <[hidden email]> wrote:

>
>
>
> Vadim Chekan wrote:
>>
>> <from uri="timer://kickoff?period=10000&amp;delay=1"/>
>> <setBody><constant>bla-bla</constant></setBody>
>> <to uri="xmpp://[hidden email]/[hidden email]?password=secret" />
>>
>> Could you provide your configuration or java route builder please?
>>
>>
>
> Although it works, exactly where should are the valid Spring XML elements
> documented?  I don't see it in the XML reference.
>
> I've been all of the Camel documentation, but I don't remember reading
> anywhere that there was a one-to-one mapping of the Java DSL function names
> to Spring XML tags.
>
>
> Steve
>
> --
> View this message in context: http://www.nabble.com/xmpp-endpoint-exception-tp19188057s22882p19222079.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



--
From RFC 2631: In ASN.1, EXPLICIT tagging is implicit unless IMPLICIT
is explicitly specified