<p dir="auto">vsersion: sharing proxy 5.0.0-RC</p>
<p dir="auto">here server.xml:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="scaling:
  blockQueueSize: 10000
  workerThread: 40
  clusterAutoSwitchAlgorithm:
    type: IDLE
    props:
      incremental-task-idle-minute-threshold: 30
  dataConsistencyCheckAlgorithm:
    type: DEFAULT

mode:
  type: Cluster
  repository:
    type: ZooKeeper
    props:
      namespace: governance_ds
      server-lists: local.zookeeper.cn:2181
      retryIntervalMilliseconds: 500
      timeToLiveSeconds: 60
      maxRetries: 3
      operationTimeoutMilliseconds: 500
  overwrite: false

rules:
  - !AUTHORITY
    users:
      - root@%:123456
      - test@%:yunnex
      - sharding@:sharding
    provider:
      type: ALL_PRIVILEGES_PERMITTED

  - !TRANSACTION
    defaultType: LOCAL

props:
  max-connections-size-per-query: 1
  kernel-executor-size: 16  # Infinite by default.
  proxy-frontend-flush-threshold: 128  # The default value is 128.
  proxy-opentracing-enabled: false
  proxy-hint-enabled: false
  sql-show: false
  check-table-metadata-enabled: true
  lock-wait-timeout-milliseconds: 50000 # The maximum time to wait for a lock
  show-process-list-enabled: true
    # Proxy backend query fetch size. A larger value may increase the memory usage of ShardingSphere Proxy.
  # The default value is -1, which means set the minimum value for different JDBC drivers.
  proxy-backend-query-fetch-size: -1
  check-duplicate-table-enabled: false
  sql-comment-parse-enabled: false
  proxy-frontend-executor-size: 0 # Proxy frontend executor size. The default value is 0, which means let Netty decide.
    # Available options of proxy backend executor suitable: OLAP(default), OLTP. The OLTP option may reduce time cost of writing packets to client, but it may increase the latency of SQL execution
  # if client connections are more than proxy-frontend-netty-executor-size, especially executing slow SQL.
  proxy-backend-executor-suitable: OLAP
  proxy-frontend-max-connections: 20 # Less than or equal to 0 means no limitation.
  sql-federation-enabled: false"><pre class="notranslate"><code class="notranslate">scaling:
  blockQueueSize: 10000
  workerThread: 40
  clusterAutoSwitchAlgorithm:
    type: IDLE
    props:
      incremental-task-idle-minute-threshold: 30
  dataConsistencyCheckAlgorithm:
    type: DEFAULT

mode:
  type: Cluster
  repository:
    type: ZooKeeper
    props:
      namespace: governance_ds
      server-lists: local.zookeeper.cn:2181
      retryIntervalMilliseconds: 500
      timeToLiveSeconds: 60
      maxRetries: 3
      operationTimeoutMilliseconds: 500
  overwrite: false

rules:
  - !AUTHORITY
    users:
      - root@%:123456
      - test@%:yunnex
      - sharding@:sharding
    provider:
      type: ALL_PRIVILEGES_PERMITTED

  - !TRANSACTION
    defaultType: LOCAL

props:
  max-connections-size-per-query: 1
  kernel-executor-size: 16  # Infinite by default.
  proxy-frontend-flush-threshold: 128  # The default value is 128.
  proxy-opentracing-enabled: false
  proxy-hint-enabled: false
  sql-show: false
  check-table-metadata-enabled: true
  lock-wait-timeout-milliseconds: 50000 # The maximum time to wait for a lock
  show-process-list-enabled: true
    # Proxy backend query fetch size. A larger value may increase the memory usage of ShardingSphere Proxy.
  # The default value is -1, which means set the minimum value for different JDBC drivers.
  proxy-backend-query-fetch-size: -1
  check-duplicate-table-enabled: false
  sql-comment-parse-enabled: false
  proxy-frontend-executor-size: 0 # Proxy frontend executor size. The default value is 0, which means let Netty decide.
    # Available options of proxy backend executor suitable: OLAP(default), OLTP. The OLTP option may reduce time cost of writing packets to client, but it may increase the latency of SQL execution
  # if client connections are more than proxy-frontend-netty-executor-size, especially executing slow SQL.
  proxy-backend-executor-suitable: OLAP
  proxy-frontend-max-connections: 20 # Less than or equal to 0 means no limitation.
  sql-federation-enabled: false
