[sip-comm-dev] exception in MSN implementation lib


#1

Hi everyone,

I'm working on the Android version of SC and for the moment I got stuck with
integrating MSN bundle.
As I don't know java MSN library so well I was hoping one of you could give
me a hint about it ...

While running test on the MSN jar, more precisely in

*net.java.sip.communicator.slick.protocol.msn.TestOperationSetPresence -
postTestSubscribe

* (The method would add a subscription for a contact = *
cristina_tabacaru30@hotmail.com*, wait for a
subscription event confirming the subscription, then change the status
of the newly added contact = *rodicalsc@hotmail.com* (which is actually the
testerAgent) and
make sure that the corresponding notification events have been generated.)

I got the following exception:

    *<logger>
net.java.sip.communicator.impl.protocol.msn.ProtocolProviderServiceMsnImpl
</logger>
    SEVERE net.java.sip.communicator.util.Logger
    <message>Error in Msn lib </message>
    <exception>
        <message>java.lang.IndexOutOfBoundsException</message>

            <class>java.util.ArrayList</class>
            <method>get</method>
            <line>339</line>

            <class>net.sf.jml.protocol.MsnMessage</class>
            <method>getParam</method>
            <line>85</line>

            <class>net.sf.jml.protocol.incoming.IncomingGTC</class>
            <method>isNotifyMeWhenSomeoneAddedMe</method>
            <line>47</line>

            <class>net.sf.jml.protocol.incoming.IncomingGTC</class>
            <method>messageReceived</method>
            <line>61</line>

            <class>net.sf.jml.protocol.MsnSession$1</class>
            <method>messageReceived</method>
            <line>109</line>

            <class>net.sf.jml.net.Session</class>
            <method>fireMessageReceived</method>
            <line>293</line>

            <class>net.sf.jml.net.Session</class>
            <method>access$1200</method>
            <line>32</line>

            <class>net.sf.jml.net.Session$MsgDispatcher</class>
            <method>run</method>
            <line>275</line>

            <class>java.lang.Thread</class>
            <method>run</method>
            <line>896</line>*

The issue is that the IncomingGTC message has no parameters, so
MsnMessage.getParam method will search a parameter on index -1.
In the API they say an Incoming GTC is triggered " To notice of OutgoingSYN
or the response of OutgoingGTC and to indicate what to do when someone adds
you to their contact list." - but I don't have any of this prior to the
begining of the test so I don't know why it lacks parameters. Here's a
listing of the messages that have been generated from the begining of the
test till the exception:

    *<logger>
net.java.sip.communicator.slick.protocol.msn.TestOperationSetPresence
</logger>
    <message>Testing Subscription and Subscription Event Dispatch.</message>

    <logger>
net.java.sip.communicator.impl.protocol.msn.ServerStoredContactListMsnImpl
</logger>
    <message>Adding contact rodicalsc@hotmail.com to parent=null</message>

    <logger>net.java.sip.communicator.impl.protocol.msn.EventManager
</logger>
    <message>cristina_tabacaru30@hotmail.com outgoing ADC 6 AL N=
rodicalsc@hotmail.com

    <logger>net.java.sip.communicator.impl.protocol.msn.EventManager
</logger>
    <message>cristina_tabacaru30@hotmail.com outgoing ADC 7 FL N=
rodicalsc@hotmail.com F=rodicalsc@hotmail.com

    <logger>net.java.sip.communicator.impl.protocol.msn.EventManager
</logger>
    <message>cristina_tabacaru30@hotmail.com outgoing CHG 9 NLN 1342472236

    <logger>net.java.sip.communicator.impl.protocol.msn.EventManager
</logger>
    <message>cristina_tabacaru30@hotmail.com incoming : SYN 5
2008-03-31T03:27:16.967-07:00 2008-03-31T01:25:39.763-07:00 12 1

    <logger>net.java.sip.communicator.impl.protocol.msn.EventManager
</logger>
    <message>cristina_tabacaru30@hotmail.com outgoing ADC 8 AL N=
