Closed GoogleCodeExporter closed 9 years ago
What version of the MyBatis are you using?
3.0.4 mybatis-spring-1.0.0
Please describe the problem. Unit tests are best!
cache can't out of decorated
What is the expected output? What do you see instead?
expected output: ehcache logging
instead: mybatis LoggingCache log
Please provide any additional information below.
as above said, evictionClass has to be set or with a default value LruCache.
then decorator worked.
Original comment by shiym...@gmail.com
on 23 Jun 2011 at 2:35
Original comment by eduardo.macarron
on 18 Jan 2012 at 11:42
fixed in r4590. Decorators are no longer applied to custom caches.
Thanks for the report!
Original comment by eduardo.macarron
on 18 Jan 2012 at 12:37
Original comment by eduardo.macarron
on 18 Jan 2012 at 12:37
Original comment by eduardo.macarron
on 5 Feb 2012 at 6:56
Eduardo, you said that this decoration should apply to custom caches.
However the ehcache, hazelnutcache,memcache and oscache impl in the plugin
project also suffer from this problem, as it's class also start with
org.apache.ibatis...
Original comment by vonk.th...@gmail.com
on 26 Oct 2012 at 11:22
Vonk, they start with org.mybatis... aren't they?
Original comment by eduardo.macarron
on 26 Oct 2012 at 11:29
Yes. They start with "org.apache.ibatis"
But they don't implement the decorator option. They use the String id
constructor
Error parsing Mapper XML. Cause: org.apache.ibatis.cache.CacheException:
Invalid cache decorator (class org.mybatis.caches.ehcache.EhcacheCache). Cache
decorators must have a constructor that takes a Cache instance as a parameter.
Cause: java.lang.NoSuchMethodException:
Original comment by vonk.th...@gmail.com
on 26 Oct 2012 at 11:49
[deleted comment]
Ow wait, I'm now overlooking something. (Looking again at the error trace.
Maybe multiple mybatis versions on my classpath...
Original comment by vonk.th...@gmail.com
on 26 Oct 2012 at 11:57
Original issue reported on code.google.com by
shiym...@gmail.com
on 22 Jun 2011 at 2:17