cancel
Showing results for 
Search instead for 
Did you mean: 

UltraliteJ17 - Attempted two active database requests

Former Member
0 Kudos

I'm working on an Android project which makes use of UltraliteJ library for database operations. Previously we are using UltraliteJ 17 library with openSSL version of 1.0.1Q. Since play store instructed developers to update the openSSL versions prior to 1.0.1r, we asked the SAP support and we got the upgraded version of UltraliteJ17 with OpenSSL version of 1.0.1t. After updating the new UltraliteJ17 (with openSSL 1.0.1t), i got the following exception while accessing the connection object.

UltraLiteJ Error[-298]: Attempted two active database requests

I know this error will raise only if we try to submit a database request while another request in progress.

The strange thing is, this error doesn't raised while using the previous UltraliteJ17(with openSSL 1.0.1q). And this error appears at random places while accessing the database.

Is there any behavioral changes in the new UltraliteJ17 library?

Is it any code changes need to be done to overcome this issue?

Kindly assist me. Any information will be helpful.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

The old build is 17.0.0.1358 and the new one is 17.0.4.2053.

regdomaratzki
Advisor
Advisor
0 Kudos

An ehancement was made in build 2000 of UltraLite such that we now allow requests on separate databases to run concurrently.

UltraLite changes

•UltraLite concurrency

When an UltraLite application opens multiple databases, requests on separate databases now run concurrently.

One of the side effects of this change is a tightening of the restrictions on allowing multiple threads in your application to execute queries at the same time.  Previously, the behaviour when you did this was undefined, but at the current build, an error will now be returned to better protect your data.  Looking over the section in the documentation on UltraLite Concurrency, I susecpt that your application has multiple threads accessing the same connection object and performing concurrent synchronization.  This will now return an error.

Reg

Former Member
0 Kudos

Thanks for your prompt reply. Now I got an idea about the error. I will check for the solution.

leadsupport
Member
0 Kudos

We have the same issue. The links are unavailable. Could you share where we can find them in the current documentation?

Thank you in advance!

chris_keating
Advisor
Advisor
0 Kudos

You must ensure that connections are not shared across threads. Each thread should have its own connection or use thread synchronization calls to ensure that the connection is only accessed by one thread at a time. I would also recommend you upgrade to current shipping builds to pick up security updates. the latest shipping release is SQL Anywhere 17.0 SP1 PL00 Build 6800.

Answers (0)