cancel
Showing results for 
Search instead for 
Did you mean: 

UltraliteJ 17 - Attempted two active database requests

Former Member
2,620

I'm working on an Android project which makes use of UltraliteJ library for database operations. Previously we are using UltraliteJ 17 (Build number - 17.0.0.1358) 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 (Build number - 17.0.4.2053) 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 (Build number - 17.0.0.1358 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 (Build number - 17.0.4.2053)?

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

Kindly assist me. Any information will be helpful.

VolkerBarth
Contributor

Can't tell on that - but you may have a look at the EBF readme file and look for changes between those two EBFs you are using here - note, it's always helpful to tell us the exact build number (17.0.4.2053 or whatever...) of the versions you are using.

Former Member
0 Kudos

Thank you for your quick response. I will check the readme files. Since I had the Jar & SO files only, I am not sure about the build numbers. I asked for it. I will edit the question with build number once I got it.

Former Member
0 Kudos

The old build is 17.0.0.1358 and the new one is 17.0.4.2053. I've updated my question, please check it.

Accepted Solutions (1)

Accepted Solutions (1)

This error (SQLE_DOUBLE_REQUEST) is newly diagnosed in 17.0.4.

In the underlying UL runtime, this error is signalled when two requests are made concurrently (on different threads) using the same SQLCA object, or if the same SQLCA object is initialized twice. A SQLCA cannot be shared by multiple threads at the same time, though different threads may use the same SQLCA at different times.

Now, for most APIs, including UltraLiteJ, the SQLCA is hidden inside the connection object, so we can just talk about connections.

So, UL is telling you that it noticed you are sharing a connection between threads concurrently. You must organize your app so that a connection is only used by one thread at one time. If you want to run concurrent requests, that's fine, but you must use multiple connections.

It's expected that this error may appear random because of the nature of threading.

UL supports multiple concurrent requests, but only on separate connections.

Former Member
0 Kudos

Thanks for you answer. I am using a single connection object throughout the app and this may cause this exception. I will try to use multiple connections.

Answers (0)