Pancratius opened a new issue, #19795:
URL: https://github.com/apache/shardingsphere/issues/19795

   ## Bug Report
   
   **For English only**, other languages will not accept.
   
   Before report a bug, make sure you have:
   
   - Searched open and closed [GitHub 
issues](https://github.com/apache/shardingsphere/issues).
   - Read documentation: [ShardingSphere 
Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   Please pay attention on issues you submitted, because we maybe need more 
details. 
   If no response anymore and we cannot reproduce it on current information, we 
will **close it**.
   
   Please answer these questions before submitting your issue. Thanks!
   
   ### Which version of ShardingSphere did you use?
   `            <dependency>
                   <groupId>org.apache.shardingsphere</groupId>
                   
<artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
                   <version>5.1.1</version>
               </dependency>
   `
   
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   
   `ShardingSphere-JDBC`
   
   ### Expected behavior
   `
   natvie SQL query : SELECT * FROM record  WHERE name LIKE ?  escape '!'  
LIMIT ? OFFSET ? 
   `
   
   ### Actual behavior
   `
   java.lang.ClassCastException: java.lang.String cannot be cast to 
java.lang.Integer
        at 
org.apache.shardingsphere.infra.binder.segment.select.pagination.PaginationContext.getValue(PaginationContext.java:57)
        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:338)
        at 
org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.createLogicSQL(ShardingSpherePreparedStatement.java:478)
        at 
org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.executeQuery(ShardingSpherePreparedStatement.java:207)
        at 
org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:57)
        at org.hibernate.loader.Loader.getResultSet(Loader.java:2297)
        at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:2050)
        at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:2012)
        at org.hibernate.loader.Loader.doQuery(Loader.java:948)
        at 
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:349)
        at org.hibernate.loader.Loader.doList(Loader.java:2843)
        at org.hibernate.loader.Loader.doList(Loader.java:2825)
        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2657)
        at org.hibernate.loader.Loader.list(Loader.java:2652)
        at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:338)
        at 
org.hibernate.internal.SessionImpl.listCustomQuery(SessionImpl.java:2141)
        at 
org.hibernate.internal.AbstractSharedSessionContract.list(AbstractSharedSessionContract.java:1169)
        at 
org.hibernate.query.internal.NativeQueryImpl.doList(NativeQueryImpl.java:176)
        at 
org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1604)
        at org.hibernate.query.Query.getResultList(Query.java:165)
        at 
org.springframework.data.jpa.repository.query.JpaQueryExecution$CollectionExecution.doExecute(JpaQueryExecution.java:126)
        at 
org.springframework.data.jpa.repository.query.JpaQueryExecution.execute(JpaQueryExecution.java:88)
        at 
org.springframework.data.jpa.repository.query.AbstractJpaQuery.doExecute(AbstractJpaQuery.java:155)
        at 
org.springframework.data.jpa.repository.query.AbstractJpaQuery.execute(AbstractJpaQuery.java:143)
   `
   
   ### Reason analyze (If you can)
   `
   SELECT * FROM record  WHERE name LIKE ?  escape '!'  LIMIT ? OFFSET ? 
   `
   throw java.lang.ClassCastException: java.lang.String cannot be cast to 
java.lang.Integer
   
   
   but 
   `
   SELECT * FROM record  WHERE name LIKE ?   LIMIT ? OFFSET ? 
   `
   run success.
   
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   
   ### Example codes for reproduce this issue (such as a github link).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to