text:
AbstractService#findById报错 Expected one result (or null) to be returned by selectOne(), but found: 3

问题描述
使用AbstractService#findById报错，第一次查询正常根据ID返回了预期的数据。之后每一次调用都报以下错误

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned by selectOne(), but found: 3

而且诡异的是，每调用一次，报错里的but found: 2的数字会递增！也就是说第一次不报错，第二次报2个重复，第三次报3个，第四次是4个。。。。
观察sql日志如下，可以看到实际的查询SQL是没有问题的

2022-07-29 12:06:35.255 DEBUG 45512 --- [  XNIO-1 task-1] c.p.m.g.d.m.D.selectByPrimaryKey         : ==>  Preparing: SELECT id,corp_id,dept_id,user_id,user_name,device_sn,device_name,card_no,attendance_time,api_code,api_message,api_request_id,api_upload_time,create_time FROM dingtalk_attendance_log WHERE id = ?
2022-07-29 12:06:35.256 DEBUG 45512 --- [  XNIO-1 task-1] c.p.m.g.d.m.D.selectByPrimaryKey         : ==> Parameters: 1(Long)
2022-07-29 12:06:35.268 DEBUG 45512 --- [  XNIO-1 task-1] c.p.m.g.d.m.D.selectByPrimaryKey         : <==      Total: 1

版本
<dependency>
            <groupId>io.mybatis</groupId>
            <artifactId>mybatis-service</artifactId>
            <version>1.2.2</version>
</dependency>
<dependency>
            <groupId>com.github.pagehelper</groupId>
            <artifactId>pagehelper-spring-boot-starter</artifactId>
            <version>1.4.3</version>
</dependency>

代码
AbstractService#findById
  /**
   * 根据指定的主键查询
   *
   * @param id 主键
   * @return 实体
   */
  @Override
  public T findById(I id) {
    return baseMapper.selectByPrimaryKey(id).orElse(null);
  }

我的代码如下
实体类
@Getter
@Setter
@Entity.Table(value = "dingtalk_attendance_log", remark = "钉钉考勤-打卡记录", autoResultMap = true)
public class DingtalkAttendanceLog extends BaseId {
  private Long id;

  @Entity.Column(value = "corp_id", remark = "企业ID")
  private String corpId;

  @Entity.Column(value = "dept_id", remark = "机构ID")
  private String deptId;

  @Entity.Column(value = "user_id", remark = "使用人ID")
  private String userId;

  // 省略其它代码

}

实体基类
public class BaseId extends BaseEntity {

	/**
	 * 使用BigInt作主键，在插入时需要自己填充键值
	 */
	@Entity.Column(id = true, remark = "主键,bigint类型", updatable = false, insertable = true)
	private Long id;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * 获取新的主键，用于插入时使用
	 */
	public static Long $nextId() {
		return IdWorker.getId();
	}

}

发生错误的业务类
public class DingtalkAttendanceLogService
		extends AbstractIdService<DingtalkAttendanceLog, DingtalkAttendanceLogMapper> {
	/**
	 * 指定记录上传到钉钉
	 */
	public long upload2Dingtalk(List<Long> ids) {
		return ids.stream()
				.map(this::findById)          //////////////////////这一句报错//////////////////////
				.filter(e -> {
					if (e == null) return false;
					return e.getApiCode() != 0 && StringUtils.isNotBlank(e.getUserId());
				})
				.filter(e -> {
					try {
						//省略业务代码
						this.updateSelective(l);
						return true;
					} catch (Exception ignore) {
					}
					return false;
				}).count();
	}
}

