All Products
Search
Document Center

Tablestore:Error messages

Last Updated:Aug 16, 2024

Errors may be reported during your use of Tablestore API or SDK. This topic describes some common errors and how to resolve the issues.

Error message

Possible causes

Solutions

References

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

The OTSClient instance is shut down, causing all its I/O reactors to be shut down as well.

Check whether the OTSClient instance is shut down. If the OTSClient instance is shut down, reinitialize the OTSClient instance.

Initialize an OTSClient instance

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

The version 2.4.1 Protobuf library and version 4.0.2 httpasyncclient library on which Tablestore SDK for Java depends are in conflict with the same libraries in the application program.

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

Note

The classifier is jar-with-dependencies, which packages the HttpClient and Protobuf libraries by using rename package to remove the dependency on HttpClient and Protobuf.

<dependency>
    <groupId>com.aliyun.openservices</groupId>
    <artifactId>tablestore</artifactId>
    <version>Your current version</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

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

The wildcard-containing string is longer than 32 bytes in length.

Replace the query string. When you perform a wildcard query, the query string cannot exceed 32 bytes in length.

Wildcard query

field:xx must enable enable_sort_and_agg

The sorting and aggregation (enable_sort_and_agg=true) feature is not enabled for the corresponding fields when you create a search index.

Use the dynamic schema modification feature to enable sorting and aggregation for the fields based on which you want to perform queries. For more information, see Dynamically modify the schema of a search index.

[bool_query] sub query must not be null

Subconditions of the query are empty, with some required parameters left unconfigured.

Check parameter configurations to make sure that all subconditions are correctly configured.

Boolean query

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

A sorting method is specified on top of a token that is used to turn pages.

Remove the extra sorting method. When you use a token to perform paging during a search index-based query, the token is already encoded with a sorting field and you do not need to configure an extra sorting method.

Perform sorting and paging

[table ttl] must be bigger than or equal search index ttl

A search index is created for the table. The TTL of the table must be greater than or equal to the TTL of the search index.

Check whether the TTL of the table is smaller than the TTL of the search index.

  • If the TTL of the table is smaller than the TTL of the search index, you must reduce the TTL of the search index before you modify the TTL of the table.

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

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

The number of scanned rows or the size of scanned data exceeds the upper limit. This occurs when you use a non-partition key as a query condition when you use SQL to query data.

Important

The upper limit is 100,000 for the number of scanned rows, 128 MB for the size of scanned data, and 30 seconds for the scan duration in a single scan operation performed by executing a SQL statement.

When you use SQL to query data, make sure that the query conditions include the primary key columns and meet the leftmost matching principle. In addition, make sure that you use the limit parameter in the SQL statement to specify the maximum number of rows that can be returned.

If the query conditions do not include the primary key columns or meet the leftmost matching principle, you can accelerate the query by using one of the following methods. For more information, see Index selection policy.

  • If a secondary index can meet your requirements, such as inclusion of primary key columns in query conditions and satisfaction of the leftmost matching principle, we recommend that you create a secondary index to accelerate queries. For more information, see Overview.

  • If you specify an aggregation function, such as COUNT, SUM, or AVG, or specify filter conditions based on non-primary key columns in the query conditions, create a search index to accelerate the query. For more information, see Overview.

    If you create a search index for the data table and the error persists, check whether the search index includes the fields that are used for the query.

Query data

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

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

Install the javassist-x.x.x.jar package by using one of the following methods:

  • Install the javassist installation package javassist-x.x.x.jar and import the package to the project. For more information about the download path, see javassist. In javassist-x.x.x.jar, x.x.x indicates the version number of javassist. Download a javassist installation package based on your business requirements.

  • Add dependencies to your Maven project.

    Add the corresponding dependencies to the pom.xml file in the Maven project. The following sample code shows how to add content to <dependencies>. In this example, the 3.15.0-GA version is used.

    <!-- 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 by executing SQL statements

Disallow read index table in building base state

Existing data is read from the table for which the search index is created and synchronized to the search index. Data cannot be read from the search index before existing data is synchronized. You can read data from the search index only after existing data is synchronized to the search index. The time required to synchronize existing data is related to the size of data in the base table.

Read data from the search index after existing data in the table for which the search index is created is synchronized to the search index.

Checksum mismatch

Tablestore uses 64-bit integers. In 32-bit PHP, only the STRING type can be used to represent 64-bit INTEGER values. Therefore, Tablestore does not support 32-bit PHP. In Windows, PHP versions earlier than PHP 7 are not actually 64-bit.

When you use Tablestore SDK for PHP in Windows, ensure that the PHP version is PHP 7 or later. We recommend that you use PHP 7 to obtain the optimal performance.

You can use phpinfo() to check the value of Architecture in PHP configuration information to determine whether your PHP version supports 64-bit integers.

Install Tablestore SDK for PHP