rodicalsc@hotmail.com*

The exception is thrown only on Android and I'm quite sure there must be a
class, that the MSN library is using, which has an erronated implementation
but I can't figure out where to search for it.

Has anyone encountered a similar problem ?
How do you think I can work it out ?

Thanx,
Cristina


#2

Hi Cristina,

you mean that when executing the same tests outside android with the same test accounts(test configuration) you don't
get this exception ?
Can you see this "Incoming GTC" packet when executing outside Android ?

Cheers
damencho

Cristina Tabacaru wrote:

···

Hi everyone,

I'm working on the Android version of SC and for the moment I got stuck with integrating MSN bundle.
As I don't know java MSN library so well I was hoping one of you could give me a hint about it ...

While running test on the MSN jar, more precisely in

*net.java.sip.communicator.slick.protocol.msn.TestOperationSetPresence - postTestSubscribe

* (The method would add a subscription for a contact = *cristina_tabacaru30@hotmail.com <mailto:cristina_tabacaru30@hotmail.com>*, wait for a
subscription event confirming the subscription, then change the status
of the newly added contact = *rodicalsc@hotmail.com <mailto:rodicalsc@hotmail.com>* (which is actually the testerAgent) and
make sure that the corresponding notification events have been generated.)

I got the following exception:

    /<logger>net.java.sip.communicator.impl.protocol.msn.ProtocolProviderServiceMsnImpl</logger>
    SEVERE net.java.sip.communicator.util.Logger
    <message>Error in Msn lib </message>
    <exception>
        <message>java.lang.IndexOutOfBoundsException</message>

            <class>java.util.ArrayList</class>
            <method>get</method>
            <line>339</line>

            <class>net.sf.jml.protocol.MsnMessage</class>
            <method>getParam</method>
            <line>85</line>

            <class>net.sf.jml.protocol.incoming.IncomingGTC</class>
            <method>isNotifyMeWhenSomeoneAddedMe</method>
            <line>47</line>

            <class>net.sf.jml.protocol.incoming.IncomingGTC</class>
            <method>messageReceived</method>
            <line>61</line>

            <class>net.sf.jml.protocol.MsnSession$1</class>
            <method>messageReceived</method>
            <line>109</line>

            <class>net.sf.jml.net.Session</class>
            <method>fireMessageReceived</method>
            <line>293</line>

            <class>net.sf.jml.net.Session</class>
            <method>access$1200</method>
            <line>32</line>

            <class>net.sf.jml.net.Session$MsgDispatcher</class>
            <method>run</method>
            <line>275</line>

            <class>java.lang.Thread</class>
            <method>run</method>
            <line>896</line>/

The issue is that the IncomingGTC message has no parameters, so MsnMessage.getParam method will search a parameter on index -1.
In the API they say an Incoming GTC is triggered " To notice of OutgoingSYN or the response of OutgoingGTC and to indicate what to do when someone adds you to their contact list." - but I don't have any of this prior to the begining of the test so I don't know why it lacks parameters. Here's a listing of the messages that have been generated from the begining of the test till the exception:

    /<logger>net.java.sip.communicator.slick.protocol.msn.TestOperationSetPresence</logger>
    <message>Testing Subscription and Subscription Event Dispatch.</message>

    <logger>net.java.sip.communicator.impl.protocol.msn.ServerStoredContactListMsnImpl</logger>
    <message>Adding contact rodicalsc@hotmail.com <mailto:rodicalsc@hotmail.com> to parent=null</message>

    <logger>net.java.sip.communicator.impl.protocol.msn.EventManager</logger>
    <message>cristina_tabacaru30@hotmail.com <mailto:cristina_tabacaru30@hotmail.com> outgoing ADC 6 AL N=rodicalsc@hotmail.com <mailto:rodicalsc@hotmail.com>

    <logger>net.java.sip.communicator.impl.protocol.msn.EventManager</logger>
    <message>cristina_tabacaru30@hotmail.com <mailto:cristina_tabacaru30@hotmail.com> outgoing ADC 7 FL N=rodicalsc@hotmail.com <mailto:rodicalsc@hotmail.com> F=rodicalsc@hotmail.com <mailto:rodicalsc@hotmail.com>

    <logger>net.java.sip.communicator.impl.protocol.msn.EventManager</logger>
    <message>cristina_tabacaru30@hotmail.com <mailto:cristina_tabacaru30@hotmail.com> outgoing CHG 9 NLN 1342472236

    <logger>net.java.sip.communicator.impl.protocol.msn.EventManager</logger>
    <message>cristina_tabacaru30@hotmail.com <mailto:cristina_tabacaru30@hotmail.com> incoming : SYN 5 2008-03-31T03:27:16.967-07:00 2008-03-31T01:25:39.763-07:00 12 1

    <logger>net.java.sip.communicator.impl.protocol.msn.EventManager</logger>
    <message>cristina_tabacaru30@hotmail.com <mailto:cristina_tabacaru30@hotmail.com> outgoing ADC 8 AL N=rodicalsc@hotmail.com <mailto:rodicalsc@hotmail.com>/

