Quantcast

Intermittent issue with org.apache.ibatis.executor.ExecutorException: Cannot get Configuration as configuration factory was not set.

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Intermittent issue with org.apache.ibatis.executor.ExecutorException: Cannot get Configuration as configuration factory was not set.

Loïc MATHIEU
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

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Intermittent issue with org.apache.ibatis.executor.ExecutorException: Cannot get Configuration as configuration factory was not set.

Iwao AVE!
Hi Loïc,

I don't know much about lazy loading, but do you specify 'configurationFactory' in your MyBatis config?

Regards,
Iwao


2016-08-11 23:59 GMT+09:00 Loïc MATHIEU <[hidden email]>:
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

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Intermittent issue with org.apache.ibatis.executor.ExecutorException: Cannot get Configuration as configuration factory was not set.

Loïc MATHIEU
Hello,

No I didn't specify a 'configurationFactory' in my MyBatis config file, in fact I cannot see this property in the documentation : http://www.mybatis.org/mybatis-3/configuration.html
As I said, it works for 10000 calls then fails on one calls then works for 10000 other calls and deactivating the lazyloading functionality solved the issue. So I'm pretty sure that the issue is on the lazyloading code where some race situation occurs (there's some 'non-trheadsafe related comment in the code where the issue occurs).

Regards,
Loïc

On Friday, August 12, 2016 at 1:40:31 PM UTC+2, Iwao AVE! wrote:
Hi Loïc,

I don't know much about lazy loading, but do you specify 'configurationFactory' in your MyBatis config?

Regards,
Iwao


2016-08-11 23:59 GMT+09:00 Loïc MATHIEU <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="L2e4nvy2AQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">loik...@...>:
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

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="L2e4nvy2AQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">mybatis-user...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Intermittent issue with org.apache.ibatis.executor.ExecutorException: Cannot get Configuration as configuration factory was not set.

Iwao AVE!
Hi,

I also think it's lazy-loading related.

configurationFactory was added as a part of this PR.
(and there is an open ticket for writing documentation https://github.com/mybatis/mybatis-3/issues/507 )

I could reproduce the exception by removing 'configurationFactory' setting from the following test case's config.

Guessing from the issue comment and the test case, the exception is thrown when you 1) lazy-load some property after serializing/de-serializing the parent object and 2) 'configurationFactory' was not set.
As this feature does not seem to be optional, you may have to provide configurationFactory which is just a class with a method named getConfiguration returning Configuration instance.

Please let me know if you get this exception without performing any (de)serialization on the related objects.

Regards,
Iwao


2016-08-16 21:12 GMT+09:00 Loïc MATHIEU <[hidden email]>:
Hello,

No I didn't specify a 'configurationFactory' in my MyBatis config file, in fact I cannot see this property in the documentation : http://www.mybatis.org/mybatis-3/configuration.html
As I said, it works for 10000 calls then fails on one calls then works for 10000 other calls and deactivating the lazyloading functionality solved the issue. So I'm pretty sure that the issue is on the lazyloading code where some race situation occurs (there's some 'non-trheadsafe related comment in the code where the issue occurs).

Regards,
Loïc

On Friday, August 12, 2016 at 1:40:31 PM UTC+2, Iwao AVE! wrote:
Hi Loïc,

I don't know much about lazy loading, but do you specify 'configurationFactory' in your MyBatis config?

Regards,
Iwao


2016-08-11 23:59 GMT+09:00 Loïc MATHIEU <[hidden email]>:
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

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]om.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Intermittent issue with org.apache.ibatis.executor.ExecutorException: Cannot get Configuration as configuration factory was not set.

Loïc MATHIEU
Hello,

Both issues are really old ones!

I'm not performing any serialization/deserailization, we use jackson to map to json our objects loading from mybatis that's all.

Regards,

Loîc

On Tuesday, August 16, 2016 at 5:51:28 PM UTC+2, Iwao AVE! wrote:
Hi,

I also think it's lazy-loading related.

