qianjava / ehcache-spring-annotations

Automatically exported from code.google.com/p/ehcache-spring-annotations
0 stars 0 forks source link

ClassCastException after Cache Refreshed in RefreshingSelfPopulatingCache #73

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
[What steps will reproduce the problem?]
1. Setup RefreshingSelfPopulatingCache for a method.
2. Wait for refresh to take effect.
3. Call the method and get the return value.

[What is the expected output?]
Refreshed element is returned.

[What do you see instead?]
java.lang.ClassCastException: 
com.googlecode.ehcache.annotations.RefreshableCacheEntry

[What version of the product are you using?]
ehcache-spring-annotations-1.2.0-M1

[On what operating system?]
RHEL 5.3

[Root Cause Analysis]
RefreshingCacheEntryFactory.updateEntryValue() replaces the old value with a 
wrapper by mistake. Patch is attached.

Original issue reported on code.google.com by icyblue....@gmail.com on 30 May 2011 at 6:38

Attachments:

GoogleCodeExporter commented 8 years ago
Please also update RefreshingSelfPopulatingTest to make sure the method can be 
invoked correctly after refresh.

Original comment by icyblue....@gmail.com on 30 May 2011 at 7:41

GoogleCodeExporter commented 8 years ago
Hi,

Thanks for providing this patch.

I spend one day debugging the code and eventually find this, and it fixed my 
problem.

@Eric can't you commit this into repository and create a new M2 build so we can 
use maven repos, instead of building the project on our side?

Thanks,
Nerses

Original comment by aznaur...@gmail.com on 13 Jul 2011 at 1:25

GoogleCodeExporter commented 8 years ago
I'll see if I can get this applied an a M2 out this week.

Original comment by eric.dalquist on 18 Jul 2011 at 4:15

GoogleCodeExporter commented 8 years ago

Original comment by eric.dalquist on 28 Jul 2011 at 3:19