哪位大神可知道如何解决吗?shardingsphere5.1.2 异常 java.sql.SQLException: exception while executing query: java.math.BigInteger cannot be cast to java.lang.Long

image
image


Error querying database. Cause: java.sql.SQLException: exception while executing query: java.math.BigInteger cannot be cast to java.lang.Long

The error may exist in file [D:\gpyhWork\gpyh-back\target\gpyh-back\WEB-INF\classes\com\gpyh\back\mapper\WarehouseStockBalanceMapper.xml]

The error may involve defaultParameterMap

The error occurred while setting parameters

SQL: SELECT count(*) FROM t_warehouse_stock_balance wsb INNER JOIN t_goods g ON g.id = wsb.goods_id LEFT JOIN t_warehouse_stock ws ON g.id = ws.goods_id LEFT JOIN t_brand b ON g.brand_id = b.id LEFT JOIN sys_dict sdm ON sdm.code = g.material_dict_code LEFT JOIN sys_dict sds ON sds.code = g.surface_dict_code INNER JOIN t_merchant m ON m.id = wsb.merchant_id WHERE wsb.create_time >= ? AND wsb.create_time <= ?

Cause: java.sql.SQLException: exception while executing query: java.math.BigInteger cannot be cast to java.lang.Long

; uncategorized SQLException for SQL []; SQL state [null]; error code [0]; exception while executing query: java.math.BigInteger cannot be cast to java.lang.Long; nested exception is java.sql.SQLException: exception while executing query: java.math.BigInteger cannot be cast to java.lang.Long] with root cause
java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.lang.Long
at Baz$2.apply(Unknown Source)
at Baz$2.apply(Unknown Source)
at org.apache.calcite.linq4j.EnumerableDefaults.toLookup_(EnumerableDefaults.java:3604)
at org.apache.calcite.linq4j.EnumerableDefaults$14.enumerator(EnumerableDefaults.java:2659)
at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.getRightEnumerator(EnumerableDefaults.java:4197)
at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.rightMoveNext(EnumerableDefaults.java:4214)
at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.start(EnumerableDefaults.java:4227)
at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.(EnumerableDefaults.java:4185)
at org.apache.calcite.linq4j.EnumerableDefaults$13.enumerator(EnumerableDefaults.java:2236)
at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.getLeftEnumerator(EnumerableDefaults.java:4190)
at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.leftMoveNext(EnumerableDefaults.java:4206)
at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.startLeftOrAntiJoin(EnumerableDefaults.java:4234)
at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.start(EnumerableDefaults.java:4224)
at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.(EnumerableDefaults.java:4185)
at org.apache.calcite.linq4j.EnumerableDefaults$13.enumerator(EnumerableDefaults.java:2236)
at org.apache.calcite.linq4j.EnumerableDefaults.toLookup_(EnumerableDefaults.java:3601)
at org.apache.calcite.linq4j.EnumerableDefaults$14.enumerator(EnumerableDefaults.java:2659)
at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.getLeftEnumerator(EnumerableDefaults.java:4190)
at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.leftMoveNext(EnumerableDefaults.java:4206)
at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.startLeftOrAntiJoin(EnumerableDefaults.java:4234)
at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.start(EnumerableDefaults.java:4224)
at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.(EnumerableDefaults.java:4185)
at org.apache.calcite.linq4j.EnumerableDefaults$13.enumerator(EnumerableDefaults.java:2236)
at Baz$18$1.(Unknown Source)
at Baz$18.enumerator(Unknown Source)
at org.apache.calcite.linq4j.EnumerableDefaults.toLookup_(EnumerableDefaults.java:3601)
at org.apache.calcite.linq4j.EnumerableDefaults$14.enumerator(EnumerableDefaults.java:2659)
at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.getLeftEnumerator(EnumerableDefaults.java:4190)
at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.leftMoveNext(EnumerableDefaults.java:4206)
at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.startLeftOrAntiJoin(EnumerableDefaults.java:4234)
at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.start(EnumerableDefaults.java:4224)
at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.(EnumerableDefaults.java:4185)
at org.apache.calcite.linq4j.EnumerableDefaults$13.enumerator(EnumerableDefaults.java:2236)
at Baz$26$1.(Unknown Source)
at Baz$26.enumerator(Unknown Source)
at org.apache.calcite.linq4j.EnumerableDefaults.toLookup_(EnumerableDefaults.java:3601)
at org.apache.calcite.linq4j.EnumerableDefaults$14.enumerator(EnumerableDefaults.java:2659)
at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.getLeftEnumerator(EnumerableDefaults.java:4190)
at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.leftMoveNext(EnumerableDefaults.java:4206)
at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.startLeftOrAntiJoin(EnumerableDefaults.java:4234)
at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.start(EnumerableDefaults.java:4224)
at org.apache.calcite.linq4j.EnumerableDefaults$MergeJoinEnumerator.(EnumerableDefaults.java:4185)
at org.apache.calcite.linq4j.EnumerableDefaults$13.enumerator(EnumerableDefaults.java:2236)
at Baz$34$1.(Unknown Source)
at Baz$34.enumerator(Unknown Source)
at org.apache.calcite.linq4j.EnumerableDefaults.toLookup_(EnumerableDefaults.java:3601)
at org.apache.calcite.linq4j.EnumerableDefaults.toLookup(EnumerableDefaults.java:3594)
at org.apache.calcite.linq4j.EnumerableDefaults.toLookup(EnumerableDefaults.java:3570)
at org.apache.calcite.linq4j.DefaultEnumerable.toLookup(DefaultEnumerable.java:748)
at org.apache.calcite.linq4j.EnumerableDefaults$6.enumerator(EnumerableDefaults.java:1316)
at org.apache.calcite.linq4j.EnumerableDefaults.aggregate(EnumerableDefaults.java:130)
at org.apache.calcite.linq4j.DefaultEnumerable.aggregate(DefaultEnumerable.java:107)
at Baz.bind(Unknown Source)
at org.apache.calcite.jdbc.CalcitePrepare$CalciteSignature.enumerable(CalcitePrepare.java:363)
at org.apache.calcite.jdbc.CalciteConnectionImpl.enumerable(CalciteConnectionImpl.java:333)
at org.apache.calcite.jdbc.CalciteMetaImpl._createIterable(CalciteMetaImpl.java:578)
at org.apache.calcite.jdbc.CalciteMetaImpl.createIterable(CalciteMetaImpl.java:569)
at org.apache.calcite.avatica.AvaticaResultSet.execute(AvaticaResultSet.java:182)
at org.apache.calcite.jdbc.CalciteResultSet.execute(CalciteResultSet.java:64)
at org.apache.calcite.jdbc.CalciteResultSet.execute(CalciteResultSet.java:43)
at org.apache.calcite.avatica.AvaticaConnection.executeQueryInternal(AvaticaConnection.java:573)
at org.apache.calcite.avatica.AvaticaPreparedStatement.executeQuery(AvaticaPreparedStatement.java:137)
at org.apache.shardingsphere.infra.federation.executor.original.OriginalFilterableExecutor.executeQuery(OriginalFilterableExecutor.java:82)
at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.executeFederationQuery(ShardingSpherePreparedStatement.java:286)
at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.execute(ShardingSpherePreparedStatement.java:371)
at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:62)
at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:78)
at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:62)
at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:303)
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:154)
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:134)
at sun.reflect.GeneratedMethodAccessor270.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.ibatis.plugin.Invocation.proceed(Invocation.java:49)
at com.github.pagehelper.SqlUtil._processPage(SqlUtil.java:386)
at com.github.pagehelper.SqlUtil.processPage(SqlUtil.java:329)
at com.github.pagehelper.PageHelper.intercept(PageHelper.java:150)
at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:61)
at com.sun.proxy.$Proxy610.query(Unknown Source)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:120)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:113)
at sun.reflect.GeneratedMethodAccessor279.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:386)
at com.sun.proxy.$Proxy190.selectList(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:205)
at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:122)
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:64)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:53)
at com.sun.proxy.$Proxy274.selectList(Unknown Source)
at com.gpyh.back.service.stock.WarehouseStockService.selectListByPage(WarehouseStockService.java:312)
at com.gpyh.back.service.stock.WarehouseStockService$$FastClassBySpringCGLIB$$8f3ec4b3.invoke()
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:717)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:653)
at com.gpyh.back.service.stock.WarehouseStockService$$EnhancerBySpringCGLIB$$c0fe8be2.selectListByPage()
at com.gpyh.back.service.stock.WarehouseStockService$$FastClassBySpringCGLIB$$8f3ec4b3.invoke()
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:717)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)

哪位大神可知道如何解决吗?

京ICP备2021015875号