2016-07-15 19 views
0

Hallo zusammen ich das Problem ist vor, in dem im nicht der Lage, meine ehcache.xml Datei & seine gibt mir Fehler wie untenEhcache (Unable Klasse laden)

Exception in thread "main" net.sf.ehcache.CacheException: Unable to load class net.sf.ehcache.terracotta.ExpressEnterpriseTerracottaClusteredInstanceFactory. Initial cause was org.terracotta.toolkit.ToolkitInstantiationException: java.lang.RuntimeException: Unable to create toolkit. 
    at net.sf.ehcache.util.ClassLoaderUtil.createNewInstance(ClassLoaderUtil.java:90) 
    at net.sf.ehcache.terracotta.TerracottaClusteredInstanceHelper.newClusteredInstanceFactory(TerracottaClusteredInstanceHelper.java:157) 
    at net.sf.ehcache.terracotta.TerracottaClient.createNewClusteredInstanceFactory(TerracottaClient.java:180) 
    at net.sf.ehcache.terracotta.TerracottaClient.createClusteredInstanceFactory(TerracottaClient.java:129) 
    at net.sf.ehcache.CacheManager.doInit(CacheManager.java:463) 
    at net.sf.ehcache.CacheManager.init(CacheManager.java:395) 
    at net.sf.ehcache.CacheManager.<init>(CacheManager.java:270) 
    at net.sf.ehcache.CacheManager.newInstance(CacheManager.java:1116) 
    at net.sf.ehcache.CacheManager.newInstance(CacheManager.java:947) 
    at BigMemoryDemo.main(BigMemoryDemo.java:8) 
Caused by: java.lang.RuntimeException: org.terracotta.toolkit.ToolkitInstantiationException: java.lang.RuntimeException: Unable to create toolkit. 
    at org.terracotta.modules.ehcache.TerracottaToolkitBuilder.createToolkit(TerracottaToolkitBuilder.java:63) 
    at org.terracotta.modules.ehcache.TerracottaToolkitBuilder.buildToolkit(TerracottaToolkitBuilder.java:56) 
    at org.terracotta.modules.ehcache.ToolkitInstanceFactoryImpl.createTerracottaToolkit(ToolkitInstanceFactoryImpl.java:183) 
    at org.terracotta.modules.ehcache.ToolkitInstanceFactoryImpl.<init>(ToolkitInstanceFactoryImpl.java:119) 
    at org.terracotta.modules.ehcache.ToolkitInstanceFactoryImpl.<init>(ToolkitInstanceFactoryImpl.java:129) 
    at org.terracotta.modules.ehcache.EnterpriseToolkitInstanceFactory.<init>(EnterpriseToolkitInstanceFactory.java:23) 
    at org.terracotta.modules.ehcache.store.EnterpriseTerracottaClusteredInstanceFactory.createToolkitInstanceFactory(EnterpriseTerracottaClusteredInstanceFactory.java:21) 
    at org.terracotta.modules.ehcache.store.TerracottaClusteredInstanceFactory.<init>(TerracottaClusteredInstanceFactory.java:65) 
    at org.terracotta.modules.ehcache.store.EnterpriseTerracottaClusteredInstanceFactory.<init>(EnterpriseTerracottaClusteredInstanceFactory.java:15) 
    at net.sf.ehcache.terracotta.ExpressEnterpriseTerracottaClusteredInstanceFactory.<init>(ExpressEnterpriseTerracottaClusteredInstanceFactory.java:11) 
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) 
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526) 
    at net.sf.ehcache.util.ClassLoaderUtil.createNewInstance(ClassLoaderUtil.java:73) 
    ... 9 more 
Caused by: org.terracotta.toolkit.ToolkitInstantiationException: java.lang.RuntimeException: Unable to create toolkit. 
    at com.terracotta.toolkit.api.TerracottaToolkitFactoryService.createToolkit(TerracottaToolkitFactoryService.java:49) 
    at org.terracotta.toolkit.ToolkitFactory.create(ToolkitFactory.java:100) 
    at org.terracotta.toolkit.ToolkitFactory.createToolkit(ToolkitFactory.java:84) 
    at org.terracotta.modules.ehcache.TerracottaToolkitBuilder.createToolkit(TerracottaToolkitBuilder.java:61) 
    ... 23 more 
Caused by: java.lang.RuntimeException: Unable to create toolkit. 
    at com.terracotta.toolkit.client.TerracottaToolkitCreator.createToolkit(TerracottaToolkitCreator.java:70) 
    at com.terracotta.toolkit.api.EnterpriseTerracottaToolkitFactoryService.createToolkit(EnterpriseTerracottaToolkitFactoryService.java:17) 
    at com.terracotta.toolkit.api.TerracottaToolkitFactoryService.createToolkit(TerracottaToolkitFactoryService.java:44) 
    ... 26 more 
