on 08-20-2013 10:19 PM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.