我的组织正在开发一个使用terracotta服务器版本4.0.5实现ehcache的POC。使用我的本地机器进行测试时,一切正常。
当我们将代码部署到我们的Web应用程序时,它能够很好地连接到TSA但是在尝试创建CacheManager实例时我收到了以下异常。
我已经验证了所有必需的jar都在classpath中。
ehcache的-EE-2.7.5.jar
SLF4J-API-1.6.6.jar
SLF4J-jdk14-1.6.6.jar
terracotta-toolkit-runtime-ee-4.0.5.jar
它们位于我的Web应用程序WAR的WEB-INF / lib文件夹中。我们使用JRE的jrmc-3.1.2-1.6.0在weblogic 10.3.2上运行。
有没有人对导致此类错误的原因有任何想法?任何帮助表示赞赏。
: org.terracotta.toolkit.nonstop.NonStopToolkitInstantiationException: org.terracotta.toolkit.ToolkitRuntimeException: java.lang.NoClassDefFoundError: net/sf/ehcache/pool/sizeof/JvmInformation
at com.terracotta.toolkit.AsyncToolkitInitializer.getToolkit(AsyncToolkitInitializer.java:46)
at com.terracotta.toolkit.AsyncToolkitInitializer.getToolkit(AsyncToolkitInitializer.java:31)
at com.terracotta.toolkit.NonStopToolkitImpl.getInitializedToolkit(NonStopToolkitImpl.java:88)
at com.terracotta.toolkit.NonStopToolkitImpl.shutdown(NonStopToolkitImpl.java:277)
at org.terracotta.modules.ehcache.ToolkitInstanceFactoryImpl.shutdown(ToolkitInstanceFactoryImpl.java:265)
at org.terracotta.modules.ehcache.store.TerracottaClusteredInstanceFactory.shutdown(TerracottaClusteredInstanceFactory.java:142)
at net.sf.ehcache.terracotta.ClusteredInstanceFactoryWrapper.shutdown(ClusteredInstanceFactoryWrapper.java:121)
at net.sf.ehcache.terracotta.TerracottaClient.shutdownClusteredInstanceFactoryWrapper(TerracottaClient.java:159)
at net.sf.ehcache.terracotta.TerracottaClient.shutdown(TerracottaClient.java:153)
at net.sf.ehcache.CacheManager.init(CacheManager.java:395)
at net.sf.ehcache.CacheManager.<init>(CacheManager.java:265)
at net.sf.ehcache.CacheManager.newInstance(CacheManager.java:1123)
at net.sf.ehcache.CacheManager.newInstance(CacheManager.java:1099)
at com.hmsy.cts.cache.HMSCacheManager.getCacheInstance(HMSCacheManager.java:22)
at com.hmsy.cts.cache.CacheSearchAgent.executeSearch(CacheSearchAgent.java:41)
at com.hmsy.cts.delegate.SearchRecipient.work(SearchRecipient.java:68)
at com.hmsy.shr.event.ECEventWorkerThreadSafe.doWork(ECEventWorkerThreadSafe.java:39)
at com.hmsy.cts.web.CTServiceListener.actionPerformed(CTServiceListener.java:65)
at com.hmsy.shr.event.ECEventService.fireEvent(ECEventService.java:118)
at com.hmsy.cts.web.CTSearchServlet.processRequest(CTSearchServlet.java:126)
at com.hmsy.cts.web.CTSearchServlet.doPost(CTSearchServlet.java:73)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:499)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:248)
at com.hmsy.shr.web.ControllerServlet.processRequest(ControllerServlet.java:292)
at com.hmsy.shr.web.ControllerServlet.doPost(ControllerServlet.java:316)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at com.hmsy.shr.web.filter.BroadcastMessageFilter.doFilter(BroadcastMessageFilter.java:62)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
答案 0 :(得分:0)
我得到了同样的错误,因为Ehcache在尝试查找JRockit JVM参数时会收到NullPointerException。尝试使用常规JVM,而不是JRockit。它应该解决问题。