【问题标题】:Spring + ehcache + bigmemory go integrationSpring + ehcache + bigmemory go 集成
【发布时间】:2013-07-22 05:03:07
【问题描述】:

我正在集成spring3.2 + ehcache + bigmemory go。

首先,我不明白“将 BigMemory Go 许可证密钥文件保存到 BigMemory Go 主目录”这个术语是什么。我在 glassfish 上部署的 java Web 应用程序中的 BigMemory Go 主目录是什么。

请求帮助。

其次,我收到此错误: 嵌套异常是 net.sf.ehcache.CacheException: 无法实例化企业功能管理器

以下是我的文件;

<bean id="ehcacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
   <property name="configLocation" value="/WEB-INF/ehcache.xml" />    
      <property name="shared" value="true" />          
</bean>

代码:

<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd" name="myBigMemoryGoConfig">      
    <diskStore path="C:/bigmemorygo"/>
 <cache name="CACHE_GEN" maxBytesLocalHeap="124M" maxBytesLocalOffHeap="1G">
     <persistence strategy="localRestartable"/>
 </cache>  
 <cache name="CACHE_CMP" maxBytesLocalHeap="124M" maxBytesLocalOffHeap="1G">
     <persistence strategy="localRestartable"/>
 </cache>  

 </ehcache>

帮助表示赞赏。

谢谢, 戈德温

【问题讨论】:

    标签: spring hibernate ehcache ehcache-bigmemory


    【解决方案1】:

    对于 BigMemory 许可证,它只需要在您的应用程序类路径中...2 种方法来做到这一点:

    • 将许可文件复制到应用程序的“WEB-INF/classes”文件夹中(如果使用 maven 构建,则位于 /src/main/resources 文件夹中...)
    • 或者,如果您不想在应用程序中复制许可文件,请将 JVM 参数“-Dcom.tc.productkey.path=”添加到您的应用服务器启动脚本(或 JAVA_OPTS 例如)

    对于异常,可能与许可证有关...如果可以,请向我们展示异常堆栈。

    希望对您有所帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-11-02
      • 1970-01-01
      • 2011-07-12
      • 2011-06-20
      • 2017-01-27
      • 2012-04-24
      • 2022-08-21
      • 2015-10-21
      相关资源
      最近更新 更多