你好,我想在我的本地系統上設置Ehcache,只有基於java的緩存,我正在執行。我得到了異常,當我只運行主方法「10:16:32,637 INFO [main] Main - javax.xml.transform.TransformerFactory = nullehcache幫助需要
10:16:32,684 FATAL [main] Main - 沒有嵌入的樣式表指令文件:file:/ C:/workspaces/Ehacache/EhcacheTest/src/config/ehcache.xml org.eclipse.wst.xsl.jaxp.debug.invoker.TransformationException:沒有嵌入的文件樣式表指令:file:/ C:/workspaces/Ehacache/EhcacheTest/src/config/ehcache.xml 位於org.eclipse.jar上的org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.transform(JAXPSAXProcessorInvoker.java:225) 。 wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.transform(JAXPSAXProcessorInvoker.java:186) at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.Main.main(Mai n.java:73) 引起:org.eclipse.wst.xsl.jaxp.debug.invoker.TransformationException:沒有嵌入的文件樣式表指令:「
在我的代碼中,我只把這個放在main方法中
CacheManager cm = new CacheManager("src/config/ehcache.xml");
String[] test = cm.getCacheNames();
System.out.println(test.length);
並且還在我的src/config /中我只放了ehcache.xml。我沒有把ehcache.xsd,我需要提及的是,我也需要提及