Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EhCache raised ClassCastException after reload in dev mode #1368

Closed
BoboYaya opened this issue Oct 21, 2020 · 4 comments
Closed

EhCache raised ClassCastException after reload in dev mode #1368

BoboYaya opened this issue Oct 21, 2020 · 4 comments
Assignees
Milestone

Comments

@BoboYaya
Copy link

public A getAFromCache(long id){
  A a = cache.get(A_NAME + id);   //热更新时这一句会报 A cannot be cast to A
  if(null == a){
   a = dao.find(id);
   cache.put(A_NAME + id,  a)
  }
  return a;
}

在开发状态下,如果热更新的时候就会报java.lang.ClassCastException。不更新则可以正常运行。控制台无错误信息输出,前台会报HTTP/1.1 500

@greenlaw110
Copy link
Contributor

Hi @BoboYaya can you please report your actframework version?

@greenlaw110 greenlaw110 self-assigned this Oct 23, 2020
@greenlaw110 greenlaw110 added this to the 1.9.1 milestone Oct 23, 2020
@BoboYaya
Copy link
Author

BoboYaya commented Oct 26, 2020

Actframework version:1.9.0.1

@greenlaw110
Copy link
Contributor

@BoboYaya can you try the latest act-1.9.1-SNAPSHOT?

@greenlaw110 greenlaw110 changed the title Ehcache 获取缓存时报ClassCastException错误 EhCache raised ClassCastException after reload in dev mode Nov 29, 2020
@BoboYaya
Copy link
Author

act-1.9.1-SNAPSHOT 已经修复!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants