powered by Jive Software

IllegalArgumentException

Hi,

We are having the following illegal argumentException when wildfire try to retrieve one user’s roster:

java.lang.IllegalArgumentException: Illegal JID: wfink_adm

at org.xmpp.packet.JID.init(JID.java:384)

at org.xmpp.packet.JID.(Roster.java:98)

at org.jivesoftware.openfire.roster.RosterManager.getRoster(RosterManager.java:92)

at org.jivesoftware.openfire.handler.PresenceUpdateHandler.broadcastUpdate(Presenc eUpdateHandler.java:257)

at org.jivesoftware.openfire.handler.PresenceUpdateHandler.process(PresenceUpdateH andler.java:100)

at org.jivesoftware.openfire.handler.PresenceUpdateHandler.process(PresenceUpdateH andler.java:88)

at org.jivesoftware.openfire.handler.PresenceUpdateHandler.process(PresenceUpdateH andler.java:151)

at org.jivesoftware.openfire.PresenceRouter.handle(PresenceRouter.java:123)

at org.jivesoftware.openfire.PresenceRouter.route(PresenceRouter.java:69)

at org.jivesoftware.openfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:75)

at org.jivesoftware.openfire.net.StanzaHandler.processPresence(StanzaHandler.java: 306)

at org.jivesoftware.openfire.net.ClientStanzaHandler.processPresence(ClientStanzaH andler.java:85)

at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:231)

at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:153)

at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandl er.java:132)

at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived (AbstractIoFilterChain.java:703)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:362)

at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:54)

at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:800)

at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimplePr otocolDecoderOutput.java:62)

at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecF ilter.java:200)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:362)

at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:54)

at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:800)

at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java :266)

at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(Execut orFilter.java:326)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java: 650)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)

at java.lang.Thread.run(Thread.java:595)

Caused by: org.jivesoftware.stringprep.IDNAException: Contains non-LDH characters.

at org.jivesoftware.stringprep.IDNA.toASCII(IDNA.java:106)

at org.jivesoftware.stringprep.IDNA.toASCII(IDNA.java:53)

at org.xmpp.packet.JID.init(JID.java:355)

… 30 more

In fact when I look into the jiveRoster table, I see that the jid for this user is only wfink_adm, instead of wfink_adm@domain. But there is also other users in this case, and there is no exceptions for those. So I’m wondering if the error occurs only because this particluar userid contains ‘_’, and it could be a bug on your side, or if the jid in the roster table should always be user@domain, in which case I have to do some clean up and find why I have those users…

Thanks,

Mélanie

PS: we are using openfire 3.3.2

Does someone know the cause of this issue ?

Thanks,

Mélanie

melane wrote:

In fact when I look into the jiveRoster table, I see that the jid for this user is only wfink_adm, instead of wfink_adm@domain. But there is also other users in this case, and there is no exceptions for those. So I’m wondering if the error occurs only because this particluar userid contains ‘_’, and it could be a bug on your side, or if the jid in the roster table should always be user@domain, in which case I have to do some clean up and find why I have those users…

You could try to delete this user and recreate it (the same way you did initially), to see if this happens again. They could lose their rosters/subscriptions though.

I do believe the roster must have full jid of users, since you can have users of other jabber domains on your roster.

Hi Melanie,

I’m trying to make some sense from the error stack. Sorry if this doesn’t help.

An underscore ‘_’ is a perfectly legal character in a username. I suppose, in the roster table, a roster item without the domain portion implies that it’s local.

I presume that Openfire first tries to find whether wfink_adm is its local user. If it isn’t Openfire assumes that it is a domain name. It looks like openfire is trying to verify whether wfink_adm is a valid domain name, instead of a username. That might be the reason for the following line:

Caused by: org.jivesoftware.stringprep.IDNAException: Contains non-LDH characters.

So, I’m wondering if there really is a local username called ‘wfink_adm’.

Hey Melanie,

As you noticed the problem is that domains cannot contain the _ character. In XMPP each part of a JID has different validations. JIDs are of the form node @ domain / resource. Nodes (aka usernames) may include the _ char unlike domains. In summary, if the user really wanted to have a domain in his roster (which is very uncommon and probably incorrect) then it has to be a valid domain.

Regards,

– Gato

So, there really isn’t a local username ‘wfink_adm’.

Hey aznidin,

That’s right. To be a username it has to be something like wfink_adm@mydomain.com.

– Gato

Hey Gato,

If you can recall, since what version of OF does the roster table dropped the domain part for local user? I remember that Wildfire used bare JID.

Hey aznidin,

The roster table has the username column that keeps just the username of the local user that owns the roster and also the jid column that keeps whatever JID was added to the roster for a contact. Having said that, I think that we always stored in the jid column whatever value was received from the client. I don’t think we used to remove the domain since that would have implied that only local users could be part of your roster (and not even components). Not sure if in the very very old days of Openfire when it was called Jive Messenger and s2s and components were not supported if we were stripping out that info but I highly doubt it.

Regards,

– Gato

I must have got it all mixed up with some other things :). Thanks for clearing that up.