无法使用 java 驱动程序核心在 YugabyteDB 中运行 findAll 查询



[用户在YugabyteDB社区Slack上发布的问题]

我们正在使用YugabyteDB yugabyte-2.9.0和java-driver-core4.6.0-yb-6版本,但无法运行findAll查询,得到以下异常:

java.lang.ArrayIndexOutOfBoundsException
at com.datastax.oss.driver.internal.core.cql.EmptyColumnDefinitions.get(EmptyColumnDefinitions.java:41)
at com.yugabyte.oss.driver.internal.core.loadbalancing.PartitionAwarePolicy.getQueryPlan(PartitionAwarePolicy.java:107)
at com.yugabyte.oss.driver.internal.core.loadbalancing.PartitionAwarePolicy.newQueryPlan(PartitionAwarePolicy.java:75)
at com.datastax.oss.driver.internal.core.metadata.LoadBalancingPolicyWrapper.newQueryPlan(LoadBalancingPolicyWrapper.java:155)
at com.datastax.oss.driver.internal.core.cql.CqlRequestHandler.onThrottleReady(CqlRequestHandler.java:211)
at com.datastax.oss.driver.internal.core.session.throttling.PassThroughRequestThrottler.register(PassThroughRequestThrottler.java:52)
at com.datastax.oss.driver.internal.core.cql.CqlRequestHandler.<init>(CqlRequestHandler.java:191)
ColumnDefinitions is not getting populated properly (edited) 

代码:

@Test
public  void findAllAttributeTest(){
List<MyClass> list = myClassRepository.findAll();
Assert.assertNotNull(list);
}

And table schema:

CREATE TABLE my_list.attribute (
id uuid PRIMARY KEY,
name text,
created_at timestamp,
updated_at timestamp,
fields jsonb
) WITH transactions = {'enabled': 'true'};

升级到https://mvnrepository.com/artifact/com.yugabyte/java-driver-core/4.6.0-yb-9?应该修复你看到的行为