Eclipse报错"No embedded stylesheet instruction for file"的解决方法
2011-07-08 19:09
561 查看
原文:http://hi.baidu.com/ini_always/blog/item/3c4b7a531ca15e15377abe7e.html
前一阵子去实习,后来也没什么好写的,所以很久没写东西了。今天刚好遇到个错误,而且是可写的,所以拿来和大家一起分享。先看一下控制台输出的内容,如下:15:34:18,286 INFO [main] Main - javax.xml.transform.TransformerFactory=null
15:34:18,288 INFO [main] Main - java.endorsed.dirs=C:\SDKs\JDK\jre\lib\endorsed
15:34:18,293 INFO [main] Main - launchFile: E:\Eclipse Works\.metadata\.plugins\org.eclipse.wst.xsl.jaxp.launching\launch\launch.xml
15:34:18,351 FATAL [main] Main - No embedded stylesheet instruction for file: file:/E:/Eclipse%20Works/filemanager2.x/config/conf.xml
org.eclipse.wst.xsl.jaxp.debug.invoker.TransformationException: No embedded stylesheet instruction for file: file:/E:/Eclipse%20Works/filemanager2.x/config/conf.xml
at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.transform(JAXPSAXProcessorInvoker.java:225)
at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.transform(JAXPSAXProcessorInvoker.java:186)
at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.Main.main(Main.java:73)
Caused by: org.eclipse.wst.xsl.jaxp.debug.invoker.TransformationException: No embedded stylesheet instruction for file: file:/E:/Eclipse%20Works/filemanager2.x/config/conf.xml
at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.transform(JAXPSAXProcessorInvoker.java:214)
... 2 more
以上错误是我在Eclipse中运行程序时,点击那个绿色的Run按钮时出现的,于是我Copy了关键词去Google,Google出来的东东边都沾不上。度娘更不行,看来,只有自己瞎掰了,说不定能掰出来呢。我又尝试在Project上点右键,Run As->Java Application,结果居然能运行,我了个去,莫非是Eclipse的Bug?突然我灵光一闪,因为我点击Run按钮时,编辑界面显示的是一个xml文件,莫非?于是点击Run按钮右侧的下拉列表,选择main()方法所在的类运行,居然成功了!好了,真相大白了。分析:因为编辑界面显示的是一个xml文件,所以点Run按钮时,Eclipse并不是去Project中寻找main()方法来运行,而是“运行”当前的xml文件,至于是在干什么我也不清楚,结果也很简单,因为你的xml不符合Eclipse的“运行”要求,所以它自然要报错了。解决方法:运行Project时不要把编辑界面放在xml上,或者,手动选择main()方法所在的类,点"Run"。
前一阵子去实习,后来也没什么好写的,所以很久没写东西了。今天刚好遇到个错误,而且是可写的,所以拿来和大家一起分享。先看一下控制台输出的内容,如下:15:34:18,286 INFO [main] Main - javax.xml.transform.TransformerFactory=null
15:34:18,288 INFO [main] Main - java.endorsed.dirs=C:\SDKs\JDK\jre\lib\endorsed
15:34:18,293 INFO [main] Main - launchFile: E:\Eclipse Works\.metadata\.plugins\org.eclipse.wst.xsl.jaxp.launching\launch\launch.xml
15:34:18,351 FATAL [main] Main - No embedded stylesheet instruction for file: file:/E:/Eclipse%20Works/filemanager2.x/config/conf.xml
org.eclipse.wst.xsl.jaxp.debug.invoker.TransformationException: No embedded stylesheet instruction for file: file:/E:/Eclipse%20Works/filemanager2.x/config/conf.xml
at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.transform(JAXPSAXProcessorInvoker.java:225)
at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.transform(JAXPSAXProcessorInvoker.java:186)
at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.Main.main(Main.java:73)
Caused by: org.eclipse.wst.xsl.jaxp.debug.invoker.TransformationException: No embedded stylesheet instruction for file: file:/E:/Eclipse%20Works/filemanager2.x/config/conf.xml
at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.transform(JAXPSAXProcessorInvoker.java:214)
... 2 more
以上错误是我在Eclipse中运行程序时,点击那个绿色的Run按钮时出现的,于是我Copy了关键词去Google,Google出来的东东边都沾不上。度娘更不行,看来,只有自己瞎掰了,说不定能掰出来呢。我又尝试在Project上点右键,Run As->Java Application,结果居然能运行,我了个去,莫非是Eclipse的Bug?突然我灵光一闪,因为我点击Run按钮时,编辑界面显示的是一个xml文件,莫非?于是点击Run按钮右侧的下拉列表,选择main()方法所在的类运行,居然成功了!好了,真相大白了。分析:因为编辑界面显示的是一个xml文件,所以点Run按钮时,Eclipse并不是去Project中寻找main()方法来运行,而是“运行”当前的xml文件,至于是在干什么我也不清楚,结果也很简单,因为你的xml不符合Eclipse的“运行”要求,所以它自然要报错了。解决方法:运行Project时不要把编辑界面放在xml上,或者,手动选择main()方法所在的类,点"Run"。
相关文章推荐
- Eclipse报错"No embedded stylesheet instruction for file"的解决方法
- SpringBoot No embedded stylesheet instruction for file: ……logback.xml
- No embedded stylesheet instruction for file:奇怪的错误
- No embedded stylesheet instruction for file
- Error:No suitable device found: no device found for connection "System eth0"解决方法
- error: #5: cannot open source input file "stm32f10x_conf.h": No such fi 解决方法
- log4J:"WARN No appenders could be found for logger"解决方法
- nginx运行php"No input file specified"错误的解决方法
- Delphi调用Java的WebService报错can not find dispatch method for{null}terminalNo using "Payload QName-based Dispatcher"的解决方法
- struts2关于"There is no Action mapped for namespace / and action name"的解决方法
- vc++6.0编译出错解决方法---"No such file or directory "
- no rule to process file "xxxxxxxxx" of type XXXXXX.h for architecture i386解决办法
- VC++6.0中常出现的"unexpected end of file while looking for precompiled header directive"的问题解决方法
- No entry for terminal type "unknown"的解决方法
- 运行docker容器时报standard_init_linux.go:195: exec user process caused "no such file or directory" 的解决方法
- SlickEdit在64bit Ubuntu下运行vsinst安装程序出现"No such file or directory"的解决方法
- 关于Struts2报"No result defined for action +(包名) and result input"的解决方法
- "error: Error retrieving parent for item: No resource found that matches" 错误的解决方法
- Spark No FileSystem for scheme file 解决方法
- Nginx 报错: nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed (2: No such file or directory) 的解决方法