Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

开启异步count后,拥有association或者collection的<resultMap>会报错 #830

Open
1 task
karhow opened this issue Aug 7, 2024 · 1 comment
Open
1 task

Comments

@karhow
Copy link

karhow commented Aug 7, 2024

  • 我已在 issues 搜索类似问题,并且不存在相同的问题.

使用环境

  • PageHelper 版本: 6.1.0
  • 数据库类型和版本: mysql 5.6

完整异常信息

### Cause: java.lang.reflect.UndeclaredThrowableException
	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:153)
	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:145)
	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)
	at jdk.internal.reflect.GeneratedMethodAccessor173.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:427)
	... 178 common frames omitted
Caused by: java.lang.reflect.UndeclaredThrowableException: null
	at com.sun.proxy.$Proxy511.query(Unknown Source)
	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:151)
	... 184 common frames omitted
Caused by: java.util.concurrent.ExecutionException: org.apache.ibatis.binding.BindingException: org.apache.ibatis.binding.BindingException: Parameter '__frch_v_1' not found. Available parameters are [request, param1]
	at java.base/java.util.concurrent.ForkJoinTask.get(ForkJoinTask.java:1006)
	at com.github.pagehelper.PageInterceptor.intercept(PageInterceptor.java:164)
	at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:62)
	at com.sun.proxy.$Proxy511.query(Unknown Source)
	at jdk.internal.reflect.GeneratedMethodAccessor154.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.apache.ibatis.plugin.Invocation.proceed(Invocation.java:49)
	at io.metersphere.interceptor.MybatisInterceptor.intercept(MybatisInterceptor.java:54)
	at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:62)
	at com.sun.proxy.$Proxy511.query(Unknown Source)
	at jdk.internal.reflect.GeneratedMethodAccessor154.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.apache.ibatis.plugin.Invocation.proceed(Invocation.java:49)
	at io.metersphere.interceptor.UserDesensitizationInterceptor.intercept(UserDesensitizationInterceptor.java:37)
	at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:62)
	... 186 common frames omitted
Caused by: org.apache.ibatis.binding.BindingException: org.apache.ibatis.binding.BindingException: Parameter '__frch_v_1' not found. Available parameters are [request, param1]
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at java.base/java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:600)
	... 203 common frames omitted
Caused by: org.apache.ibatis.binding.BindingException: Parameter '__frch_v_1' not found. Available parameters are [request, param1]
	at org.apache.ibatis.binding.MapperMethod$ParamMap.get(MapperMethod.java:212)
	at org.apache.ibatis.reflection.wrapper.MapWrapper.get(MapWrapper.java:45)
	at org.apache.ibatis.reflection.MetaObject.getValue(MetaObject.java:122)
	at org.apache.ibatis.executor.BaseExecutor.createCacheKey(BaseExecutor.java:219)
	at org.apache.ibatis.executor.CachingExecutor.createCacheKey(CachingExecutor.java:146)
	at com.github.pagehelper.util.ExecutorUtil.executeAutoCount(ExecutorUtil.java:155)
	at com.github.pagehelper.PageInterceptor.count(PageInterceptor.java:244)
	at com.github.pagehelper.PageInterceptor.lambda$asyncCount$0(PageInterceptor.java:201)
	at com.github.pagehelper.PageHelper.lambda$asyncCountTask$0(PageHelper.java:96)
	at java.base/java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1448)
	at java.base/java.util.concurrent.ForkJoinTask.doExec$$$capture(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)

关闭异步count即正常

@abel533
Copy link
Collaborator

abel533 commented Aug 7, 2024

针对这种查询关闭异步count

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants