Eclipse运行文件出现No embedded stylesheet instruction for file错误

本文记录了一次在Eclipse中因错误运行XML文件而非Java文件导致的异常情况,解析了错误信息并提供了正确的解决方案。

16:28:27,001 INFO  [main] Main  - javax.xml.transform.TransformerFactory=null
16:28:27,002 INFO  [main] Main  - java.endorsed.dirs=C:\Program Files\Java\jdk1.8.0_60\jre\lib\endorsed
16:28:27,005 INFO  [main] Main  - launchFile: F:\eclipse\workspace\.metadata\.plugins\org.eclipse.wst.xsl.jaxp.launching\launch\launch.xml
16:28:27,290 FATAL [main] Main  - No embedded stylesheet instruction for file: file:/F:/eclipse/workspace/TestMyBatis/src/batis.xml
org.eclipse.wst.xsl.jaxp.debug.invoker.TransformationException: No embedded stylesheet instruction for file: file:/F:/eclipse/workspace/TestMyBatis/src/batis.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:189)
    at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.Main.main(Main.java:75)
Caused by: org.eclipse.wst.xsl.jaxp.debug.invoker.TransformationException: No embedded stylesheet instruction for file: file:/F:/eclipse/workspace/TestMyBatis/src/batis.xml
    at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.transform(JAXPSAXProcessorInvoker.java:215)
    ... 2 more


╮( ̄▽ ̄")╭,这是一个比较蠢的错误,在点击运行的时候当前打开的文档为xml文件,应该运行Java文件,运行错误。

点击Java文件运行成功

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值