The exception is thrown only on Android and I'm quite sure there must be a class, that the MSN library is using, which has an erronated implementation but I can't figure out where to search for it.

Has anyone encountered a similar problem ?
How do you think I can work it out ?

Thanx,
Cristina

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#3

Hi Damian,

Thanx for the reply.
I get this exception only inside Android with the same test accounts.
But now I got into bigger trouble, I'm tring to solve it ...
Meanwhile, I'd like to have a look at yahoo lib sources.
Can u tell me where could I find them ?

cheers,
cristina

···

On Mon, Mar 31, 2008 at 6:04 PM, Damian Minkov <damencho@damencho.com> wrote:

Hi Cristina,

you mean that when executing the same tests outside android with the
same test accounts(test configuration) you don't
get this exception ?
Can you see this "Incoming GTC" packet when executing outside Android ?

Cheers
damencho

Cristina Tabacaru wrote:
> Hi everyone,
>
> I'm working on the Android version of SC and for the moment I got
> stuck with integrating MSN bundle.
> As I don't know java MSN library so well I was hoping one of you could
> give me a hint about it ...
>
> While running test on the MSN jar, more precisely in
>
> *net.java.sip.communicator.slick.protocol.msn.TestOperationSetPresence
> - postTestSubscribe
>
> * (The method would add a subscription for a contact =
> *cristina_tabacaru30@hotmail.com
> <mailto:cristina_tabacaru30@hotmail.com>*, wait for a
> subscription event confirming the subscription, then change the status
> of the newly added contact = *rodicalsc@hotmail.com
> <mailto:rodicalsc@hotmail.com>* (which is actually the testerAgent) and
> make sure that the corresponding notification events have been
> generated.)
>
> I got the following exception:
>
>
> /<logger>
net.java.sip.communicator.impl.protocol.msn.ProtocolProviderServiceMsnImpl
</logger>
> SEVERE net.java.sip.communicator.util.Logger
> <message>Error in Msn lib </message>
> <exception>
> <message>java.lang.IndexOutOfBoundsException</message>
>
> <class>java.util.ArrayList</class>
> <method>get</method>
> <line>339</line>
>
> <class>net.sf.jml.protocol.MsnMessage</class>
> <method>getParam</method>
> <line>85</line>
>
> <class>net.sf.jml.protocol.incoming.IncomingGTC</class>
> <method>isNotifyMeWhenSomeoneAddedMe</method>
> <line>47</line>
>
> <class>net.sf.jml.protocol.incoming.IncomingGTC</class>
> <method>messageReceived</method>
> <line>61</line>
>
> <class>net.sf.jml.protocol.MsnSession$1</class>
> <method>messageReceived</method>
> <line>109</line>
>
> <class>net.sf.jml.net.Session</class>
> <method>fireMessageReceived</method>
> <line>293</line>
>
> <class>net.sf.jml.net.Session</class>
> <method>access$1200</method>
> <line>32</line>
>
> <class>net.sf.jml.net.Session$MsgDispatcher</class>
> <method>run</method>
> <line>275</line>
>
> <class>java.lang.Thread</class>
> <method>run</method>
> <line>896</line>/
>
> The issue is that the IncomingGTC message has no parameters, so
> MsnMessage.getParam method will search a parameter on index -1.
> In the API they say an Incoming GTC is triggered " To notice of
> OutgoingSYN or the response of OutgoingGTC and to indicate what to do
> when someone adds you to their contact list." - but I don't have any
> of this prior to the begining of the test so I don't know why it lacks
> parameters. Here's a listing of the messages that have been generated
> from the begining of the test till the exception:
>
>
>
> /<logger>
net.java.sip.communicator.slick.protocol.msn.TestOperationSetPresence
</logger>
> <message>Testing Subscription and Subscription Event
> Dispatch.</message>
>
>
> <logger>
net.java.sip.communicator.impl.protocol.msn.ServerStoredContactListMsnImpl
</logger>
> <message>Adding contact rodicalsc@hotmail.com
> <mailto:rodicalsc@hotmail.com> to parent=null</message>
>
>
> <logger>net.java.sip.communicator.impl.protocol.msn.EventManager
</logger>
> <message>cristina_tabacaru30@hotmail.com
> <mailto:cristina_tabacaru30@hotmail.com> outgoing ADC 6 AL
> N=rodicalsc@hotmail.com <mailto:rodicalsc@hotmail.com>
>
>
> <logger>net.java.sip.communicator.impl.protocol.msn.EventManager
</logger>
> <message>cristina_tabacaru30@hotmail.com
> <mailto:cristina_tabacaru30@hotmail.com> outgoing ADC 7 FL
> N=rodicalsc@hotmail.com <mailto:rodicalsc@hotmail.com>
> F=rodicalsc@hotmail.com <mailto:rodicalsc@hotmail.com>
>
>
> <logger>net.java.sip.communicator.impl.protocol.msn.EventManager
</logger>
> <message>cristina_tabacaru30@hotmail.com
> <mailto:cristina_tabacaru30@hotmail.com> outgoing CHG 9 NLN 1342472236
>
>
> <logger>net.java.sip.communicator.impl.protocol.msn.EventManager
</logger>
> <message>cristina_tabacaru30@hotmail.com
> <mailto:cristina_tabacaru30@hotmail.com> incoming : SYN 5
> 2008-03-31T03:27:16.967-07:00 2008-03-31T01:25:39.763-07:00 12 1
>
>
> <logger>net.java.sip.communicator.impl.protocol.msn.EventManager
</logger>
> <message>cristina_tabacaru30@hotmail.com
> <mailto:cristina_tabacaru30@hotmail.com> outgoing ADC 8 AL
> N=rodicalsc@hotmail.com <mailto:rodicalsc@hotmail.com>/
>
>
> The exception is thrown only on Android and I'm quite sure there must
> be a class, that the MSN library is using, which has an erronated
> implementation but I can't figure out where to search for it.
>
> Has anyone encountered a similar problem ?
> How do you think I can work it out ?
>
> Thanx,
> Cristina

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#4

