32

12:18:55,541 INFO [UpdateChecker] New update(s) found: 2.0.0 [http://ehcache.org/news.html]

How do I suppress ehcache checking for new update(s), this is happening while loading my j2ee application and when ehcache is getting initialized.

Dario Seidl
  • 4,140
  • 1
  • 39
  • 55
Joe
  • 14,513
  • 28
  • 82
  • 144
  • 10
    This feature is a complete failure. I cannot understand why they did this. Imagine what would happen if all, say, 20 dependencies of an application did this! – cherouvim Aug 14 '10 at 07:11
  • @cherouvim: Completely agree. Googling shows a [Jira issue](https://jira.terracotta.org/jira/browse/EHC-461) which was closed 5 years ago as "won't fix". Mind-bogglingly intrusive way for open-source software to behave. – Amos M. Carpenter Nov 13 '14 at 00:47

2 Answers2

38

One way is to place a ehcache.xml file on your classpath with the attribute updateCheck="false" in the root tag.

For example:

<ehcache updateCheck="false">
  <defaultCache
    maxElementsInMemory="0"
    eternal="false"
    timeToIdleSeconds="0"
    timeToLiveSeconds="0"
    overflowToDisk="false"
    diskPersistent="false"/>
</ehcache>

Another way is to set an environment variable:

System.setProperty("net.sf.ehcache.skipUpdateCheck", "true");
Sven
  • 689
  • 5
  • 8
  • exactly what I was looking for - thanks. modifying the ehcache.xml helped and it was already present in the classpath – Joe Mar 12 '10 at 03:56
  • 2
    Actually this is partially correct, the sys prop setting will work but simply putting the ehcache xml file at the root of the classpath will not. You must also add updateCheck="false" to the outer ehcache element as described below @Anthony Dahanne and in the documentation: http://ehcache.org/documentation/user-guide/configuration – TechTrip Feb 25 '13 at 15:24
  • current configuration docs are at http://www.ehcache.org/documentation/2.8/configuration/configuration.html#update-checker – Gregor May 26 '17 at 14:43
18

simply put, in your ehcache.xml configuration file, make sure you disable the updateCheck :

<ehcache updateCheck="false">

<defaultCache
        maxElementsInMemory="0"
        eternal="false"
        timeToIdleSeconds="0"
        timeToLiveSeconds="0"
        overflowToDisk="false"
        diskPersistent="false"
        />
</ehcache>
Anthony Dahanne
  • 4,823
  • 2
  • 40
  • 39