具体的报错信息
2022-07-29 12:06:35.251 DEBUG 45512 --- [  XNIO-1 task-1] o.s.web.servlet.DispatcherServlet        : POST "/dingtalk/model/attendanceLog/upload2Dingtalk", parameters={}
2022-07-29 12:06:35.252 DEBUG 45512 --- [  XNIO-1 task-1] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped to com.pro_iot.tcp_server.model.controller.DingtalkAttendanceLogController#upload2Dingtalk(List)
2022-07-29 12:06:35.254 DEBUG 45512 --- [  XNIO-1 task-1] m.m.a.RequestResponseBodyMethodProcessor : Read "application/json;charset=UTF-8" to [[1]]
2022-07-29 12:06:35.255 DEBUG 45512 --- [  XNIO-1 task-1] c.p.m.g.d.m.D.selectByPrimaryKey         : ==>  Preparing: SELECT id,corp_id,dept_id,user_id,user_name,device_sn,device_name,card_no,attendance_time,api_code,api_message,api_request_id,api_upload_time,create_time FROM dingtalk_attendance_log WHERE id = ?
2022-07-29 12:06:35.256 DEBUG 45512 --- [  XNIO-1 task-1] c.p.m.g.d.m.D.selectByPrimaryKey         : ==> Parameters: 1(Long)
2022-07-29 12:06:35.268 DEBUG 45512 --- [  XNIO-1 task-1] c.p.m.g.d.m.D.selectByPrimaryKey         : <==      Total: 1
2022-07-29 12:06:35.273 DEBUG 45512 --- [  XNIO-1 task-1] .m.m.a.ExceptionHandlerExceptionResolver : Using @ExceptionHandler com.pro_iot.tcp_server.config.DingtalkWebExpConfig#handleDataAccessException(DataAccessException)
2022-07-29 12:06:35.289 DEBUG 45512 --- [  XNIO-1 task-1] com.pro_iot.common.dto.Message           : 接口异常:

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned by selectOne(), but found: 3
	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.$Proxy133.selectOne(Unknown Source) ~[na:na]
	at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:160) ~[mybatis-spring-2.0.7.jar:2.0.7]
	at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:87) ~[mybatis-3.5.9.jar:3.5.9]
	at org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:145) ~[mybatis-3.5.9.jar:3.5.9]
	at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:86) ~[mybatis-3.5.9.jar:3.5.9]
	at com.sun.proxy.$Proxy136.selectByPrimaryKey(Unknown Source) ~[na:na]
	at io.mybatis.service.AbstractService.findById(AbstractService.java:146) ~[mybatis-service-1.2.2.jar:na]
	at com.pro_iot.tcp_server.model.service.DingtalkAttendanceLogService.lambda$upload2Dingtalk$0(DingtalkAttendanceLogService.java:37) ~[classes/:na]
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[na:1.8.0_91]
	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374) ~[na:1.8.0_91]
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[na:1.8.0_91]
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[na:1.8.0_91]
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[na:1.8.0_91]
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_91]
	at java.util.stream.LongPipeline.reduce(LongPipeline.java:438) ~[na:1.8.0_91]
	at java.util.stream.LongPipeline.sum(LongPipeline.java:396) ~[na:1.8.0_91]
	at java.util.stream.ReferencePipeline.count(ReferencePipeline.java:526) ~[na:1.8.0_91]
	at com.pro_iot.tcp_server.model.service.DingtalkAttendanceLogService.upload2Dingtalk(DingtalkAttendanceLogService.java:60) ~[classes/:na]
	at com.pro_iot.tcp_server.model.controller.DingtalkAttendanceLogController.upload2Dingtalk(DingtalkAttendanceLogController.java:44) ~[classes/:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_91]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_91]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_91]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_91]
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) ~[spring-web-5.3.15.jar:5.3.15]
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150) ~[spring-web-5.3.15.jar:5.3.15]
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117) ~[spring-webmvc-5.3.15.jar:5.3.15]
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895) ~[spring-webmvc-5.3.15.jar:5.3.15]
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808) ~[spring-webmvc-5.3.15.jar:5.3.15]
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.3.15.jar:5.3.15]
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067) ~[spring-webmvc-5.3.15.jar:5.3.15]
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963) ~[spring-webmvc-5.3.15.jar:5.3.15]
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) [spring-webmvc-5.3.15.jar:5.3.15]
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909) [spring-webmvc-5.3.15.jar:5.3.15]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:517) [jakarta.servlet-api-4.0.4.jar:4.0.4]
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) [spring-webmvc-5.3.15.jar:5.3.15]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:584) [jakarta.servlet-api-4.0.4.jar:4.0.4]
	at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74) [undertow-servlet-2.2.14.Final.jar:2.2.14.Final]
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129) [undertow-servlet-2.2.14.Final.jar:2.2.14.Final]
	at org.springframework.web.servlet.resource.ResourceUrlEncodingFilter.doFilter(ResourceUrlEncodingFilter.java:67) [spring-webmvc-5.3.15.jar:5.3.15]
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-2.2.14.Final.jar:2.2.14.Final]
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-2.2.14.Final.jar:2.2.14.Final]
	at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124) [druid-1.1.20.jar:1.1.20]
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-2.2.14.Final.jar:2.2.14.Final]
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-2.2.14.Final.jar:2.2.14.Final]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327) [spring-security-web-5.6.1.jar:5.6.1]
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115) [spring-security-web-5.6.1.jar:5.6.1]
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81) [spring-security-web-5.6.1.jar:5.6.1]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) [spring-security-web-5.6.1.jar:5.6.1]
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122) [spring-security-web-5.6.1.jar:5.6.1]
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116) [spring-security-web-5.6.1.jar:5.6.1]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) [spring-security-web-5.6.1.jar:5.6.1]
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126) [spring-security-web-5.6.1.jar:5.6.1]
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81) [spring-security-web-5.6.1.jar:5.6.1]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) [spring-security-web-5.6.1.jar:5.6.1]
	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109) [spring-security-web-5.6.1.jar:5.6.1]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) [spring-security-web-5.6.1.jar:5.6.1]
	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149) [spring-security-web-5.6.1.jar:5.6.1]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) [spring-security-web-5.6.1.jar:5.6.1]
	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) [spring-security-web-5.6.1.jar:5.6.1]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) [spring-security-web-5.6.1.jar:5.6.1]
	at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:150) [spring-security-web-5.6.1.jar:5.6.1]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) [spring-web-5.3.15.jar:5.3.15]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) [spring-security-web-5.6.1.jar:5.6.1]
	at org.springframework.security.web.authentication.ui.DefaultLogoutPageGeneratingFilter.doFilterInternal(DefaultLogoutPageGeneratingFilter.java:58) [spring-security-web-5.6.1.jar:5.6.1]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) [spring-web-5.3.15.jar:5.3.15]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) [spring-security-web-5.6.1.jar:5.6.1]
	at org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter.doFilter(DefaultLoginPageGeneratingFilter.java:237) [spring-security-web-5.6.1.jar:5.6.1]
	at org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter.doFilter(DefaultLoginPageGeneratingFilter.java:223) [spring-security-web-5.6.1.jar:5.6.1]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) [spring-security-web-5.6.1.jar:5.6.1]
	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:219) [spring-security-web-5.6.1.jar:5.6.1]
	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:213) [spring-security-web-5.6.1.jar:5.6.1]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) [spring-security-web-5.6.1.jar:5.6.1]
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103) [spring-security-web-5.6.1.jar:5.6.1]
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89) [spring-security-web-5.6.1.jar:5.6.1]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) [spring-security-web-5.6.1.jar:5.6.1]
	at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90) [spring-security-web-5.6.1.jar:5.6.1]
	at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75) [spring-security-web-5.6.1.jar:5.6.1]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) [spring-web-5.3.15.jar:5.3.15]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) [spring-security-web-5.6.1.jar:5.6.1]
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110) [spring-security-web-5.6.1.jar:5.6.1]
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80) [spring-security-web-5.6.1.jar:5.6.1]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) [spring-security-web-5.6.1.jar:5.6.1]
	at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55) [spring-security-web-5.6.1.jar:5.6.1]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) [spring-web-5.3.15.jar:5.3.15]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) [spring-security-web-5.6.1.jar:5.6.1]
	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211) [spring-security-web-5.6.1.jar:5.6.1]
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183) [spring-security-web-5.6.1.jar:5.6.1]
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354) [spring-web-5.3.15.jar:5.3.15]
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267) [spring-web-5.3.15.jar:5.3.15]
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-2.2.14.Final.jar:2.2.14.Final]
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-2.2.14.Final.jar:2.2.14.Final]
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) [spring-web-5.3.15.jar:5.3.15]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) [spring-web-5.3.15.jar:5.3.15]
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-2.2.14.Final.jar:2.2.14.Final]
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-2.2.14.Final.jar:2.2.14.Final]
	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) [spring-web-5.3.15.jar:5.3.15]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) [spring-web-5.3.15.jar:5.3.15]
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-2.2.14.Final.jar:2.2.14.Final]
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-2.2.14.Final.jar:2.2.14.Final]
	at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:96) [spring-boot-actuator-2.6.3.jar:2.6.3]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) [spring-web-5.3.15.jar:5.3.15]
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-2.2.14.Final.jar:2.2.14.Final]
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-2.2.14.Final.jar:2.2.14.Final]
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) [spring-web-5.3.15.jar:5.3.15]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) [spring-web-5.3.15.jar:5.3.15]
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-2.2.14.Final.jar:2.2.14.Final]
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-2.2.14.Final.jar:2.2.14.Final]
	at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84) [undertow-servlet-2.2.14.Final.jar:2.2.14.Final]
	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) [undertow-servlet-2.2.14.Final.jar:2.2.14.Final]
	at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68) [undertow-servlet-2.2.14.Final.jar:2.2.14.Final]
	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-2.2.14.Final.jar:2.2.14.Final]
	at io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68) [undertow-servlet-2.2.14.Final.jar:2.2.14.Final]
	at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:117) [undertow-servlet-2.2.14.Final.jar:2.2.14.Final]
	at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) [undertow-servlet-2.2.14.Final.jar:2.2.14.Final]
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-2.2.14.Final.jar:2.2.14.Final]
	at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) [undertow-core-2.2.14.Final.jar:2.2.14.Final]
	at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) [undertow-servlet-2.2.14.Final.jar:2.2.14.Final]
	at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60) [undertow-core-2.2.14.Final.jar:2.2.14.Final]
	at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77) [undertow-servlet-2.2.14.Final.jar:2.2.14.Final]
	at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43) [undertow-core-2.2.14.Final.jar:2.2.14.Final]
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-2.2.14.Final.jar:2.2.14.Final]
	at io.undertow.servlet.handlers.SendErrorPageHandler.handleRequest(SendErrorPageHandler.java:52) [undertow-servlet-2.2.14.Final.jar:2.2.14.Final]
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-2.2.14.Final.jar:2.2.14.Final]
	at io.undertow.servlet.handlers.SessionRestoringHandler.handleRequest(SessionRestoringHandler.java:119) [undertow-servlet-2.2.14.Final.jar:2.2.14.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:275) [undertow-servlet-2.2.14.Final.jar:2.2.14.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:79) [undertow-servlet-2.2.14.Final.jar:2.2.14.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:134) [undertow-servlet-2.2.14.Final.jar:2.2.14.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:131) [undertow-servlet-2.2.14.Final.jar:2.2.14.Final]
	at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48) [undertow-servlet-2.2.14.Final.jar:2.2.14.Final]
	at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) [undertow-servlet-2.2.14.Final.jar:2.2.14.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:255) [undertow-servlet-2.2.14.Final.jar:2.2.14.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:79) [undertow-servlet-2.2.14.Final.jar:2.2.14.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:100) [undertow-servlet-2.2.14.Final.jar:2.2.14.Final]
	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:387) [undertow-core-2.2.14.Final.jar:2.2.14.Final]
	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:852) [undertow-core-2.2.14.Final.jar:2.2.14.Final]
	at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) [jboss-threads-3.1.0.Final.jar:3.1.0.Final]
	at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2019) [jboss-threads-3.1.0.Final.jar:3.1.0.Final]
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1558) [jboss-threads-3.1.0.Final.jar:3.1.0.Final]
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1449) [jboss-threads-3.1.0.Final.jar:3.1.0.Final]
	at org.xnio.XnioWorker$WorkerThreadFactory$1$1.run(XnioWorker.java:1280) [xnio-api-3.8.4.Final.jar:3.8.4.Final]
	at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91]
