Hello,
In one of our REST webservices that uses mybatis and mybatis-spring we're seeing intermittent failures (like one in a tens of thousands of the same calls) on mybatis :
org.apache.ibatis.executor.ExecutorException: Cannot get Configuration as configuration factory was not set.
at org.apache.ibatis.executor.loader.ResultLoaderMap$LoadPair.getConfiguration(ResultLoaderMap.java:220)
at org.apache.ibatis.executor.loader.ResultLoaderMap$LoadPair.load(ResultLoaderMap.java:191)
at org.apache.ibatis.executor.loader.AbstractEnhancedDeserializationProxy.invoke(AbstractEnhancedDeserializationProxy.java:78)
at org.apache.ibatis.executor.loader.cglib.CglibProxyFactory$EnhancedDeserializationProxyImpl.intercept(CglibProxyFactory.java:184)
I had the same issue with different versions of mybatis, mybatis-spring and CGLIB, so it don't seems to be linked to a library mismatched version.
Disabling the lazyloading features solved the issue.
It appears to have a race issue somewhere in ResultLoadeMap but I cannot figure it by myself.
I wanted to open a bug in Github but as I cannot reproduce the issue easily I didn't do it yet, that's why I reported the issue here.
Regards,
Loïc