configurationFactory was added as a part of this PR.
<a href="https://github.com/mybatis/mybatis-3/pull/30" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmybatis%2Fmybatis-3%2Fpull%2F30\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEWHKwZgHUxLEw5vRafa_86HPc0kQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmybatis%2Fmybatis-3%2Fpull%2F30\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEWHKwZgHUxLEw5vRafa_86HPc0kQ&#39;;return true;">https://github.com/mybatis/mybatis-3/pull/30
(and there is an open ticket for writing documentation <a href="https://github.com/mybatis/mybatis-3/issues/507" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmybatis%2Fmybatis-3%2Fissues%2F507\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFG_GSQIasBqHXMKOAIflBdnPg-mA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmybatis%2Fmybatis-3%2Fissues%2F507\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFG_GSQIasBqHXMKOAIflBdnPg-mA&#39;;return true;">https://github.com/mybatis/mybatis-3/issues/507 )

I could reproduce the exception by removing 'configurationFactory' setting from the following test case's config.
<a href="https://github.com/mybatis/mybatis-3/blob/dca09fba83e5e509d0b11a7f890ca1bf58f624dc/src/test/java/org/apache/ibatis/submitted/lazy_deserialize/LazyDeserializeTest.java" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmybatis%2Fmybatis-3%2Fblob%2Fdca09fba83e5e509d0b11a7f890ca1bf58f624dc%2Fsrc%2Ftest%2Fjava%2Forg%2Fapache%2Fibatis%2Fsubmitted%2Flazy_deserialize%2FLazyDeserializeTest.java\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFsWRbokU0Kj2uQj7YG6_G1Rx1ySw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmybatis%2Fmybatis-3%2Fblob%2Fdca09fba83e5e509d0b11a7f890ca1bf58f624dc%2Fsrc%2Ftest%2Fjava%2Forg%2Fapache%2Fibatis%2Fsubmitted%2Flazy_deserialize%2FLazyDeserializeTest.java\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFsWRbokU0Kj2uQj7YG6_G1Rx1ySw&#39;;return true;">https://github.com/mybatis/mybatis-3/blob/dca09fba83e5e509d0b11a7f890ca1bf58f624dc/src/test/java/org/apache/ibatis/submitted/lazy_deserialize/LazyDeserializeTest.java

Guessing from the issue comment and the test case, the exception is thrown when you 1) lazy-load some property after serializing/de-serializing the parent object and 2) 'configurationFactory' was not set.
As this feature does not seem to be optional, you may have to provide configurationFactory which is just a class with a method named getConfiguration returning Configuration instance.

Please let me know if you get this exception without performing any (de)serialization on the related objects.

Regards,
Iwao


2016-08-16 21:12 GMT+09:00 Loïc MATHIEU <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="IIT7fQD_AgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">loik...@...>:
Hello,

No I didn't specify a 'configurationFactory' in my MyBatis config file, in fact I cannot see this property in the documentation : <a href="http://www.mybatis.org/mybatis-3/configuration.html" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.mybatis.org%2Fmybatis-3%2Fconfiguration.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFdzegYDw9nX2BnleMTXR_xm8b2AA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.mybatis.org%2Fmybatis-3%2Fconfiguration.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFdzegYDw9nX2BnleMTXR_xm8b2AA&#39;;return true;">http://www.mybatis.org/mybatis-3/configuration.html
As I said, it works for 10000 calls then fails on one calls then works for 10000 other calls and deactivating the lazyloading functionality solved the issue. So I'm pretty sure that the issue is on the lazyloading code where some race situation occurs (there's some 'non-trheadsafe related comment in the code where the issue occurs).

Regards,
Loïc

On Friday, August 12, 2016 at 1:40:31 PM UTC+2, Iwao AVE! wrote:
Hi Loïc,

I don't know much about lazy loading, but do you specify 'configurationFactory' in your MyBatis config?

Regards,
Iwao


2016-08-11 23:59 GMT+09:00 Loïc MATHIEU <[hidden email]>:
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

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mybatis-user...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="IIT7fQD_AgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">mybatis-user...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Intermittent issue with org.apache.ibatis.executor.ExecutorException: Cannot get Configuration as configuration factory was not set.

Iwao AVE!
Hi, thanks for the info!

I'll try to find the cause, but it could be tricky without reproducing the issue.
If you could provide a small project demonstrating your lazy-loading use case, it would be very much appreciated (even if the issue is not reproducible with it).

And maybe you should set the configurationFactory and see how the situation changes.
With Spring, Configuration can be obtained via injected SqlSession.

Regards,
Iwao

2016-08-17 1:06 GMT+09:00 Loïc MATHIEU <[hidden email]>:
Hello,

Both issues are really old ones!

I'm not performing any serialization/deserailization, we use jackson to map to json our objects loading from mybatis that's all.

Regards,

Loîc

On Tuesday, August 16, 2016 at 5:51:28 PM UTC+2, Iwao AVE! wrote:
Hi,