Hi,

The sources we use are almost the same as the one from the site of the lib.

Here is the part from the mail I've sent to the maintainer of the lib :

> and for the yahoo libs I have implemented some services which were missing in jYMSG :
>
> public final static int SERVICE_Y7_AUTHORIZATION = 0xd6; /* YMSG13 */ public final static int SERVICE_Y6_STATUS_UPDATE= 0xc6;
> // Yahoo buddy icons
> public final static int SERVICE_PICTURE_CHECKSUM= 0xbd;
> public final static int SERVICE_PICTURE = 0xbe;
> public final static int SERVICE_PICTURE_UPDATE = 0xc1;

They haven't included this changes cause they were working on a new lib called openymsg. Which was very
active at the end of last year but now they are no modifications since 27.Dec.2007.

I will send you the sources :slight_smile:

Cheers
damencho

Cristina Tabacaru wrote:

···

Hi Damian,

Thanx for the reply.
I get this exception only inside Android with the same test accounts.
But now I got into bigger trouble, I'm tring to solve it ...
Meanwhile, I'd like to have a look at yahoo lib sources.
Can u tell me where could I find them ?

cheers,
cristina

On Mon, Mar 31, 2008 at 6:04 PM, Damian Minkov <damencho@damencho.com > <mailto:damencho@damencho.com>> wrote:

    Hi Cristina,

    you mean that when executing the same tests outside android with the
    same test accounts(test configuration) you don't
    get this exception ?
    Can you see this "Incoming GTC" packet when executing outside
    Android ?

    Cheers
    damencho

    Cristina Tabacaru wrote:
    > Hi everyone,
    >
    > I'm working on the Android version of SC and for the moment I got
    > stuck with integrating MSN bundle.
    > As I don't know java MSN library so well I was hoping one of you
    could
    > give me a hint about it ...
    >
    > While running test on the MSN jar, more precisely in
    >
    *net.java.sip.communicator.slick.protocol.msn.TestOperationSetPresence
    > - postTestSubscribe
    >
    > * (The method would add a subscription for a contact =
    > *cristina_tabacaru30@hotmail.com
    <mailto:cristina_tabacaru30@hotmail.com>
    > <mailto:cristina_tabacaru30@hotmail.com
    <mailto:cristina_tabacaru30@hotmail.com>>*, wait for a
    > subscription event confirming the subscription, then change the
    status
    > of the newly added contact = *rodicalsc@hotmail.com
    <mailto:rodicalsc@hotmail.com>
    > <mailto:rodicalsc@hotmail.com <mailto:rodicalsc@hotmail.com>>*
    (which is actually the testerAgent) and
    > make sure that the corresponding notification events have been
    > generated.)
    >
    > I got the following exception:
    >
    /<logger>net.java.sip.communicator.impl.protocol.msn.ProtocolProviderServiceMsnImpl</logger>
    > SEVERE net.java.sip.communicator.util.Logger
    > <message>Error in Msn lib </message>
    > <exception>
    > <message>java.lang.IndexOutOfBoundsException</message>
    >
    > <class>java.util.ArrayList</class>
    > <method>get</method>
    > <line>339</line>
    >
    > <class>net.sf.jml.protocol.MsnMessage</class>
    > <method>getParam</method>
    > <line>85</line>
    >
    > <class>net.sf.jml.protocol.incoming.IncomingGTC</class>
    > <method>isNotifyMeWhenSomeoneAddedMe</method>
    > <line>47</line>
    >
    > <class>net.sf.jml.protocol.incoming.IncomingGTC</class>
    > <method>messageReceived</method>
    > <line>61</line>
    >
    > <class>net.sf.jml.protocol.MsnSession$1</class>
    > <method>messageReceived</method>
    > <line>109</line>
    >
    > <class>net.sf.jml.net.Session</class>
    > <method>fireMessageReceived</method>
    > <line>293</line>
    >
    > <class>net.sf.jml.net.Session</class>
    > <method>access$1200</method>
    > <line>32</line>
    >
    > <class>net.sf.jml.net.Session$MsgDispatcher</class>
    > <method>run</method>
    > <line>275</line>
    >
    > <class>java.lang.Thread</class>
    > <method>run</method>
    > <line>896</line>/
    >
    > The issue is that the IncomingGTC message has no parameters, so
    > MsnMessage.getParam method will search a parameter on index -1.
    > In the API they say an Incoming GTC is triggered " To notice of
    > OutgoingSYN or the response of OutgoingGTC and to indicate what
    to do
    > when someone adds you to their contact list." - but I don't have any
    > of this prior to the begining of the test so I don't know why it
    lacks
    > parameters. Here's a listing of the messages that have been
    generated
    > from the begining of the test till the exception:
    >
    /<logger>net.java.sip.communicator.slick.protocol.msn.TestOperationSetPresence</logger>
    > <message>Testing Subscription and Subscription Event
    > Dispatch.</message>
    >
    <logger>net.java.sip.communicator.impl.protocol.msn.ServerStoredContactListMsnImpl</logger>
    > <message>Adding contact rodicalsc@hotmail.com
    <mailto:rodicalsc@hotmail.com>
    > <mailto:rodicalsc@hotmail.com <mailto:rodicalsc@hotmail.com>> to
    parent=null</message>
    >
    <logger>net.java.sip.communicator.impl.protocol.msn.EventManager</logger>
    > <message>cristina_tabacaru30@hotmail.com
    <mailto:cristina_tabacaru30@hotmail.com>
    > <mailto:cristina_tabacaru30@hotmail.com
    <mailto:cristina_tabacaru30@hotmail.com>> outgoing ADC 6 AL
    > N=rodicalsc@hotmail.com <mailto:rodicalsc@hotmail.com>
    <mailto:rodicalsc@hotmail.com <mailto:rodicalsc@hotmail.com>>
    >
    <logger>net.java.sip.communicator.impl.protocol.msn.EventManager</logger>
    > <message>cristina_tabacaru30@hotmail.com
    <mailto:cristina_tabacaru30@hotmail.com>
    > <mailto:cristina_tabacaru30@hotmail.com
    <mailto:cristina_tabacaru30@hotmail.com>> outgoing ADC 7 FL
    > N=rodicalsc@hotmail.com <mailto:rodicalsc@hotmail.com>
    <mailto:rodicalsc@hotmail.com <mailto:rodicalsc@hotmail.com>>
    > F=rodicalsc@hotmail.com <mailto:rodicalsc@hotmail.com>
    <mailto:rodicalsc@hotmail.com <mailto:rodicalsc@hotmail.com>>
    >
    <logger>net.java.sip.communicator.impl.protocol.msn.EventManager</logger>
    > <message>cristina_tabacaru30@hotmail.com
    <mailto:cristina_tabacaru30@hotmail.com>
    > <mailto:cristina_tabacaru30@hotmail.com
    <mailto:cristina_tabacaru30@hotmail.com>> outgoing CHG 9 NLN
    1342472236
    >
    <logger>net.java.sip.communicator.impl.protocol.msn.EventManager</logger>
    > <message>cristina_tabacaru30@hotmail.com
    <mailto:cristina_tabacaru30@hotmail.com>
    > <mailto:cristina_tabacaru30@hotmail.com
    <mailto:cristina_tabacaru30@hotmail.com>> incoming : SYN 5
    > 2008-03-31T03:27:16.967-07:00 2008-03-31T01:25:39.763-07:00 12 1
    >
    <logger>net.java.sip.communicator.impl.protocol.msn.EventManager</logger>
    > <message>cristina_tabacaru30@hotmail.com
    <mailto:cristina_tabacaru30@hotmail.com>
    > <mailto:cristina_tabacaru30@hotmail.com
    <mailto:cristina_tabacaru30@hotmail.com>> outgoing ADC 8 AL
    > N=rodicalsc@hotmail.com <mailto:rodicalsc@hotmail.com>
    <mailto:rodicalsc@hotmail.com <mailto:rodicalsc@hotmail.com>>/
    >
    > The exception is thrown only on Android and I'm quite sure there
    must
    > be a class, that the MSN library is using, which has an erronated
    > implementation but I can't figure out where to search for it.
    >
    > Has anyone encountered a similar problem ?
    > How do you think I can work it out ?
    >
    > Thanx,
    > Cristina

    ---------------------------------------------------------------------
    To unsubscribe, e-mail:
    dev-unsubscribe@sip-communicator.dev.java.net
    <mailto:dev-unsubscribe@sip-communicator.dev.java.net>
    For additional commands, e-mail:
    dev-help@sip-communicator.dev.java.net
    <mailto:dev-help@sip-communicator.dev.java.net>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net