Caused by: org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned by selectOne(), but found: 3
	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:80) ~[mybatis-3.5.9.jar:3.5.9]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_91]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_91]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_91]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_91]
	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:427) ~[mybatis-spring-2.0.7.jar:2.0.7]
	... 141 common frames omitted

怎么感觉我在使用的过程中总是出现各种莫名其妙的问题，是我的使用姿势不对吗？-_-!

测试了，没有复现。。。你在如图位置加断点，看看执行的方法和结果对不对。

您好，很感谢您的回复。
我按照你给的提示再次debug看了下，发现其实是PageHelper的问题。
截图如下：

com.github.pagehelper.dialect.AbstractHelperDialect
    @Override
    public Object afterPage(List pageList, Object parameterObject, RowBounds rowBounds) {
        Page page = getLocalPage();
        if (page == null) {
            return pageList;
        }
        page.addAll(pageList);
        if (!page.isCount()) {
            page.setTotal(-1);
        } else if ((page.getPageSizeZero() != null && page.getPageSizeZero()) && page.getPageSize() == 0) {
            page.setTotal(pageList.size());
        } else if (page.isOrderByOnly()) {
            page.setTotal(pageList.size());
        }
        return page;
    }

在afterPage方法中没有看到清理threadLocal的代码，于是我继续跟踪代码，直到return selectList我都没有看到清理threadLocal
这里我用的是com.github.pagehelper.dialect.helper.MySqlDialect。

