cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with Android SQL Anywhere 17 libraries in my application

Former Member
0 Kudos

Hi All,

I have a android application which was using Sybase SQL Anywhere 16 client libraries to sync with back end Sybase sql anywhere 16 server.

Recently I have upgrade my backend to SQL Anywhere 17 & replaced the client libraries of 16 to 17, with no code change, since the API is all same.

But I am getting below error

16,2000,01.07.2016_14.13.25.451,Warning,ULjException in UltraLiteDBAccess.synchronize()

16,2000,01.07.2016_14.13.25.464,com.sap.ultralitejni17.implementation.JniException: UltraLiteJ Error[-1305]: MobiLink communication error -- code: 24, parameter: , system code: 0

com.sap.ultralitejni17.implementation.JniConnection.ulcSynchronize(Native Method)

com.sap.ultralitejni17.implementation.JniConnection.synchronize(Unknown Source)

com.mftp.bll.dbaccess.UltraLiteDBAccess.synchronize(UltraLiteDBAccess.java:259)

com.mftp.bll.dbaccess.transactiondeviceevent.MediaDeviceTrxSyncHandler.Sync(MediaDeviceTrxSyncHandler.java:228)

com.mftp.middleware.dbsynchronizer.SynchronizationHandler.handleMessage(SynchronizationHandler.java:43)

android.os.Handler.dispatchMessage(Handler.java:99)

android.os.Looper.loop(Looper.java:137)

com.mftp.middleware.dbsynchronizer.DBSynchronizer.run(DBSynchronizer.java:39)

16,30,01.07.2016_14.13.46.360,Critical,Ultralite DB Synchronization Failed due to certificate failed SERVER_CERTIFICATE_NOT_TRUSTED

16,30,01.07.2016_14.13.46.401,com.sap.ultralitejni17.implementation.JniException: UltraLiteJ Error[-1305]: MobiLink communication error -- code: 24, parameter: , system code: 0

com.sap.ultralitejni17.implementation.JniConnection.ulcSynchronize(Native Method)

com.sap.ultralitejni17.implementation.JniConnection.synchronize(Unknown Source)

com.mftp.bll.dbaccess.UltraLiteDBAccess.synchronize(UltraLiteDBAccess.java:259)

com.mftp.bll.dbaccess.transactiondeviceevent.MediaDeviceTrxSyncHandler.Sync(MediaDeviceTrxSyncHandler.java:228)

com.mftp.middleware.dbsynchronizer.SynchronizationHandler.handleMessage(SynchronizationHandler.java:43)

android.os.Handler.dispatchMessage(Handler.java:99)

android.os.Looper.loop(Looper.java:137)

com.mftp.middleware.dbsynchronizer.DBSynchronizer.run(DBSynchronizer.java:39)

Need urgent help!

Accepted Solutions (0)

Answers (2)

Answers (2)

tom_slee
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Viresh,

There has been a behaviour change in SQLA 17 in how the host names in the server certificate are verified in the client. Maybe you have hit this change.

In SQLA 17, the host name of the client must match one of the host names on the server certificate. The client should use one or more of the protocol options: certificate_name, certificate_company, or certificate_unit to verify the host name in the server's certificate or, if it doesn't care, set skip_certificate_name_check=on.  These go in the network protocol if you are using UltraLite, eg ULSyncParms.StreamParms="skip_certificate_name_check=on;other_options"

Hope that helps.

former_member207653
Active Participant
0 Kudos

http://service.sap.com/sap/support/notes/2134354

It could be the same issue documented in KBA 2134354. Since build 16.0.0.1690, the secure communication libraries were changed from Certicom to OpenSSL. This requires the root CA certificate to be specified using trusted_certificates file client side

Former Member
0 Kudos

Hi,

This has been taken care in our code, wherein we pass the root certificate as trusted certificate.

But still we get this error. Has API changed as part of SQL Anywhere 17 client for the same?

Also I am unable to open the link provided.

Can you please help?

former_member207653
Active Participant
0 Kudos

http://dcx.sap.com/index.html#sqla170/en/html/8158be656ce2101482a8c1dc33218eeb.html

http://dcx.sap.com/index.html#sqla170/en/html/80f119a56ce210149f9ac95c6af384ed.html

Server certificate not trusted error and changes in UltraLite17  are documented in the links above

About the certificate that you use client side and specified by trusted_certificates, have you verified it is the correct root CA using openssl s_client? This would diplay the certificate chain.

Former Member
0 Kudos

Hi,

Thanks for sharing the documentation. Yes the root certificate is correct.

former_member207653
Active Participant
0 Kudos

Hi Viresh,

Can you show us the output of openssl s_client please?

Thank you