简体   繁体   中英

Planning to use ehcache-2.10.1 in my Java project that already has hibernate-4.1.4 as a dependency. How do I get rid of possible conflict?

Here's the problem. Hibernate-4.1.4 has ehcache-core-2.4.3 that I just can't exclude easily (we don't use Maven...) and I'm not sure if just leaving it as is would cause a conflict with ehcache-2.10.1.

If worse comes to worst, I may opt to exclude ehcache-core-2.4.3 from hibernate and manually include ehcache-2.10.1 to my build path - however, I'm not sure if ehcache-2.10.1 will be compatible with hibernate 4.1.4.

Any other alternative solution?

Right, you want to drop the 2.4.3 from the classpath. How you do that depends on your build system, can't help you without knowing what you actually use there.

I think 2.10.1 will work out of the box should you run without clustering. But I could well be wrong. Replacing one with the other, you should know straight away though. (there has been some changes around the statistic APIs that have been an issue, but I can't recall when these happened).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM