Skip to Content
author's profile photo Former Member
Former Member

How catch synchronization errors from SUP Server

Hi,

I'm working in a native application (on Windows Mobile 6.5) that is connect to a SUP Server 2.2. My application use "Personalization keys" to authenticate the MBOs to SAP when synchronize.

If the user is correctly authenticate in native application, then the synchronization works fine, but when the user introduce a incorrect login or password, then the synchronization fails. That's OK.

My problem is when the synchronization fails. The Generated Native API throws a generic Synchronization Error without specific error description (client/device side), but in the SUP Server side the server log shows the stacktrace with the real error description.

Client/Device side example:

iAnywhere.Data.UltraLite.ULException: SQLE_SERVER_SYNCHRONIZATION_ERROR

at iAnywhere.Data.UltraLite.ULConnection.RuntimeErrorCheck()

at iAnywhere.Data.UltraLite.ULConnection.Synchronize()

at com.sybase.afx.db.ConnectionUtil.Synchronize(ConnectionWrapper dbConn, SyncStatusListener listener, Connection connection, String[]

...

Server side example:

2013-08-20 13:51:37.876 WARN Other Thread-191 [NextGen2.server.NextGen2DB]{"_op":"C","level":5,"code":401,"eisCode":"0","message":"com.sap.conn.rfc.exceptions.RfcGetException:Name or password is incorrect (repeat logon)","component":"NextGen2DB","entityKey":null,"operation":"synchronize","requestId":null,"timestamp":"2013-08-20 18:51:37.876","messageId":0,"_rc":0}

Please help me. I need show to user the real error detail like SUP Server catch from SAP exactly.

Thanks.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Aug 23, 2013 at 04:33 AM

    Hi

    Before doing synchronization you should check the credentials and network. And write your own exception handler method to display the synch error.

    Example:

    if

    (!isNetworkAvailable())

    {

    closeSyncRecordForFailiure(sync, "Network connection is not available");

    throw new Exception("Network connection is not available");

    }

    closeSyncRecordForFailiure(sync, "Could not establish connection to the server");

    throw new Exception("Could not establish connection to the server");

    for

    (com.sybase.persistence.LogRecord l:logs)

    {

    System.

    out.println(l.getComponent()+" "+l.getEntityKey()+" "+l.getMessage()+" "+l.getCode()+" "+l.getMessageId());

    }

    This is the example for getting logs of your application and display the exact message which you want

    Regards

    Sathiya

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 22, 2013 at 04:01 PM

    Jorge,

    we have the exact same issue. We just assumed all such synchronization errors are related to user/password issues, and send a generic "Incorrect credentials" message. Of course, sometimes when the cause for the sync error is some other thing (i.e., connectivity problems between SAP and SUP, or timeouts), we can't really catch those exceptions so we still send the Incorrect Credentials message.

    I believe that the SUP Workspace is able to show the correct error messages because it directly uses JCo to connect to the SAP backend. On SUP, all exceptions are thrown by Mobilink (for synchronization purposes) so I guess there's nothing to do... 😔

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.