Comments (4)
@Test
public void test02() {
PageHelper.startPage(1, 2, false).setOrderBy("equipment_id asc");
List<EquipmentOee> list = service.list();
System.out.println(list.size());
}
Caused by: java.sql.SQLException: Unknown exception: Index 2 out of bounds for length 2
at org.apache.shardingsphere.infra.util.exception.external.sql.ShardingSphereSQLException.toSQLException(ShardingSphereSQLException.java:62)
at org.apache.shardingsphere.dialect.SQLExceptionTransformEngine.toSQLException(SQLExceptionTransformEngine.java:62)
at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.execute(ShardingSpherePreparedStatement.java:416)
at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44)
at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java)
at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:65)
at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:80)
at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:65)
at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:336)
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:158)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:110)
at com.github.pagehelper.util.ExecutorUtil.pageQuery(ExecutorUtil.java:215)
at com.github.pagehelper.PageInterceptor.intercept(PageInterceptor.java:161)
at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:59)
at jdk.proxy3/jdk.proxy3.$Proxy125.query(Unknown Source)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:154)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:147)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:142)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:425)
... 101 more
Caused by: java.lang.IndexOutOfBoundsException: Index 2 out of bounds for length 2
at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266)
at java.base/java.util.Objects.checkIndex(Objects.java:361)
at java.base/java.util.ArrayList.get(ArrayList.java:427)
at org.apache.shardingsphere.infra.binder.segment.select.pagination.PaginationContext.getValue(PaginationContext.java:56)
at org.apache.shardingsphere.infra.binder.segment.select.pagination.PaginationContext.<init>(PaginationContext.java:51)
at org.apache.shardingsphere.infra.binder.segment.select.pagination.engine.LimitPaginationContextEngine.createPaginationContext(LimitPaginationContextEngine.java:38)
at org.apache.shardingsphere.infra.binder.segment.select.pagination.engine.PaginationContextEngine.createPaginationContext(PaginationContextEngine.java:57)
at org.apache.shardingsphere.infra.binder.statement.dml.SelectStatementContext.setUpParameters(SelectStatementContext.java:388)
at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.createQueryContext(ShardingSpherePreparedStatement.java:559)
at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.execute(ShardingSpherePreparedStatement.java:393)
... 121 more
from shardingsphere.
@zhangheng0027 thank you for your feedback. Can you provide your configuration and table init sql to help us reproduce this bug?
from shardingsphere.
init sql
CREATE TABLE equipment_oee (
serial_no bigint NOT NULL,
equipment_id nvarchar(100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
statistics_cycle nvarchar(10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
statistics_time nvarchar(100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
oee_ratio float DEFAULT NULL NULL,
availability float DEFAULT NULL NULL,
effectiveness_performance float DEFAULT NULL NULL,
quality_ratio float DEFAULT NULL NULL,
actual_production_time bigint DEFAULT NULL NULL,
plan_occupancy_time bigint DEFAULT NULL NULL,
beat_time float DEFAULT NULL NULL,
produced_quantity int DEFAULT NULL NULL,
good_quantity int DEFAULT NULL NULL,
CONSTRAINT PK_equipment_oee_serial_no PRIMARY KEY (serial_no)
);
conf
dataSources:
master:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
jdbcUrl: jdbc:sqlserver://localhost:1433;DatabaseName=oee;encrypt=false;
username: sa
password: Aa123456
props:
sql-show: true
rules:
- !SINGLE
tables:
- master.*
defaultDataSource: master
from shardingsphere.
Hi @zhangheng0027, can you test with master branch?
from shardingsphere.
Related Issues (20)
- org.yaml.snakeyaml.representer.Representer: method 'void <init>()' not found HOT 16
- spring-boot-starter-parent 3.2.4 use shardingsphere-jdbc-core 5.4.1 throw NoSuchMethodError HOT 1
- database-strategy:none not working HOT 6
- NPE when convert yaml configuration with empty data sources or empty rules
- Load single table should check storage units are not empty
- E2E test,build docker image permission denied. HOT 1
- How to start Native test for jdbc-encrypt HOT 1
- Under one mysql instance, two database schemas, how to join tables cross schemas HOT 2
- Add dependency-check-maven to shardingsphere HOT 2
- how to onlu sharding database? HOT 1
- Version 5.4.1 of ShardingSphere references SnakeYAML version 1.33, which has a security vulnerability. How to upgrade it? HOT 3
- TableNotExistsException: Table or view *** does not exist HOT 1
- some question about Readwrite-splitting HOT 1
- null point error when the table name is unstandardized HOT 1
- 5.4.1 CHAR_DIGEST_LIKE error HOT 8
- Image not loading HOT 1
- gbase 8s Compatibility issues HOT 2
- Database password parsed failed HOT 6
- Use test container instead of docker compose in Agent e2e test
- Native test only support H2?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shardingsphere.