[Logo] Terracotta Discussion Forums
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
net.sf.ehcache.CacheException: Unable to include <terracotta> tag in ehcache.xml  XML
Forum Index -> Ehcache
Author Message
ydb6rhy

neo

Joined: 03/09/2012 11:29:13
Messages: 2
Offline

I am integrating the ecache with distributed TC Server array into a RESTful web-service. I am attempting the following configuration in ehcache.xml:
Code:
 <?xml version="1.0" encoding="UTF-8"?>
 
 <ehcache dynamicConfig="true" monitoring="autodetect" updateCheck="true" xsi:noNamespaceSchemaLocation="ehcache.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 
 	<diskStore path="/<path.to.diskstore>/"/>
 	
     <terracottaConfig rejoin="false" url="<dsoURL1:9510>,<dsoURL2:9510>" />
 	<cache memoryStoreEvictionPolicy="LFU" overflowToDisk="false" timeToLiveSeconds="600" timeToIdleSeconds="300" eternal="false" maxElementsInMemory="1000" 
                                  transactionalMode="off" name="customerCache">
 		<terracotta/>
 		<cacheWriter writeMode="write-behind" minWriteDelay="1" maxWriteDelay="5" rateLimitPerSecond="5" writeCoalescing="true" writeBatching="true" writeBatchSize="1" retryAttempts="2" 
                                   retryAttemptDelaySeconds="1"> 
 			<cacheWriterFactory class="com.ben.cache.CustomerCacheWriterFactory" /> </cacheWriter>
 	</cache>
 
 </ehcache>
 


When I add the <terracotta/> tag to use the default terracotta config, I receive the following stack trace when launching the web-service:

