blade-sharding-jdbc 运行查询错误

Blade 未结 1 140
77575027
77575027 剑童 2023-07-17 13:33

一、该问题的重现步骤是什么?

  1. bladex-biz的 执行sharding-jdbc 代码, notice的分表  submit成功。

  2. 执行notice/list查询报错


二、你期待的结果是什么?实际看到的又是什么?

期待看到按文档手册缩写返回 合并的notice_1和notice_2表中插入的数据。 实际返回执行空指针异常。


三、你正在使用的是什么产品,什么版本?在什么操作系统上?

bladex 3.1.1 商业版的 bladex-biz 中的blade-sharding-jdbc

四、请提供详细的错误堆栈信息,这很重要。


org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: 

### Error querying database.  Cause: java.lang.NullPointerException

### The error may exist in org/springblade/sharding/mapper/NoticeMapper.java (best guess)

### The error may involve org.springblade.sharding.mapper.NoticeMapper.selectPage_mpCount

### The error occurred while handling results

### SQL: SELECT COUNT(*) AS total FROM blade_notice WHERE is_deleted = 0

### Cause: java.lang.NullPointerException

at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:96) ~[mybatis-spring-2.0.7.jar:2.0.7]

at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:441) ~[mybatis-spring-2.0.7.jar:2.0.7]

at com.sun.proxy.$Proxy163.selectList(Unknown Source) ~[na:na]

at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:224) ~[mybatis-spring-2.0.7.jar:2.0.7]

at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.executeForIPage(MybatisMapperMethod.java:121) ~[mybatis-plus-core-3.5.3.1.jar:3.5.3.1]

at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:85) ~[mybatis-plus-core-3.5.3.1.jar:3.5.3.1]

at com.baomidou.mybatisplus.core.override.MybatisMapperProxy$PlainMethodInvoker.invoke(MybatisMapperProxy.java:148) ~[mybatis-plus-core-3.5.3.1.jar:3.5.3.1]

at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89) ~[mybatis-plus-core-3.5.3.1.jar:3.5.3.1]

at com.sun.proxy.$Proxy171.selectPage(Unknown Source) ~[na:na]

at com.baomidou.mybatisplus.extension.service.IService.page(IService.java:389) ~[mybatis-plus-extension-3.5.3.1.jar:3.5.3.1]

at com.baomidou.mybatisplus.extension.service.IService$$FastClassBySpringCGLIB$$f8525d18.invoke(<generated>) ~[mybatis-plus-extension-3.5.3.1.jar:3.5.3.1]

at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) ~[spring-core-5.3.27.jar:5.3.27]

at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793) ~[spring-aop-5.3.27.jar:5.3.27]

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.3.27.jar:5.3.27]

at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) ~[spring-aop-5.3.27.jar:5.3.27]

at org.springframework.validation.beanvalidation.MethodValidationInterceptor.invoke(MethodValidationInterceptor.java:123) ~[spring-context-5.3.27.jar:5.3.27]

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.27.jar:5.3.27]

at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) ~[spring-aop-5.3.27.jar:5.3.27]

at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708) ~[spring-aop-5.3.27.jar:5.3.27]

at org.springblade.sharding.service.impl.NoticeServiceImpl$$EnhancerBySpringCGLIB$$57659fd5.page(<generated>) ~[classes/:na]

at org.springblade.sharding.controller.NoticeController.list(NoticeController.java:74) ~[classes/:na]


五、若有更多详细信息,请在下面提供。

1条回答
  • 用的eclipse运行的吗?

    0 讨论(0)
提交回复