</code></pre></div>
<p dir="auto">start log:<br>
[INFO ] 2021-11-04 14:04:13.919 [main-EventThread] o.a.c.f.state.ConnectionStateManager - State change: CONNECTED<br>
[INFO ] 2021-11-04 14:04:14.046 [main-EventThread] o.a.c.framework.imps.EnsembleTracker - New config event received: {}<br>
[INFO ] 2021-11-04 14:04:14.046 [main-EventThread] o.a.c.framework.imps.EnsembleTracker - New config event received: {}<br>
WARNING: An illegal reflective access operation has occurred<br>
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/C:/Users/Awoo/.m2/repository/org/codehaus/groovy/groovy/2.4.19/groovy-2.4.19-indy.jar) to method java.lang.Object.finalize()<br>
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass<br>
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations<br>
WARNING: All illegal access operations will be denied in a future release<br>
Thanks for using Atomikos! Evaluate <a href="http://www.atomikos.com/Main/ExtremeTransactions" rel="nofollow">http://www.atomikos.com/Main/ExtremeTransactions</a> for advanced features and professional support<br>
or register at <a href="http://www.atomikos.com/Main/RegisterYourDownload" rel="nofollow">http://www.atomikos.com/Main/RegisterYourDownload</a> to disable this message and receive FREE tips &amp; advice</p>
<h2 dir="auto">Bug Report</h2>
<p dir="auto"><strong>For English only</strong>, other languages will not accept.</p>
<p dir="auto">Before report a bug, make sure you have:</p>
<ul dir="auto">
<li>Searched open and closed <a href="https://github.com/apache/shardingsphere/issues">GitHub issues</a>.</li>
<li>Read documentation: <a href="https://shardingsphere.apache.org/document/current/en/overview" rel="nofollow">ShardingSphere Doc</a>.</li>
</ul>
<p dir="auto">Please pay attention on issues you submitted, because we maybe need more details.<br>
If no response anymore and we cannot reproduce it on current information, we will <strong>close it</strong>.</p>
<p dir="auto">Please answer these questions before submitting your issue. Thanks!</p>
<h3 dir="auto">Which version of ShardingSphere did you use?</h3>
<p dir="auto">5.0.0-beta</p>
<h3 dir="auto">Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?</h3>
<p dir="auto">ShardingSphere-JDBC</p>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">The query field has a placeholder<br>
for example:<br>
String sql= "select name,? from t_order"<br>
PreparedStatement query1 = connection.prepareStatement(sql);<br>
query.setString(1,"123");<br>
ResultSet rs = query.executeQuery();</p>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto">report an error</p>
<h3 dir="auto">Reason analyze (If you can)</h3>
<p dir="auto">com.google.common.util.concurrent.UncheckedExecutionException: java.lang.ClassCastException: org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.simple.ParameterMarkerExpressionSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.simple.LiteralExpressionSegment<br>
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2218)<br>
at com.google.common.cache.LocalCache.get(LocalCache.java:4147)<br>
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4151)<br>
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:5140)<br>
at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:5146)<br>
at org.apache.shardingsphere.infra.parser.sql.SQLStatementParserEngine.parse(SQLStatementParserEngine.java:48)<br>
at org.apache.shardingsphere.infra.parser.ShardingSphereSQLParserEngine.parse0(ShardingSphereSQLParserEngine.java:67)<br>
at org.apache.shardingsphere.infra.parser.ShardingSphereSQLParserEngine.parse(ShardingSphereSQLParserEngine.java:56)<br>
at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.(ShardingSpherePreparedStatement.java:161)<br>
at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.(ShardingSpherePreparedStatement.java:133)<br>
at org.apache.shardingsphere.driver.jdbc.core.connection.ShardingSphereConnection.prepareStatement(ShardingSphereConnection.java:183)</p>
<h3 dir="auto">Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.</h3>
<h3 dir="auto">Example codes for reproduce this issue (such as a github link).</h3>