[mule-user] Transformer Exception with XMPP

4 views
Skip to first unread message

Tom Soraoka

unread,
Jul 10, 2007, 12:14:20 PM7/10/07
to us...@mule.codehaus.org

I’m getting the exception shown below with the config shown below.  Do I need to use a custom transformer?  Whatever happened to org.mule.providers.xmpp.transformers.XmppPacketToString ?

 

  <mule-descriptor name="XmppEchoMessage" implementation="org.mule.components.simple.BridgeComponent">

    <inbound-router>

                        <endpoint address="xmpp://myuser:mypassword@mymachine:5222/otheruser@mymachine " />

    </inbound-router>

  </mule-descriptor>

 

 

Message               : The transformer "ObjectToXmppPacket" does not support so

urce type "org.jivesoftware.smack.packet.Message". Endpoint is "null"

Type                  : org.mule.umo.transformer.TransformerException

Code                  : MULE_ERROR-65054

JavaDoc               : http://mule.mulesource.org/docs/apidocs/org/mule/umo/tra

nsformer/TransformerException.html

Transformer           : ObjectToXmppPacket{this=1d3ac6e, name='ObjectToXmppPacke

t', ignoreBadInput=false, returnClass=class org.jivesoftware.smack.packet.Messag

e, sourceTypes=[class java.lang.String]}

********************************************************************************

 

Exception stack is:

1. The transformer "ObjectToXmppPacket" does not support source type "org.jiveso

ftware.smack.packet.Message". Endpoint is "null" (org.mule.umo.transformer.Trans

formerException)

  org.mule.transformers.AbstractTransformer:238 (http://mule.mulesource.org/docs

/apidocs/org/mule/umo/transformer/TransformerException.html)

********************************************************************************

 

Root Exception stack trace:

org.mule.umo.transformer.TransformerException: The transformer "ObjectToXmppPack

et" does not support source type "org.jivesoftware.smack.packet.Message". Endpoi

nt is "null"

        at org.mule.transformers.AbstractTransformer.transform(AbstractTransform

er.java:238)

        at org.mule.providers.xmpp.XmppMessageReceiver$XMPPWorker.run(XmppMessag

eReceiver.java:152)

        at org.mule.impl.work.WorkerContext.run(WorkerContext.java:310)

        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Wor

ker.runTask(ThreadPoolExecutor.java:665)

        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Wor

ker.run(ThreadPoolExecutor.java:690)

        at java.lang.Thread.run(Unknown Source)

Andrew Perepelytsya

unread,
Jul 10, 2007, 12:20:01 PM7/10/07
to us...@mule.codehaus.org
Mule version? There were some fixes to xmpp message constructors.

Tom Soraoka

unread,
Jul 10, 2007, 12:23:01 PM7/10/07
to us...@mule.codehaus.org

1.4.1

 


Dirk Olmes

unread,
Jul 10, 2007, 3:30:18 PM7/10/07
to us...@mule.codehaus.org
Tom Soraoka wrote:
> 1.4.1

Can you try with a 1.4.2-SNAPSHOT from Mule's maven repo? The changes
Andrew mentions are not officially released yet.

-dirk

---------------------------------------------------------------------
To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Tom Soraoka

unread,
Jul 10, 2007, 6:01:49 PM7/10/07
to us...@mule.codehaus.org
I tried using 1.4.2-SNAPSHOT:

- I no longer get the "The transformer "ObjectToXmppPacket" does not support
source type "org.jivesoftware.smack.packet.Message" error message.

- If I comment out the outbound-router and do not specify a transformer for
the inbound router, it goes into an infinite loop, creating an infinite
number of xmpp sessions. This is not a problem, I'll just specify a
transformer all the time.

- Got the same error if I had an outbound-router [tried a FileConnector and
JMSConnector] specified: java.lang.IllegalArgumentException: Property
Extractor cannot return a null value. Extractor is:
org.mule.routing.CorrelationPropertiesExtractor. This is a problem. Don't
know how to fix this, ...yet.


-----Original Message-----
From: Dirk Olmes [mailto:dirk....@googlemail.com]
Sent: Tuesday, July 10, 2007 1:30 PM
To: us...@mule.codehaus.org
Subject: Re: [mule-user] Transformer Exception with XMPP

Tom Soraoka

unread,
Jul 12, 2007, 11:45:50 AM7/12/07
to us...@mule.codehaus.org

I need to connect Mule 1.4.1 to a chat “room”.  Anyone have any experience or ideas ?

 

I tried subclassing XmppConnector and adding this:

 

  1. Used XmppConnector with XmppPacketToObject transformer (copied from 1.4.2 SNAPSHOT).  Used a FileConnector endpoint in the outbound-router.  And tested with a simple IM message and it worked.
  2. I’m using OpenFire.  Logged onto the OpenFire admin page and created the “bogusRoom” room first and tested with IM clients to ensure communications through a room worked.
  3. Added smackx-2.2.1.jar to the lib directory of mule because that’s what contains the MultiUserChat class.
  4. Subclassed XmppConnector and added the code below:

 