Code:
 Mar 9, 2012 2:41:23 PM org.apache.catalina.core.AprLifecycleListener init
 ...
 Mar 9, 2012 2:44:25 PM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
 INFO: Initiating Jersey application, version 'Jersey: 1.12 02/15/2012 05:30 PM'
 Mar 9, 2012 2:44:26 PM net.sf.ehcache.terracotta.TerracottaClient info
 INFO: Thread [http-bio-8080-exec-3] [cacheManager: no name]: Creating new ClusteredInstanceFactory
 Mar 9, 2012 2:44:27 PM com.sun.jersey.core.spi.component.ProviderFactory __getComponentProvider
 SEVERE: The provider class, class com.ben.service.CustomerApplication, could not be instantiated. Processing will continue but the class will not be utilized
 net.sf.ehcache.CacheException: Unable to load class net.sf.ehcache.terracotta.ExpressEnterpriseTerracottaClusteredInstanceFactory. Initial cause was null
 	at net.sf.ehcache.util.ClassLoaderUtil.createNewInstance(ClassLoaderUtil.java:109)
 	at net.sf.ehcache.terracotta.TerracottaClusteredInstanceHelper.newClusteredInstanceFactory(TerracottaClusteredInstanceHelper.java:178)
 	at net.sf.ehcache.terracotta.TerracottaClient.createNewClusteredInstanceFactory(TerracottaClient.java:201)
 	at net.sf.ehcache.terracotta.TerracottaClient.createClusteredInstanceFactory(TerracottaClient.java:153)
 	at net.sf.ehcache.CacheManager.init(CacheManager.java:347)
 	at net.sf.ehcache.CacheManager.<init>(CacheManager.java:302)
 	at com.ben.service.CustomerResource.<init>(CustomerResource.java:24)
 	at com.ben.service.CustomerApplication.<init>(CustomerApplication.java:20)
 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
 	at java.lang.reflect.Constructor.newInstance(Unknown Source)
 	at java.lang.Class.newInstance0(Unknown Source)
 	at java.lang.Class.newInstance(Unknown Source)
 	at com.sun.jersey.core.spi.component.ComponentConstructor._getInstance(ComponentConstructor.java:192)
 	at com.sun.jersey.core.spi.component.ComponentConstructor.getInstance(ComponentConstructor.java:179)
 	at com.sun.jersey.core.spi.component.ProviderFactory.__getComponentProvider(ProviderFactory.java:166)
 	at com.sun.jersey.core.spi.component.ProviderFactory._getComponentProvider(ProviderFactory.java:159)
 	at com.sun.jersey.core.spi.component.ProviderFactory.getComponentProvider(ProviderFactory.java:153)
 	at com.sun.jersey.server.impl.application.DeferredResourceConfig$ApplicationHolder.<init>(DeferredResourceConfig.java:84)
 	at com.sun.jersey.server.impl.application.DeferredResourceConfig$ApplicationHolder.<init>(DeferredResourceConfig.java:78)
 	at com.sun.jersey.server.impl.application.DeferredResourceConfig.getApplication(DeferredResourceConfig.java:75)
 	at com.sun.jersey.server.impl.application.WebApplicationImpl._initiate(WebApplicationImpl.java:1142)
 	at com.sun.jersey.server.impl.application.WebApplicationImpl.access$700(WebApplicationImpl.java:171)
 	at com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:777)
 	at com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:773)
 	at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:193)
 	at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:773)
 	at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:768)
 	at com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:488)
 	at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:318)
 	at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:607)
 	at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:208)
 	at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:373)
 	at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:556)
 	at javax.servlet.GenericServlet.init(GenericServlet.java:160)
 	at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266)
 	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185)
 	at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:857)
 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135)
 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
 	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
 	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928)
 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
 	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
 	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)
 	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:298)
 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
 	at java.lang.Thread.run(Unknown Source)
 Caused by: java.lang.ExceptionInInitializerError
 	at net.sf.ehcache.terracotta.ExpressEnterpriseTerracottaClusteredInstanceFactory.<init>(ExpressEnterpriseTerracottaClusteredInstanceFactory.java:37)
 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
 	at java.lang.reflect.Constructor.newInstance(Unknown Source)
 	at net.sf.ehcache.util.ClassLoaderUtil.createNewInstance(ClassLoaderUtil.java:92)
 	... 52 more
 Caused by: java.lang.RuntimeException: The Terracotta config file should not be set through -Dtc.config in this usage.
 	at org.terracotta.express.ClientFactoryImpl.testForWrongTcconfig(ClientFactoryImpl.java:364)
 	at org.terracotta.express.ClientFactoryImpl.<init>(ClientFactoryImpl.java:49)
 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
 	at java.lang.reflect.Constructor.newInstance(Unknown Source)
 	at java.lang.Class.newInstance0(Unknown Source)
 	at java.lang.Class.newInstance(Unknown Source)
 	at org.terracotta.express.Util.getImplInstance(Util.java:11)
 	at org.terracotta.express.ClientFactory.<clinit>(ClientFactory.java:12)
 	... 58 more
 Mar 9, 2012 2:44:27 PM org.apache.catalina.core.ApplicationContext log
 SEVERE: StandardWrapper.Throwable
 com.sun.jersey.api.container.ContainerException: The Application class com.ben.service.CustomerApplication could not be instantiated
 	at com.sun.jersey.server.impl.application.DeferredResourceConfig$ApplicationHolder.<init>(DeferredResourceConfig.java:86)
 	at com.sun.jersey.server.impl.application.DeferredResourceConfig$ApplicationHolder.<init>(DeferredResourceConfig.java:78)
 	at com.sun.jersey.server.impl.application.DeferredResourceConfig.getApplication(DeferredResourceConfig.java:75)
 	at com.sun.jersey.server.impl.application.WebApplicationImpl._initiate(WebApplicationImpl.java:1142)
 	at com.sun.jersey.server.impl.application.WebApplicationImpl.access$700(WebApplicationImpl.java:171)
 	at com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:777)
 	at com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:773)
 	at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:193)
 	at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:773)
 	at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:768)
 	at com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:488)
 	at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:318)
 	at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:607)
 	at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:208)
 	at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:373)
 	at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:556)
 	at javax.servlet.GenericServlet.init(GenericServlet.java:160)
 	at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266)
 	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185)
 	at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:857)
 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135)
 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
 	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
 	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928)
 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
 	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
 	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)
 	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:298)
 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
 	at java.lang.Thread.run(Unknown Source)
 Mar 9, 2012 2:44:27 PM org.apache.catalina.core.StandardWrapperValve invoke
 SEVERE: Allocate exception for servlet JAXRS
 com.sun.jersey.api.container.ContainerException: The Application class com.ben.service.CustomerApplication could not be instantiated
 	at com.sun.jersey.server.impl.application.DeferredResourceConfig$ApplicationHolder.<init>(DeferredResourceConfig.java:86)
 	at com.sun.jersey.server.impl.application.DeferredResourceConfig$ApplicationHolder.<init>(DeferredResourceConfig.java:78)
 	at com.sun.jersey.server.impl.application.DeferredResourceConfig.getApplication(DeferredResourceConfig.java:75)
 	at com.sun.jersey.server.impl.application.WebApplicationImpl._initiate(WebApplicationImpl.java:1142)
 	at com.sun.jersey.server.impl.application.WebApplicationImpl.access$700(WebApplicationImpl.java:171)
 	at com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:777)
 	at com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:773)
 	at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:193)
 	at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:773)
 	at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:768)
 	at com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:488)
 	at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:318)
 	at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:607)
 	at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:208)
 	at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:373)
 	at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:556)
 	at javax.servlet.GenericServlet.init(GenericServlet.java:160)
 	at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266)
 	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185)
 	at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:857)
 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135)
 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
 	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
 	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928)
 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
 	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
 	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)
 	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:298)
 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
 	at java.lang.Thread.run(Unknown Source)
 Mar 9, 2012 2:44:27 PM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
 INFO: Initiating Jersey application, version 'Jersey: 1.12 02/15/2012 05:30 PM'
 Mar 9, 2012 2:44:27 PM net.sf.ehcache.terracotta.TerracottaClient info
 INFO: Thread [http-bio-8080-exec-4] [cacheManager: no name]: Creating new ClusteredInstanceFactory
 Mar 9, 2012 2:44:27 PM com.sun.jersey.core.spi.component.ProviderFactory __getComponentProvider
 SEVERE: The provider class, class com.ben.service.CustomerApplication, could not be instantiated. Processing will continue but the class will not be utilized
 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:182)
 	at net.sf.ehcache.terracotta.TerracottaClient.createNewClusteredInstanceFactory(TerracottaClient.java:201)
 	at net.sf.ehcache.terracotta.TerracottaClient.createClusteredInstanceFactory(TerracottaClient.java:153)
 	at net.sf.ehcache.CacheManager.init(CacheManager.java:347)
 	at net.sf.ehcache.CacheManager.<init>(CacheManager.java:302)
 	at com.ben.service.CustomerResource.<init>(CustomerResource.java:24)
 	at com.ben.service.CustomerApplication.<init>(CustomerApplication.java:20)
 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
 	at java.lang.reflect.Constructor.newInstance(Unknown Source)
 	at java.lang.Class.newInstance0(Unknown Source)
 	at java.lang.Class.newInstance(Unknown Source)
 	at com.sun.jersey.core.spi.component.ComponentConstructor._getInstance(ComponentConstructor.java:192)
 	at com.sun.jersey.core.spi.component.ComponentConstructor.getInstance(ComponentConstructor.java:179)
 	at com.sun.jersey.core.spi.component.ProviderFactory.__getComponentProvider(ProviderFactory.java:166)
 	at com.sun.jersey.core.spi.component.ProviderFactory._getComponentProvider(ProviderFactory.java:159)
 	at com.sun.jersey.core.spi.component.ProviderFactory.getComponentProvider(ProviderFactory.java:153)
 	at com.sun.jersey.server.impl.application.DeferredResourceConfig$ApplicationHolder.<init>(DeferredResourceConfig.java:84)
 	at com.sun.jersey.server.impl.application.DeferredResourceConfig$ApplicationHolder.<init>(DeferredResourceConfig.java:78)
 	at com.sun.jersey.server.impl.application.DeferredResourceConfig.getApplication(DeferredResourceConfig.java:75)
 	at com.sun.jersey.server.impl.application.WebApplicationImpl._initiate(WebApplicationImpl.java:1142)
 	at com.sun.jersey.server.impl.application.WebApplicationImpl.access$700(WebApplicationImpl.java:171)
 	at com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:777)
 	at com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:773)
 	at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:193)
 	at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:773)
 	at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:768)
 	at com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:488)
 	at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:318)
 	at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:607)
 	at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:208)
 	at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:373)
 	at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:556)
 	at javax.servlet.GenericServlet.init(GenericServlet.java:160)
 	at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266)
 	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185)
 	at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:857)
 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135)
 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
 	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
 	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928)
 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
 	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
 	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)
 	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:298)
 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
 	at java.lang.Thread.run(Unknown Source)
 Mar 9, 2012 2:44:27 PM org.apache.catalina.core.ApplicationContext log
 SEVERE: StandardWrapper.Throwable
 com.sun.jersey.api.container.ContainerException: The Application class com.ben.service.CustomerApplication could not be instantiated
 	at com.sun.jersey.server.impl.application.DeferredResourceConfig$ApplicationHolder.<init>(DeferredResourceConfig.java:86)
 	at com.sun.jersey.server.impl.application.DeferredResourceConfig$ApplicationHolder.<init>(DeferredResourceConfig.java:78)
 	at com.sun.jersey.server.impl.application.DeferredResourceConfig.getApplication(DeferredResourceConfig.java:75)
 	at com.sun.jersey.server.impl.application.WebApplicationImpl._initiate(WebApplicationImpl.java:1142)
 	at com.sun.jersey.server.impl.application.WebApplicationImpl.access$700(WebApplicationImpl.java:171)
 	at com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:777)
 	at com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:773)
 	at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:193)
 	at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:773)
 	at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:768)
 	at com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:488)
 	at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:318)
 	at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:607)
 	at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:208)
 	at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:373)
 	at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:556)
 	at javax.servlet.GenericServlet.init(GenericServlet.java:160)
 	at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266)
 	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185)
 	at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:857)
 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135)
 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
 	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
 	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928)
 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
 	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
 	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)
 	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:298)
 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
 	at java.lang.Thread.run(Unknown Source)
 Mar 9, 2012 2:44:27 PM org.apache.catalina.core.StandardWrapperValve invoke
 SEVERE: Allocate exception for servlet JAXRS
 com.sun.jersey.api.container.ContainerException: The Application class com.ben.service.CustomerApplication could not be instantiated
 	at com.sun.jersey.server.impl.application.DeferredResourceConfig$ApplicationHolder.<init>(DeferredResourceConfig.java:86)
 	at com.sun.jersey.server.impl.application.DeferredResourceConfig$ApplicationHolder.<init>(DeferredResourceConfig.java:78)
 	at com.sun.jersey.server.impl.application.DeferredResourceConfig.getApplication(DeferredResourceConfig.java:75)
 	at com.sun.jersey.server.impl.application.WebApplicationImpl._initiate(WebApplicationImpl.java:1142)
 	at com.sun.jersey.server.impl.application.WebApplicationImpl.access$700(WebApplicationImpl.java:171)
 	at com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:777)
 	at com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:773)
 	at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:193)
 	at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:773)
 	at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:768)
 	at com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:488)
 	at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:318)
 	at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:607)
 	at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:208)
 	at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:373)
 	at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:556)
 	at javax.servlet.GenericServlet.init(GenericServlet.java:160)
 	at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266)
 	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185)
 	at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:857)
 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135)
 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
 	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
 	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928)
 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
 	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
 	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)
 	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:298)
 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
 	at java.lang.Thread.run(Unknown Source)
 


