Bug for Yahoo through Openfire

When adding a Yahoo contact using spark (or any other client) that is pointing to my own local dev server as of Thursday, 6/14/2007, Yahoo Messenger will get two contact requests instead of one. If somebody can point to the code that deals with this, I can take a longer look at the issue before asking more questions.

This is also reflected by the spark client getting two Subscription Request windows popping up.

So when the Yahoo client adds you back, you get two as well? What version are you running, 1.0.2? Yahoo in pre-1.1.0 is almost unsupportable with how nuts the code is. =/ However 1.1.0 is migrated to a much cleaner implementation.

So I had to change a couple lines of code (TransportInstance.java line 145 and 151 should be sess.close() instead of sess.getConnection.close() I think). But now I’'m getting this ClassCastException:

Exception in thread “Thread-21” java.lang.ClassCastException: java.util.HashMap$

Values

at org.jivesoftware.openfire.gateway.protocols.yahoo.YahooSession.syncUs

ers(YahooSession.java:227)

at org.jivesoftware.openfire.gateway.protocols.yahoo.YahooSession$1.run(

YahooSession.java:112)

Exception in thread “Thread-23” java.lang.ClassCastException: java.util.HashMap$

Values

at org.jivesoftware.openfire.gateway.protocols.yahoo.YahooSession.syncUs

ers(YahooSession.java:227)

at org.jivesoftware.openfire.gateway.protocols.yahoo.YahooSession$1.run(

YahooSession.java:112)

This occur every time I try to create login information through spark ver. 2.5.3. The logout information is correct, (I put a bad password in first and I got a dialog telling me so), so it’'s occurring after sign in maybe? Is my version of spark too old?

When I have it running, I can test my old bug. BTW, should I commit those two small changes in TransportInstance?

Actually it is supposed to be sess.getConnection().close(). That change was made recently because there are threading issues that come up associated with not putting the getConnection() in the middle.

What exactly do you mean by commit anyway?

Did you ever answer what version you are running?

Just kidding about the commit, I’‘m not the one with the gear next to my name. I’‘m now running 1.10, but I couldn’‘t compile without that change I mentioned (sess.getConnection().close() to sess.close()). I’‘m not seeing the getConnection method in the source, am I missing something? With sess.close(), I still get the errors I mentioned beforehand, which has to do with synching our client’'s roster with the legacy (Yahoo in this case) roster in terms of nicknames, etc.

I can tell which vers of the gateway I’‘m running through the changeLog and the fact that I’'m checking it out from the trunk, not through the 1.0.2 tag.

I pull a copy of https://svn.igniterealtime.org/svn/repos/openfire/branches/3_3_1_branch

then under src/plugins i basically replace the gateway directory listed there with the trunk of the gateway tree.

i’'m wondering what openfire tree you are pulling that you are working with?

It’‘s possible that it will not compile under the current openfire trunk. The openfire trunk is in quite a fast moving/fast updating state right now so I’'m steering clear of it. =)

I was using the openfire trunk, thanks for the heads up. I’‘m going to switch to 3_3_1 and replace the gateway directory listed with the trunk (like I did with the openfire trunk) and see what happens. I’'ll keep you posted. Thanks for the help.

I’‘ve switched to 3_3_1 and I’‘m using the gateway trunk instead of 1_0_2, but I’‘m still getting the following error (which is when we’'re trying to sync our roster with the legacy (Yahoo) roster).

Exception in thread “Thread-23” java.lang.ClassCastException: java.util.HashMap$

Values

at org.jivesoftware.openfire.gateway.protocols.yahoo.YahooSession.syncUs

ers(YahooSession.java:227)

at org.jivesoftware.openfire.gateway.protocols.yahoo.YahooSession$1.run(

YahooSession.java:112)

Any help would be greatly appreciated.

FYI, the error in question is a runtime error.

More information - I’'m using jdk 1.5.10, not 1.6, if that makes a difference.

Message was edited by: badiib

Well I hate to say this along all of the conversation we’‘ve had already, but the trunk of the gateway plugin is actually fairly unstable at the moment too. =) I’‘ve been reworking a good deal of it and most likely there’‘s a lot of pieces that aren’'t solidified yet. Might have time this weekend to clean things up though. None-the-less, the stacktrace you posted here will be helpful in my work on it. =)

Hey jadestorm, I figured out the problem, there was an incorrect and unnecessarily stringent cast, I’‘ve never submitted a patch for the gateway, but there’‘s a first for anything. Now I’‘ve gotten to the point where I add a yahoo contact to my buddy list, but an invite doesn’‘t go out to my yahoo contact (who’'s using Yahoo Messenger). However, I am able to message the person, and they will get the message.

I’'ve made the patch with TortoiseSVN, how can I submit it for review?

Basically just paste it here or email it to me.

Of course if it’'s a large patch I have to make you sign a contributor agreement. =/

I’'ve emailed it to your rr account. Thanks for all the set up help man.

Just making a note that we’'ve been discussing this offline.