代码之家  ›  专栏  ›  技术社区  ›  Pablojim

阻止ehcache在启动时尝试访问internet

  •  6
  • Pablojim  · 技术社区  · 16 年前

    启动时出现以下错误:

    <06-Sep-2010 19:14:05 o'clock BST> <Error> <Net>  <Failed to communicate with proxy:   10.x.x.x/8080. Will try connection www.terracotta.org/80 now.
    

    java.net.SocketTimeoutException:连接超时

    如何阻止此呼叫?

    这是我的ehcache.xml文件:

    <ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="ehcache.xsd"
             updateCheck="false" monitoring="off" dynamicConfig="false">
    
    
    <defaultCache maxElementsInMemory="1000" eternal="false"
        timeToIdleSeconds="60" timeToLiveSeconds="60"
         overflowToDisk="false" >
          <terracotta clustered="false"/>
    </defaultCache>
    

    我确信这个ehcache.xml文件正在获取和使用,例如没有类路径问题。

    我正在使用:ehcache 2.0.1和hibernate 3.3.1.GA

    2 回复  |  直到 16 年前
        1
  •  15
  •   earldouglas    16 年前

    添加时 updateCheck="false" 给你的 <ehcache /> 元素不起作用,请尝试使用 -Dnet.sf.ehcache.skipUpdateCheck=true System.setProperty("net.sf.ehcache.skipUpdateCheck", "true")

        2
  •  2
  •   theINtoy    12 年前

    这对我有用:

    <ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:noNamespaceSchemaLocation="ehcache.xsd" 
     updateCheck="false">
    
    ...
    
    </ehcache>