gpt4 book ai didi

hibernate - 软锁定缓存条目已被底层 Ehcache 过期

转载 作者:行者123 更新时间:2023-12-03 08:17:01 29 4
gpt4 key购买 nike

hibernate 3.3.x、ehcache 2.2.x

The following error occurs, when I try to publish a lots of users in a single go. Any idea on why this would happen and how to rectify this? Is there a way to disable this cache prior to bulk loading of users, if so how should I do that?


17:17:50,140 WARN [AbstractReadWriteEhcacheAccessStrategy] Cache
persistence.unit:unitName=my.ear/my-ejb-1.0.0.jar#my.com.mycompany.User.phones Key com.mycompany.User.phones#9915 Lockable : null

A soft-locked cache entry was expired by the underlying Ehcache.
If this happens regularly you should consider increasing the cache timeouts and/or capacity limits

编辑1:

当我尝试通过 JPA 调用将大量用户批量加载到数据库中时,会发生此错误。我不会通过拆卸钩子(Hook)关闭缓存管理器。

最佳答案

从描述来看,您的实体的二级缓存似乎已满,其中一些实体过早地从底层 ehcache 中逐出。你有吗flush & clear hibernate Session在批量插入期间定期进行,如 documentation 中所述?

关于hibernate - 软锁定缓存条目已被底层 Ehcache 过期,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5676566/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com