MultiUserChat muc = new MultiUserChat(xmppConnection, "bogu...@conference.mymachine");

muc.join("bogusRoom");

 

  1. It created a “bogusroom” room.  It changed it to all lowercase.  It seemed to have sent the message to the FileConnector, but with the message “This room is locked from entry until configuration is confirmed.”.  From then on, nothing worked.  No more messages.  I tried tracing how messages get sent from class to class, and started wandering through mule classes thinking I’m getting no where.

 

Tom

Andrew Perepelytsya

unread,
Jul 12, 2007, 11:54:48 AM7/12/07
to us...@mule.codehaus.org
>> This room is locked from entry until configuration is confirmed

Some smack message? Try researching it.

For Mule classes there's not much to wander around, XmppConnector, transformer, and Receiver/Dispatcher.

HTH,
Andrew

andrew cooke

unread,
Jul 12, 2007, 12:19:04 PM7/12/07
to us...@mule.codehaus.org

i *guess* there's some normalization somewhere with the lowercasing and
URIs. without knowing the details, i'd suggest escaping the capital. try
%[ascii value in hex].

ie. "bous%52oom@..."

andrew


> I need to connect Mule 1.4.1 to a chat "room". Anyone have any experience
> or ideas ?
>
>
>
> I tried subclassing XmppConnector and adding this:
>
>
>

> 1. Used XmppConnector with XmppPacketToObject transformer (copied from


> 1.4.2 SNAPSHOT). Used a FileConnector endpoint in the outbound-router.
> And
> tested with a simple IM message and it worked.

> 2. I'm using OpenFire. Logged onto the OpenFire admin page and created


> the "bogusRoom" room first and tested with IM clients to ensure
> communications through a room worked.

> 3. Added smackx-2.2.1.jar to the lib directory of mule because that's


> what contains the MultiUserChat class.

> 4. Subclassed XmppConnector and added the code below:


>
>
>
> MultiUserChat muc = new MultiUserChat(xmppConnection,
> "bogu...@conference.mymachine");
>
> muc.join("bogusRoom");
>
>
>

> 5. It created a "bogusroom" room. It changed it to all lowercase. It


> seemed to have sent the message to the FileConnector, but with the message
> "This room is locked from entry until configuration is confirmed.". From
> then on, nothing worked. No more messages. I tried tracing how messages
> get sent from class to class, and started wandering through mule classes
> thinking I'm getting no where.
>
>
>
> Tom
>
>

---------------------------------------------------------------------

Urosov, Roman

unread,
Jul 12, 2007, 2:13:02 PM7/12/07
to us...@mule.codehaus.org

Such escaping won't work, because JID can contain any Unicode character
and '%' has no special meaning.

AFAIR, case of "node@.." is preserved, but comparisons are made in
case-normalized canonical form.


Best regards,
Roman Urosov

-----Original Message-----
From: andrew cooke [mailto:aco...@mulesource.com]
Sent: Thursday, July 12, 2007 20:19
To: us...@mule.codehaus.org

Subject: Re: [mule-user] XMPP with MultiUserChat


i *guess* there's some normalization somewhere with the lowercasing and
URIs. without knowing the details, i'd suggest escaping the capital.
try
%[ascii value in hex].

ie. "bous%52oom@..."

andrew


andrew cooke

unread,
Jul 12, 2007, 2:55:23 PM7/12/07
to us...@mule.codehaus.org

I don't know anything about XMPP (or even what a JID is :o) but I was
thinking that some intermediate Mule-related code might be assuming that
was a URI (even then the case change doesn't make much sense). But
looking back at the original question I think you're probably right -
seems to be unrelated to Mule.

But in that case, why didn't it connect to the existing chat, if they are
the same in canonical form? Or have I misunderstood the problem
completely?

Andrew

Urosov, Roman

unread,
Jul 13, 2007, 7:33:17 AM7/13/07
to us...@mule.codehaus.org

JID is xmpp endpoint identifier (former 'jabber id') ;)

Anyway, yeah, this question is unrelated to Mule and
needs investigation of smackx library and OpenFire server.


Best regards,
Roman Urosov

-----Original Message-----
From: andrew cooke [mailto:aco...@mulesource.com]
Sent: Thursday, July 12, 2007 22:55
To: us...@mule.codehaus.org
Subject: RE: [mule-user] XMPP with MultiUserChat


I don't know anything about XMPP (or even what a JID is :o) but I was
thinking that some intermediate Mule-related code might be assuming that
was a URI (even then the case change doesn't make much sense). But
looking back at the original question I think you're probably right -
seems to be unrelated to Mule.

But in that case, why didn't it connect to the existing chat, if they
are
the same in canonical form? Or have I misunderstood the problem
completely?

Andrew

---------------------------------------------------------------------

Reply all
Reply to author
Forward
0 new messages