Error messages

更新时间:
复制 MD 格式

You may receive error messages when you call an API or SDK to use Tablestore features. This topic describes common error messages and their solutions.

Error message

Possible cause

Solution

Related documentation

java.lang.IllegalStateException: Request cannot be executed; I/O reactor status: STOPPED

This error usually occurs because shutdown was called on the OTSClient, and its internal I/O reactors have been shut down.

Do not call an OTSClient that is in the shutDown state. If the OTSClient is already shut down, you must re-initialize it before you perform the operation.

Initialize an OTSClient

java.lang.UnsupportedOperationException: This is supposed to be overridden by subclassed

The Tablestore SDK for Java depends on the protobuf library version 2.4.1 and the httpasyncclient library version 4.0.2. These libraries can conflict with the same libraries that are included in your application.

Add the following dependency to the pom.xml file in your Maven project.

Note

The classifier is jar-with-dependencies. It packages the dependent HttpClient and protobuf libraries by renaming their packages. This process removes the dependencies on HttpClient and protobuf.

<dependency>
    <groupId>com.aliyun.openservices</groupId>
    <artifactId>tablestore</artifactId>
    <version>Replace with the version you are currently using</version>
    <classifier>jar-with-dependencies</classifier>
    <exclusions>
        <exclusion>
            <groupId>com.google.protobuf</groupId>
            <artifactId>protobuf-java</artifactId>
        </exclusion>
        <exclusion>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpasyncclient</artifactId>
        </exclusion>
    </exclusions>
</dependency>    

Install Tablestore SDK for Java

The count of attribute columns exceeds the maximum:128

When you write data to a Tablestore data table, a row can have a maximum of 1,024 columns. However, when you use TableStoreWriter, the client has a default limit of 128 columns for a write operation.

When you use the Java SDK to construct a TableStoreWriter client, you can increase the default number of columns written per row by modifying the MaxColumnsCount parameter.

Use TableStoreWriter to write data with high concurrency and high throughput

length of field value is longer than 32 for the [WILDCARD_QUERY] query

The length of the string that contains a wildcard character exceeds 32 bytes.

When you use a wildcard query, the value to match can be a string that contains a wildcard character. The length of this string cannot exceed 32 bytes. Replace the query string.

Wildcard query

field:xx must enable enable_sort_and_agg

When you created the search index, you did not enable the sorting and statistical aggregation feature for the corresponding field. This means `enable_sort_and_agg` was not set to `true`.

Use the dynamic schema modification feature of the search index to enable sorting and statistical aggregation for the field. For more information, see Dynamically modify a schema.

[bool_query] sub query must not be null

The subquery condition in the query is empty because a required parameter is not configured.

Check the parameter settings for the query conditions in your code. Make sure that all subquery conditions are configured correctly.

Important

If the problem persists after you check your code, contact us by joining DingTalk group 23307953 (Tablestore Technical Exchange Group-2) or 36165029092 (Tablestore Technical Support Group-3).

Boolean query

can't set [sort] when [token] is not null

The sort parameter was set when a token was used for pagination.

When you query data from a search index and use a token for pagination, the token already contains the encoded sorting field. Therefore, do not set the sort parameter again.

Sorting and pagination

The TTL of the table must be greater than or equal to that of the search index.

A search index exists on the data table. The TTL of the data table must be greater than or equal to the TTL of the search index.

When you adjust the TTL of a data table, confirm whether the new TTL is less than the TTL of the search index.

  • If the new data table TTL is less than the search index TTL, you must decrease both the search index TTL and the data table TTL. You must adjust the search index TTL first, and then adjust the data table TTL.

  • If the new data table TTL is greater than or equal to the search index TTL, you can modify the data table TTL directly.

The sql scanned rows of main table exceeds the quota, main table rows quota is 100000

If you use a non-partition key as a condition when you query data using SQL, a full table scan is performed. The number of scanned rows or the data volume may exceed the limit.

Important

A single SQL scan supports a maximum of 100,000 rows, a maximum data volume of 128 MB, and a maximum duration of 30 seconds.

When you query data using SQL, make sure that the query condition includes primary key columns and follows the leftmost prefix matching principle. You can also add a limit parameter to the SQL statement to control the number of returned rows.

If the query condition does not meet these requirements, you can also accelerate the query in the following ways. For more information, see Index selection policy.

  • If creating a secondary index allows the query condition to include primary key columns and follow the leftmost prefix matching principle, you can create a secondary index to accelerate the query. For more information, see Secondary index.

  • If the query condition includes aggregate functions such as count, sum, or avg, a group by clause, or a filter query based on non-primary key columns, you can create a search index to accelerate the query. For more information, see Search index.

    If this error persists after you create a search index for the data table, check whether the search index includes all fields used in the query.

Use SQL to query data

Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]

The javassist-x.x.x.jar package is missing.

You can install the javassist-x.x.x.jar package in one of the following two ways.

  • Download the javassist installation package (javassist-x.x.x.jar) and import it into your project. For the download path, see javassist installation package. In javassist-x.x.x.jar, x.x.x represents the version number of javassist. Make sure that you download the installation package of the required version.

  • Add a dependency in your Maven project.

    Add the corresponding dependency to the pom.xml file of your Maven project. The following example uses version 3.15.0-GA. Add the following content within the <dependencies> tags:

    <!-- https://mvnrepository.com/artifact/org.javassist/javassist -->
    <dependency>
        <groupId>org.javassist</groupId>
        <artifactId>javassist</artifactId>
        <version>3.15.0-GA</version>
    </dependency>

Use Hibernate to query data with SQL

Disallow read index table in building base state

Building a secondary index requires reading historical data from the data table and synchronizing it to the index table. You cannot read the index table until the data synchronization is complete. After the synchronization is complete, you can read the index table as normal. The time required for data synchronization depends on the data volume of the table.

You must wait until the secondary index is built and the historical data is synchronized before you can read the data.

Checksum mismatch

Tablestore integers are 64-bit. However, 32-bit PHP can only represent 64-bit integers as strings. Therefore, 32-bit PHP is not supported. In addition, on Windows systems, integer types in PHP versions earlier than PHP 7 are not true 64-bit integers.

When you use the Tablestore SDK for PHP on a Windows system, you must use a 64-bit version of PHP 7 or later. For optimal performance, we recommend that you use PHP 7.

You can use phpinfo() to check the Architecture type in the PHP configuration information to determine whether your PHP version meets the requirements.

Install Tablestore SDK for PHP