I also think it's lazy-loading related.

configurationFactory was added as a part of this PR.
(and there is an open ticket for writing documentation https://github.com/mybatis/mybatis-3/issues/507 )

I could reproduce the exception by removing 'configurationFactory' setting from the following test case's config.

Guessing from the issue comment and the test case, the exception is thrown when you 1) lazy-load some property after serializing/de-serializing the parent object and 2) 'configurationFactory' was not set.
As this feature does not seem to be optional, you may have to provide configurationFactory which is just a class with a method named getConfiguration returning Configuration instance.

Please let me know if you get this exception without performing any (de)serialization on the related objects.

Regards,
Iwao


2016-08-16 21:12 GMT+09:00 Loïc MATHIEU <[hidden email]>:
Hello,

No I didn't specify a 'configurationFactory' in my MyBatis config file, in fact I cannot see this property in the documentation : http://www.mybatis.org/mybatis-3/configuration.html
As I said, it works for 10000 calls then fails on one calls then works for 10000 other calls and deactivating the lazyloading functionality solved the issue. So I'm pretty sure that the issue is on the lazyloading code where some race situation occurs (there's some 'non-trheadsafe related comment in the code where the issue occurs).

Regards,
Loïc

On Friday, August 12, 2016 at 1:40:31 PM UTC+2, Iwao AVE! wrote:
Hi Loïc,

I don't know much about lazy loading, but do you specify 'configurationFactory' in your MyBatis config?

Regards,
Iwao


2016-08-11 23:59 GMT+09:00 Loïc MATHIEU <[hidden email]>:
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

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]om.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]om.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Intermittent issue with org.apache.ibatis.executor.ExecutorException: Cannot get Configuration as configuration factory was not set.

Iwao AVE!
Hi Löic,

Sorry for a late reply.

The EnhancedDeserializationProxyImpl class appeared in the stack trace is created on deserialization via readResolve() method, so the object was serialized/deserialized at some point in your solution, it seems.
Sometimes, containers or other frameworks perform serialization implicitly.

Regards,
Iwao


2016-08-18 21:15 GMT+09:00 Iwao AVE! <[hidden email]>:
Hi, thanks for the info!

I'll try to find the cause, but it could be tricky without reproducing the issue.
If you could provide a small project demonstrating your lazy-loading use case, it would be very much appreciated (even if the issue is not reproducible with it).

And maybe you should set the configurationFactory and see how the situation changes.
With Spring, Configuration can be obtained via injected SqlSession.

Regards,
Iwao

2016-08-17 1:06 GMT+09:00 Loïc MATHIEU <[hidden email]>:
Hello,

Both issues are really old ones!

I'm not performing any serialization/deserailization, we use jackson to map to json our objects loading from mybatis that's all.

Regards,

Loîc

On Tuesday, August 16, 2016 at 5:51:28 PM UTC+2, Iwao AVE! wrote:
Hi,

I also think it's lazy-loading related.

configurationFactory was added as a part of this PR.
(and there is an open ticket for writing documentation https://github.com/mybatis/mybatis-3/issues/507 )

I could reproduce the exception by removing 'configurationFactory' setting from the following test case's config.

Guessing from the issue comment and the test case, the exception is thrown when you 1) lazy-load some property after serializing/de-serializing the parent object and 2) 'configurationFactory' was not set.
As this feature does not seem to be optional, you may have to provide configurationFactory which is just a class with a method named getConfiguration returning Configuration instance.

Please let me know if you get this exception without performing any (de)serialization on the related objects.

Regards,
Iwao


2016-08-16 21:12 GMT+09:00 Loïc MATHIEU <[hidden email]>:
Hello,

No I didn't specify a 'configurationFactory' in my MyBatis config file, in fact I cannot see this property in the documentation : http://www.mybatis.org/mybatis-3/configuration.html
As I said, it works for 10000 calls then fails on one calls then works for 10000 other calls and deactivating the lazyloading functionality solved the issue. So I'm pretty sure that the issue is on the lazyloading code where some race situation occurs (there's some 'non-trheadsafe related comment in the code where the issue occurs).

Regards,
Loïc

On Friday, August 12, 2016 at 1:40:31 PM UTC+2, Iwao AVE! wrote:
Hi Loïc,

I don't know much about lazy loading, but do you specify 'configurationFactory' in your MyBatis config?

Regards,
Iwao


2016-08-11 23:59 GMT+09:00 Loïc MATHIEU <[hidden email]>:
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

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]om.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]om.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Loading...