cancel
Showing results for 
Search instead for 
Did you mean: 

How catch synchronization errors from SUP Server

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

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

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi sathiya, Above sample code is any platform specific?  Where exactly we suppose to write this code to handle errors?  Rgrds Jitendra
Former Member
0 Kudos

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...

Former Member
0 Kudos

I think so. That is a problem because the user will never know the true error cause.