你好,我正在尝试在我的本地系统上设置Ehcache,只有基于java的缓存,我正在执行。当我刚刚运行main方法“10:16:32,637 INFO main Main - javax.xml.transform.TransformerFactory=null”时,我得到了异常
10:16:32,684致命的main - No embedded stylesheet instruction for file: file:/C:/workspaces/Ehacache/EhcacheTest/src/config/ehcache.xml org.eclipse.wst.xsl.jaxp.debug.invoker.TransformationException: No embedded stylesheet instruction for file: file:/C:/workspaces/Ehacache/EhcacheTest/src/config/ehcache.xml at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.transform(JAXPSAXProcessorInvoker.java:225) at org.eclipse.wst.xsl.jaxp。在org.eclipse.wst.xsl.jaxp.debug.invoker.internal.Main.main(Main.java:73)处出现debug.invoker.internal.JAXPSAXProcessorInvoker.transform(JAXPSAXProcessorInvoker.java:186)的原因: 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,还需要我提一下吗?
发布于 2011-08-23 05:19:26
我认为您没有运行Java类的main方法,但是Eclipse正在尝试执行您的ehcache.xml文件。您需要确保运行正确的目标。
https://stackoverflow.com/questions/6936365
复制相似问题