I'm implementing the webservice through a jersey ServletContainer and deploying in Apache Tomcat 7.0

The following terracotta JARS are included in my classpath:
ehcache-core-ee-2.4.6.jar
ehcache-terracotta-ee-2.4.6.jar
slf4j-api-1.6.1.jar
slf4j-jdk14-1.6.1.jar
terracotta-toolkit-1.3-runtime-ee-3.3.0.jar

Any idea what's causing this error?
rajoshi

seraphim

Joined: 07/04/2011 04:36:10
Messages: 1491
Offline

Hi ,

This exception clearly says you are missing toolkit from classpath -

"net.sf.ehcache.CacheException: Could not create ClusteredInstanceFactory due to missing class. Please verify that terracotta-toolkit is in your classpath."


Can you please crosscheck if it's in the classpath of the application you are running with terracotta.


Also are you setting the path to tc-config.xml at runtime using system property ??

Rakesh Joshi
Senior Consultant
Terracotta.
ydb6rhy

neo

Joined: 03/09/2012 11:29:13
Messages: 2
Offline

Hi Rajoshi, thanks for the reply. I was able to deploy the WAR successfully in my weblogic instance - I'm not sure why Eclipse / Tomcat had trouble finding the toolkit JAR even tho it was in my classpath... Anyway - this is resolved. Thanks for your help.
 
Forum Index -> Ehcache
Go to:   
Powered by JForum 2.1.7 © JForum Team