repo: mybatis-mapper/mapper


text:
Nested sql framgements are not searched from nesting elements

MyBatis version
3.4.5
Database vendor and version
MySQL
Test case or example project
N/A
Steps to reproduce
With following two mappers,
<mapper namespace="...some.AMapper">
    <sql id="sqlA">
    </sql>
    <sql id="sqlB">
        <include refid="sqlA"/>
    </sql>
</mapper>
<mapper namespace="...someOther.BMapper">
    <sql id="sqlC">
        <include refid="...some.AMapper.sqlB"/>
    </sql>
</mapper>

Expected result
sqlA must be searched from the nesting element(sqlB)'s namespace.
Actual result

Could not find SQL statement to include with refid '...BMapper.sqlA'] with root cause

I'm work-arounding specifying FQNS in each fragments.

source: gharchive/issue

license_type: permissive

license_source: bigquery


text:
Updating from 3.1.1 to 3.5.3 breaks

MyBatis version
3.5.3
Database vendor and version
Test case or example project
public interface ConventionSearchMapper {
	@Options(useGeneratedKeys=true, keyProperty="id", flushCache=true, keyColumn="id")
}

Steps to reproduce
When I try to upgrade mybatis-3 from 3.1.1 to 3.5.3. The above code breaks.
Expected result
The code should pass.
Actual result
It throws an error with:
incompatible types: boolean cannot be converted to org.apache.ibatis.annotations.Options.FlushCachePolicy

