- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我是 EHCache 新手,并尝试将其用作我们的缓存服务器。我编写了尝试开始的代码:
public class CacheMap {
private static CacheManager cacheManager=new CacheManager("ehcache.xml");
private static Cache cache=cacheManager.getCache("firstCache");
}
在类路径中,我包含了 terracotta-toolkit-1.6-5.2.0.jar、terracotta-toolkit-1.6-runtime-5.0.0、slf4j-api-1.6.6、slf4j-jdk14-1.6.6、ehcache -2.7.0和ehcache-ee-2.7.0
我的根目录中有 ehcache.xml。
但是,我的代码第一行出现以下错误:
Exception in thread "main" java.lang.ExceptionInInitializerError
Caused by: net.sf.ehcache.CacheException: Could not create ClusteredInstanceFactory due to missing class. Please verify that terracotta-toolkit is in your classpath.
at net.sf.ehcache.terracotta.TerracottaClusteredInstanceHelper.newClusteredInstanceFactory(TerracottaClusteredInstanceHelper.java:187)
at net.sf.ehcache.terracotta.TerracottaClient.createNewClusteredInstanceFactory(TerracottaClient.java:169)
at net.sf.ehcache.terracotta.TerracottaClient.createClusteredInstanceFactory(TerracottaClient.java:126)
at net.sf.ehcache.CacheManager.doInit(CacheManager.java:442)
at net.sf.ehcache.CacheManager.init(CacheManager.java:392)
at net.sf.ehcache.CacheManager.<init>(CacheManager.java:291)
at CacheMap.<clinit>(CacheMap.java:7)
有什么想法可以让 Terracotta 工作吗?
最佳答案
我认为您已经混合了所需的陶 jar 。如果你使用maven,这里是terracotta版本的依赖项。 3.6.5(兼容JDK5的最后一个版本):
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache-core-ee</artifactId>
<version>2.5.6</version>
</dependency>
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache-terracotta-ee</artifactId>
<version>2.5.6</version>
</dependency>
<dependency>
<groupId>org.terracotta</groupId>
<artifactId>terracotta-toolkit-1.5-runtime-ee</artifactId>
<version>4.5.0</version>
</dependency>
另外,不要忘记指向 terracotta 的 maven 存储库来下载所需的 jar:
<repository>
<id>terracotta-repository</id>
<url>http://www.terracotta.org/download/reflector/releases</url>
<releases>
<enabled>true</enabled>
</releases>
</repository>
如果您不使用 Maven,那么您的类路径上应该有以下 jar:
关于java - Terracotta 工具包缺少类会阻止 EHCache 启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15637680/
有什么方法可以查询 Terracotta 实例存储的对象吗? 我正在寻找类似 SQL 的查询或任何基于字段过滤对象的方法。 最佳答案 至少企业版有自己的搜索API: http://www.terrac
是Terracotta分布式缓存? 最佳答案 虽然您没有具体说明您在谈论哪个产品,但我假设您指的是开源平台本身。简短的回答是否定的,但它可以用来写一个分布式缓存,并且已经在他们自己的产品之一(Ehca
假设我有一个 N 大小的服务器阵列设置如下: alt text http://www.terracotta.org/web/download/attachments/43909161/ServerAr
大约一个月前发现 Terracotta 后,我刚刚开始学习如何使用它。这是一项非常酷的技术。 基本上我想做的是: 我的根(记录系统)是一个 ConcurrentHashMap。 主要的 Instrum
我听说过“集群”一词用于应用程序服务器,例如 GlassFish 以及 Terracotta;我正在尝试理解集群这个词在与应用程序服务器结合使用时以及与 Terracotta 结合使用时的含义。 我的
什么是 Terracotta ? 它提供什么服务? 它解决了什么问题? 还有哪些其他产品可以解决与 Terracotta 解决的问题类似的问题? 最佳答案 在 InfoQ 上找到一篇关于 Terrac
通过添加ehcache.xml并设置Terracotta服务器,我一直在将Grails与Terracotta DSO结合使用。它工作得很好,但是我得到的消息是Terracotta不再支持他们的服务器(
就目前情况而言,这个问题不太适合我们的问答形式。我们希望答案得到事实、引用资料或专业知识的支持,但这个问题可能会引发辩论、争论、民意调查或扩展讨论。如果您觉得这个问题可以改进并可能重新开放,visit
这个问题有很多组成部分,我会尽力不遗漏任何一个: EhCache 与 Terracotta 一起使用进行集群 EhCache 同时用于 Spring 缓存和 Hibernate 二级缓存 为了只有一个
你知道是否有类似于 Terracotta 的内容吗? (在Java世界中)Python世界存在吗? Twisted ?或者其他什么。 最佳答案 我认为 Twisted 是您能找到的最佳选择。让我警告您
有没有人有使用 Terracotta 的开源产品而不是他们的企业产品的经验?具体来说,我感兴趣的是在没有企业工具的情况下使用 terracotta 来管理集群是否值得? 过度简化的使用摘要:我们是一家
.Net 是否有像 terracotta ( http://www.terracotta.org/ ) 这样的开源集群产品? 最佳答案 我不认为他们有任何与 Terracotta 完全相同的东西...
我只是不知道。我的意思是,有一些话题让我无法相信这一点。 例如,最新的稳定版本 (3.0.0-stable) 有一个损坏的 eclipse 插件,根本无法正常工作。此外,尝试在修订版之间进行升级是一件
使用 Terracotta 作为持久性解决方案(替换数据库)会是个好主意吗?我特别想知道数据完整性问题和对事务系统的支持。 最佳答案 Terracotta 是 transactional (同步块(s
我有一个运行 Hibernate 4.1.7 的应用程序,并且正在使用 ehcache 作为 2 级缓存。我知道从 Hibernate 4 开始,我需要使用与 hibernate 捆绑在一起的 ehc
如果是,在哪里可以找到?!根据this infoq 条目,他们已经开源了。但是现在,他们的网站上没有这样的产品。 最佳答案 本页,http://terracotta.org/dl/oss-downlo
我目前正在使用企业版 EhCache 在我们的应用程序中实现缓存。正如所解释的here ,我通过在我的 EhCache 类中使用以下构造函数以编程方式创建两个不同的缓存实例,我用它来管理 EhCach
我是 EHCache 新手,并尝试将其用作我们的缓存服务器。我编写了尝试开始的代码: public class CacheMap { private static CacheManager c
有没有人尝试过甚至考虑过使用 terracotta 解决方案(即 ehcache)来运行/存储 Neo4J? 我知道 Neo4J 具有高可用性,但这实际上只是复制。我真正想要的是一个分布式图解决方案,
我们正在尝试使用 JETTY 7.0 的暂停 servlet 3.0 API 实现来集群一个用 Java 编写的 COMET 网络应用程序。 有没有人有在暂停/恢复 servlet web 应用程序中
我是一名优秀的程序员,十分优秀!