apache / incubator-seata

:fire: Seata is an easy-to-use, high-performance, open source distributed transaction solution.
https://seata.apache.org/
Apache License 2.0
25.35k stars 8.78k forks source link

整合oracle数据库mybatis-plus使用GlobalTransactional注解后ArrayIndexOutOfBoundsException #3239

Closed miqiang1986 closed 4 years ago

miqiang1986 commented 4 years ago

Ⅰ. Issue Description

springcloud项目。使用的是oracle数据库,整合mybatis-plus。不使用GlobalTransactional注解的insert都没有问题,使用GlobalTransactional注解后ArrayIndexOutOfBoundsException

Ⅱ. Describe what happened

Caused by: java.lang.ArrayIndexOutOfBoundsException: 20
        at oracle.jdbc.driver.OracleSql.computeBasicInfo(OracleSql.java:950) ~[ojdbc6-11.2.0.1.0.jar!/:Oracle JDBC Driver version - "11.1.0.7.0-Production"]
        at oracle.jdbc.driver.OracleSql.getSqlKind(OracleSql.java:623) ~[ojdbc6-11.2.0.1.0.jar!/:Oracle JDBC Driver version - "11.1.0.7.0-Production"]
        at oracle.jdbc.driver.OraclePreparedStatement.<init>(OraclePreparedStatement.java:1212) ~[ojdbc6-11.2.0.1.0.jar!/:Oracle JDBC Driver version - "11.1.0.7.0-Production"]
        at oracle.jdbc.driver.T4CPreparedStatement.<init>(T4CPreparedStatement.java:28) ~[ojdbc6-11.2.0.1.0.jar!/:Oracle JDBC Driver version - "11.1.0.7.0-Production"]
        at oracle.jdbc.driver.T4CDriverExtension.allocatePreparedStatement(T4CDriverExtension.java:68) ~[ojdbc6-11.2.0.1.0.jar!/:Oracle JDBC Driver version - "11.1.0.7.0-Production"]
        at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:3140) ~[ojdbc6-11.2.0.1.0.jar!/:Oracle JDBC Driver version - "11.1.0.7.0-Production"]
        at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:3042) ~[ojdbc6-11.2.0.1.0.jar!/:Oracle JDBC Driver version - "11.1.0.7.0-Production"]
        at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:6022) ~[ojdbc6-11.2.0.1.0.jar!/:Oracle JDBC Driver version - "11.1.0.7.0-Production"]
        at com.alibaba.druid.filter.FilterChainImpl.connection_prepareStatement(FilterChainImpl.java:685) ~[druid-1.1.12.jar!/:1.1.12]
        at com.alibaba.druid.filter.FilterAdapter.connection_prepareStatement(FilterAdapter.java:962) ~[druid-1.1.12.jar!/:1.1.12]
        at com.alibaba.druid.filter.FilterEventAdapter.connection_prepareStatement(FilterEventAdapter.java:176) ~[druid-1.1.12.jar!/:1.1.12]
        at com.alibaba.druid.filter.FilterChainImpl.connection_prepareStatement(FilterChainImpl.java:681) ~[druid-1.1.12.jar!/:1.1.12]
        at com.alibaba.druid.wall.WallFilter.connection_prepareStatement(WallFilter.java:344) ~[druid-1.1.12.jar!/:1.1.12]
        at com.alibaba.druid.filter.FilterChainImpl.connection_prepareStatement(FilterChainImpl.java:681) ~[druid-1.1.12.jar!/:1.1.12]
        at com.alibaba.druid.filter.FilterAdapter.connection_prepareStatement(FilterAdapter.java:962) ~[druid-1.1.12.jar!/:1.1.12]
        at com.alibaba.druid.filter.FilterEventAdapter.connection_prepareStatement(FilterEventAdapter.java:176) ~[druid-1.1.12.jar!/:1.1.12]
        at com.alibaba.druid.filter.FilterChainImpl.connection_prepareStatement(FilterChainImpl.java:681) ~[druid-1.1.12.jar!/:1.1.12]
        at com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl.prepareStatement(ConnectionProxyImpl.java:366) ~[druid-1.1.12.jar!/:1.1.12]
        at com.alibaba.druid.pool.DruidPooledConnection.prepareStatement(DruidPooledConnection.java:485) ~[druid-1.1.12.jar!/:1.1.12]
        at io.seata.rm.datasource.AbstractConnectionProxy.prepareStatement(AbstractConnectionProxy.java:121) ~[seata-all-1.3.0.jar!/:1.3.0]
        at sun.reflect.GeneratedMethodAccessor133.invoke(Unknown Source) ~[na:na]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_151]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_151]
        at org.apache.ibatis.logging.jdbc.ConnectionLogger.invoke(ConnectionLogger.java:55) ~[mybatis-3.5.5.jar!/:3.5.5]
        at com.sun.proxy.$Proxy255.prepareStatement(Unknown Source) ~[na:na]
        at org.apache.ibatis.executor.statement.PreparedStatementHandler.instantiateStatement(PreparedStatementHandler.java:86) ~[mybatis-3.5.5.jar!/:3.5.5]
        at org.apache.ibatis.executor.statement.BaseStatementHandler.prepare(BaseStatementHandler.java:88) ~[mybatis-3.5.5.jar!/:3.5.5]
        ... 147 common frames omitted

Ⅲ. Describe what you expected to happen

Ⅳ. How to reproduce it (as minimally and precisely as possible)

  1. xxx
  2. xxx
  3. xxx

Ⅴ. Anything else we need to know?

Ⅵ. Environment:

miqiang1986 commented 4 years ago

druid-spring-boot-starter1.1.10

l81893521 commented 4 years ago

Can you paste your sql here?

miqiang1986 commented 4 years ago

将springcloud升级到最新的版本后问题解决了,版本为:Hoxton.SR8