Hi @SElab2019 ,
We try to include 'backward incompatible changes' section in each release note.
This one is in the 3.4.0 release note.

@Options( flushCache ) now takes enum values (DEFAULT/TRUE/FALSE) instead of boolean.

Please check the release page when you encounter issues during upgrade.
I'm going to close this, but please add a comment if there is misunderstanding.

Hi @SElab2019 ,
We try to include 'backward incompatible changes' section in each release note.
This one is in the 3.4.0 release note.

@options( flushCache ) now takes enum values (DEFAULT/TRUE/FALSE) instead of boolean.

Please check the release page when you encounter issues during upgrade.
I'm going to close this, but please add a comment if there is misunderstanding.

Hi harawata,
Thanks for your helping.
I would check that first next time.


text:
Apply value transform immediately on construction

Resolves #239

Coverage remained the same at 100.0% when pulling 867fd91d2663ac100231ef215de84a37396a3c85 on jeffgbutler:gh-239 into c4a05d1dd0d02ae91126471db6e01a9341f15f71 on mybatis:master.

source: gharchive/pull-request

authors: coveralls jeffgbutler

repo: mybatis/mybatis-dynamic-sql

license_source: github-api


text:
🛑 Website is down

In 3de9e57, Website (https://www.mygameplatform.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Website is back up in 1b94176 after 6 minutes.

repo: mygameplatform/status

license: MIT


text:
Barcode in order afgerond niet actueel na recreëren zending

Wanneer de klant een afgeronde zending weer op status in behandeling wijzigt, en vervolgens een nieuwe barcode genereert >> bestelling afgerond markeert, dan staat op de automatisch gegenereerde notificatie de vorige barcode. Wanneer de email handmatig op afgerond/ verzonden wordt verstuurd, dan komt naast de vorige barcode, ook de actuele in de notificatie te staan.
PostNL/MyParcel case: 586722

Opgelost vanaf versie v4.0.0

authors: RichardPerdaan soedesh

repo: myparcelnl/woocommerce


text:
Compilcation error: ConnectionNovenaRF7Entry.cpp

git clone https://github.com/myriadrf/LimeSuite.git LimeSuite.git
cd LimeSuite.git/
mkdir builddir && cd builddir
cmake ../
git rev-parse --short HEAD
54dadad
gcc --version |head -1
gcc (Gentoo 4.9.4 p1.0, pie-0.6.4) 4.9.4
uname -r
4.4.26-gentoo
make

results in
/home/projects/LimeSuite.git/src/ConnectionNovenaRF7/ConnectionNovenaRF7Entry.cpp: In function ‘bool IsNovenaBoard()’:
/home/projects/LimeSuite.git/src/ConnectionNovenaRF7/ConnectionNovenaRF7Entry.cpp:36:30: error: elements of array ‘i2c_msg messages [2]’ have incomplete type
     struct i2c_msg messages[2];

There is only one instance in the repository:
git grep i2c_msg | cat
src/ConnectionNovenaRF7/ConnectionNovenaRF7Entry.cpp:    struct i2c_msg messages[2];

Then I did:
git diff |cat
diff --git a/src/ConnectionNovenaRF7/ConnectionNovenaRF7Entry.cpp b/src/ConnectionNovenaRF7/ConnectionNovenaRF7Entry.cpp
index 207a7af..643e309 100644
--- a/src/ConnectionNovenaRF7/ConnectionNovenaRF7Entry.cpp
+++ b/src/ConnectionNovenaRF7/ConnectionNovenaRF7Entry.cpp
@@ -18,6 +18,7 @@
 #include <linux/types.h>
 #include <linux/spi/spidev.h>
 #include <linux/i2c-dev.h>
+#include <linux/i2c.h>
 #include <iostream>

Now I get:
 make
[  1%] Building CXX object src/CMakeFiles/LimeSuite.dir/ConnectionNovenaRF7/ConnectionNovenaRF7Entry.cpp.o
/home/projects/LimeSuite.git/src/ConnectionNovenaRF7/ConnectionNovenaRF7Entry.cpp: In function ‘bool IsNovenaBoard()’:
/home/projects/LimeSuite.git/src/ConnectionNovenaRF7/ConnectionNovenaRF7Entry.cpp:46:21: error: invalid conversion from ‘char*’ to ‘__u8* {aka unsigned char*}’ [-fpermissive]
     messages[0].buf = set_addr_buf;
                     ^
/home/projects/LimeSuite.git/src/ConnectionNovenaRF7/ConnectionNovenaRF7Entry.cpp:50:21: error: invalid conversion from ‘char*’ to ‘__u8* {aka unsigned char*}’ [-fpermissive]
     messages[1].buf = data;

Is a specific version of gcc required?

Do you have libi2c-dev installed? To install it:

sudo apt-get install libi2c-dev

Also I don't know which board you are using, but if it is not Novena-RF you can safely disable it in CMake ( 'ENABLE_NOVENARF7' option in CMakeCache.txt )

This comes up a lot, so I added a check for the userspace version of libi2c headers: https://github.com/myriadrf/LimeSuite/commit/8629033b56bf4fc04ab8192d6d8271c530231904 Its in stable now, will merge into master.

Thanks,
I don't have a board yet. I'm waiting for my LimeSDR to arrive and in the meantime I'm trying to set up my environment to be able to build FPGA, FX3 firmare, and LimeSuite.
But isn't the i2c_msg stuct which is a part of the Linux kernel the correct one to use?
The i2c_msg struct is defined include/linux/i2c.h (which again includes include/uapi/linux/i2c.h).
If I include i2c.h my source will compile just fine if I add some casts:
https://gist.github.com/gustad/dbb42de8a53586157fe63a1bbde22f8c
Or does LimeSuite require a total different i2c_msg struct than the one in the kernel?

The package libi2c-dev (I'm not sure how pervasive this package is outside of debian based systems) provides a different version of i2c.h that uses standard C types and it might have some other typedefs or structs as well. But I'm pretty sure its ABI compatible with the equivalent linux header.
Anyway, the novena rf support uses this version of the header and not the kernel version. Also I should note that the novena support only needs to run on the novena board itself, which is debian based. And so there isnt anything missing to not compile novena support on a standard linux PC.

Thank you for the explanation.
Looking at:
https://packages.debian.org/jessie/all/libi2c-dev/filelist
Seems like it will overwrite the kernel source file in /usr/include/linux/i2c-dev.h.
I can't seem to find anything like this on Gentoo. Could be a bit scary if the Linux kernel struct layout should change at some point in time. Anyways, like you say I will do without on the LimeSDR when I get it...

authors: IgnasJarusevicius guruofquality gustad

repo: myriadrf/LimeSuite


text:
Hasil Coba di localhost

Sepertinya masih banyak modul yg tidak berjalan mas....fitur yg berfunsi hanya:

Penambahan jurusan dan konsentrasi
Penambahan user dosen dan mahasiswa

Masih sangat banyak yg kurang, terutama penyerahan/pengusulan judul skripsi tidak ada.
Salah lihat ada peran kaprodi, ada form pendaftaran, dll. tapi semuanya tdk brfungsi.
Fitur menghapus user juga tidak tersedia, sehingga setelah menambahkan, tidak tahu lagi cara menghapusnya, jadinya permanen.

Sepertinya masih banyak modul yg tidak berjalan mas....fitur yg berfunsi hanya:

Penambahan jurusan dan konsentrasi
Penambahan user dosen dan mahasiswa

Masih sangat banyak yg kurang, terutama penyerahan/pengusulan judul skripsi tidak ada.
Salah lihat ada peran kaprodi, ada form pendaftaran, dll. tapi semuanya tdk brfungsi.
Fitur menghapus user juga tidak tersedia, sehingga setelah menambahkan, tidak tahu lagi cara menghapusnya, jadinya permanen.

udah ga dimaintenance lagi mungkin

itu cara bisa nampilkan dosen & mahasiswa nya gmna mas?

mau nanya ? kaprodi nya gmn ya

authors: Miftaib elhsilv tarunasyah


text:
Remote host closed connection during handshake

Hello,
I am using jmeter to test api.i am getting expected result till low users i.e. 100 but when i set 500 or 1000 user than i am getting following error in some call not all.
Remote host closed connection during handshake

Hi @nirmalgoswami ! Are you using pool? Whats your pool connection limit and mysql server max_connections settings?

@sidorares Yes i am using pool and i did not set any limit and max_connections.i am using default value.

It's usually very easy to hit default limit ( I think it's 100 ) but I would expect different error ( server rejects handshake and closes connection, but error should be like "Max number of connections reached" ). Try to set your pool connectionLimit to some low value ( say, 20 ) and see if error persist

Hi @nirmalgoswami, do you have any further information? I'm not quite sure if there is anything this module can do, and you didn't provide enough information for us to really understand what is happening to be able to look into the issue ourselves.

hello,thanks for reply.i have tested my apis without use of this module i.e. mysql and still i am getting that error with more call/per second so that means issue is not related to this module but it is related to the network connection and my sever is not handling more traffic.so i am closing this.

authors: dougwilson nirmalgoswami sidorares

repo: mysqljs/mysql

license: mit


text:
Mysterium client no longer connects on macOS M1 machines [bug]

Describe the bug
I have been using the Mysterium VPN client on macOS for a long time, on both M1 and intel chips. Everything was working fine  until the update to 10.5.1 (which finally includes the kill switch).
This new version continues to work on the intel machine, however, on the M1 apple silicon machine, I can no longer establish a connection. Everything appears to be working fine, up until the point when I click on a node to connect. At this point however, I just get the "updating..." notification as the client tries to connect, but nothing happens. "updating...." continues forever.
I emphasize that this update works on intel macs. The client used to work on M1 macs as well up until 10.5.1 (or about, I don't know when I last updated the software).

This is fixed in 10.5.3

repo: mysteriumnetwork/mysterium-vpn-desktop


text:
Task status retention

A small update to resolve issue #27 . There is now an option not to overwrite todos at each synchronization.

Since the resulting ticket has been closed because it couldn't be replicated, closing this PR for now.

Hello again!
A thousand apologies for not responding sooner. I admit I've been quite busy lately, and I kept putting it off... Indeed, the update wasn't necessary: the problem was solely on my end due to incompatibility with another plugin (https://github.com/mirnovov/obsidian-homepage). This plugin was triggering the synchronization of notes before they were indexed by Obsidian, which caused a hard reset every time the application started! The problem is now resolved, and I apologize for wasting your time! :)

authors: hjamet kinabalu

repo: mysticcoders/voicenotes-sync


text:
Cache is not invalidated by adding new files

I've been able to consistently reproduce the bug I mentioned a while back, where I have to delete my cache in order for rebuilds to be picked up.
Steps:

Write an import call for a file that does not yet exist, and save the importing file.
Create the file that you just tried to import
The cached code continues to register the new file as missing, even if the importing file is subsequently changed.

It takes an rm of the cache directory in order for the new file to be picked up.
Example reproduction can be followed on this branch by checking out the "step1" tag, then running npm start, then checking out the step2 tag.

This is something (relating to #71) I was trying to solve previously but shelved due to build time increase. I've brought the branch up to date.
To solve this the best thing I came up with previously was for hard source to inject itself into the resolvers and track every file attempted. Those attempts recorded later builds can check if the failures now succeed if so invalidating the original resolution and forcing a new build for the depending modules leading to building the previously missing module.
That works really well and the build time increase isn't that big (it has to stat check more file paths than previous hard-source versions). In part I really shelved it to not increase the complexity of hard-source as much in 0.3. But this is something we can do for 0.4.

Fixed by #131. Update that updated branch and merged into master. Its part of 0.4.

authors: kadamwhite mzgoddard

repo: mzgoddard/hard-source-webpack-plugin

license: isc