Caused by: java.lang.RuntimeException: org.terracotta.toolkit.ToolkitRuntimeException: net.sf.ehcache.config.InvalidConfigurationException: The disk path for this cache manager is the default path. You must define a specific unique disk path for this manager in order to use restartable caches. 
    at com.terracotta.toolkit.client.TerracottaToolkitCreator.initializeDefaultCacheManagerProvider(TerracottaToolkitCreator.java:175) 
    at com.terracotta.toolkit.client.TerracottaToolkitCreator.createToolkit(TerracottaToolkitCreator.java:55) 
    ... 28 more 
Caused by: org.terracotta.toolkit.ToolkitRuntimeException: net.sf.ehcache.config.InvalidConfigurationException: The disk path for this cache manager is the default path. You must define a specific unique disk path for this manager in order to use restartable caches. 
    at com.terracotta.toolkit.express.TerracottaInternalClientImpl.instantiate(TerracottaInternalClientImpl.java:159) 
    at com.terracotta.toolkit.client.TerracottaToolkitCreator.initializeDefaultCacheManagerProvider(TerracottaToolkitCreator.java:173) 
    ... 29 more 
Caused by: net.sf.ehcache.config.InvalidConfigurationException: The disk path for this cache manager is the default path. You must define a specific unique disk path for this manager in order to use restartable caches. 
    at net.sf.ehcache.store.restartability.EhcacheRestartability.constructRestartability(EhcacheRestartability.java:189) 
    at net.sf.ehcache.store.restartability.EhcacheRestartability.startup(EhcacheRestartability.java:94) 
    at net.sf.ehcache.EnterpriseFeaturesManager.startup(EnterpriseFeaturesManager.java:102) 
    at net.sf.ehcache.CacheManager.doInit(CacheManager.java:520) 
    at net.sf.ehcache.CacheManager.init(CacheManager.java:395) 
    at net.sf.ehcache.CacheManager.<init>(CacheManager.java:270) 
    at net.sf.ehcache.CacheManager.newInstance(CacheManager.java:1116) 
    at net.sf.ehcache.CacheManager.newInstance(CacheManager.java:1092) 
    at com.terracotta.toolkit.ToolkitCacheManagerProvider.createDefaultToolkitCacheManager(ToolkitCacheManagerProvider.java:19) 
    at com.terracotta.toolkit.ToolkitCacheManagerProvider.<init>(ToolkitCacheManagerProvider.java:14) 
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) 
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526) 
    at com.terracotta.toolkit.express.TerracottaInternalClientImpl.instantiate(TerracottaInternalClientImpl.java:156) 
    ... 30 more 

Hinweis zu laden: - Es funktioniert gut vorhin. Ich habe gerade einen passiven Knoten bei TSA gemacht. TSA besteht & läuft

Dies ist ehcache.xml Datei

<?xml version="1.0" encoding="UTF-8"?> 
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     xsi:noNamespaceSchemaLocation="ehcache.xsd" 
     name="BigMemoryMax"> 
     <defaultCache   
     maxEntriesLocalHeap="0"/> 
     <cache name="PersonCache" maxEntriesLocalHeap="20"> 

     <searchable/> 

     </cache> 
     <terracottaConfig url="127.0.0.1:9510" /> 
</ehcache> 

Antwort

0

Der genaue Fehler ist an der Unterseite des Stack-Trace:

Caused by: net.sf.ehcache.config.InvalidConfigurationException: The disk path for this cache manager is the default path. You must define a specific unique disk path for this manager in order to use restartable caches. 
    at net.sf.ehcache.store.restartability.EhcacheRestartability.constructRestartability(EhcacheRestartability.java:189) 
    at net.sf.ehcache.store.restartability.EhcacheRestartability.startup(EhcacheRestartability.java:94) 
    at net.sf.ehcache.EnterpriseFeaturesManager.startup(EnterpriseFeaturesManager.java:102) 
    at net.sf.ehcache.CacheManager.doInit(CacheManager.java:520) 
    at net.sf.ehcache.CacheManager.init(CacheManager.java:395) 
    at net.sf.ehcache.CacheManager.<init>(CacheManager.java:270) 
    at net.sf.ehcache.CacheManager.newInstance(CacheManager.java:1116) 
    at net.sf.ehcache.CacheManager.newInstance(CacheManager.java:1092) 

Dieses ein Konfigurationsproblem gibt und gegeben, dass die Konfiguration, die Sie in Ihrer Frage geben, hat keine Disk-Komponente, es bedeutet, dass Ihre Anwendung eine andere ehcache.xml lädt.

Normalerweise zeigt Ehcache in seinen Protokollen an, welche Konfigurationsdatei geladen ist. Wenn Sie das nicht sehen, stellen Sie im Protokollierungs-Framework den Protokolliergrad auf DEBUG für net.sf.ehcache um.

+0

Ja @Louis. Danke für die Antwort. Ja, es wurde eine andere Konfiguration geladen. In Disk Path habe ich früher "java.io.tmpdir" verwendet. Danach habe ich es seitdem entfernt, es gab Problem sogar nach dem Geben des diff Pfads. Also habe ich alle Temp-Ordner-Daten in der Maschine entfernt, sobald ich das getan habe .. es fing an, gut zu arbeiten ...... Vielen Dank –