在创建Sping项目练手时,提示"D:\JDK 1.8\JDK\bin\java.exe" -javaagent:D:\idea\IDEA_workSpace\IntelliJ_IDEA2018.3.6\lib\idea_rt.jar=56150:D:\idea\IDEA_workSpace\IntelliJ_IDEA2018.3.6\bin -Dfile.encoding=UTF-8 -classpath “D:\JDK 1.8\JDK\jre\lib\charsets.jar;D:\JDK 1.8\JDK\jre\lib\deploy.jar;D:\JDK 1.8\JDK\jre\lib\ext\access-bridge-64.jar;D:\JDK 1.8\JDK\jre\lib\ext\cldrdata.jar;D:\JDK 1.8\JDK\jre\lib\ext\dnsns.jar;D:\JDK 1.8\JDK\jre\lib\ext\jaccess.jar;D:\JDK 1.8\JDK\jre\lib\ext\jfxrt.jar;D:\JDK 1.8\JDK\jre\lib\ext\localedata.jar;D:\JDK 1.8\JDK\jre\lib\ext\nashorn.jar;D:\JDK 1.8\JDK\jre\lib\ext\sunec.jar;D:\JDK 1.8\JDK\jre\lib\ext\sunjce_provider.jar;D:\JDK 1.8\JDK\jre\lib\ext\sunmscapi.jar;D:\JDK 1.8\JDK\jre\lib\ext\sunpkcs11.jar;D:\JDK 1.8\JDK\jre\lib\ext\zipfs.jar;D:\JDK 1.8\JDK\jre\lib\javaws.jar;D:\JDK 1.8\JDK\jre\lib\jce.jar;D:\JDK 1.8\JDK\jre\lib\jfr.jar;D:\JDK 1.8\JDK\jre\lib\jfxswt.jar;D:\JDK 1.8\JDK\jre\lib\jsse.jar;D:\JDK 1.8\JDK\jre\lib\management-agent.jar;D:\JDK 1.8\JDK\jre\lib\plugin.jar;D:\JDK 1.8\JDK\jre\lib\resources.jar;D:\JDK 1.8\JDK\jre\lib\rt.jar;D:\Intellij IDEA 安装文件夹\spring5_demo\target\classes;D:\Intellij IDEA 安装文件夹\spring5_demo\lib\commons-logging-1.1.1.jar;D:\Intellij IDEA 安装文件夹\spring5_demo\lib\spring-beans-5.2.6.RELEASE.jar;D:\Intellij IDEA 安装文件夹\spring5_demo\lib\spring-context-5.2.6.RELEASE.jar;D:\Intellij IDEA 安装文件夹\spring5_demo\lib\spring-core-5.2.6.RELEASE.jar;D:\Intellij IDEA 安装文件夹\spring5_demo\lib\spring-expression-5.2.6.RELEASE.jar;E:\Localrepository\junit\junit\4.12\junit-4.12.jar;E:\Localrepository\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar” test.BookTest
Exception in thread “main” org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [bean1.xml]; nested exception is java.io.FileNotFoundException: class path resource [bean1.xml] cannot be opened because it does not exist
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:188)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:224)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:195)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:257)
at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:128)
at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:94)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:133)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:637)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:522)
at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:144)
at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:85)
at test.BookTest.main(BookTest.java:14)
Caused by: java.io.FileNotFoundException: class path resource [bean1.xml] cannot be opened because it does not exist
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:180)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:333)
… 13 more
,表示xml文件不可见 , 此时的xml文件是放在src下的 ,
。在参看一些网络文章后 ,当我把bean1.xml复制一份到编译器生成的字节码文件下后 , 问题得到解决。

class path resource [bean1.xml] cannot be opened because it does not exist相关推荐

  1. class path resource [beans.xml] cannot be opened because it does not exist

    严重: Exception sending context initialized event to listener instance of class org.springframework.we ...

  2. SpringBoot:class path resource [xxxx.xml] cannot be opened because it does not exist

    今天在写微信支付退款功能的时候遇到这样的画一个问题,发现证书找不到,给大家看一下我的文件夹目录 然后我的路径是这样写的 private static String certPath = "r ...

  3. idea中Web项目 class path resource [applicationContext.xml] cannot be opened because it does not exist

    前言: 今天重新整理了一下以前的SSM项目,之后更改了一下所在目录位置,报了这个错. 解决办法:谢谢这个博主,很详细. https://blog.csdn.net/sinat_38301574/art ...

  4. class path resource [applicationContext.xml] cannot be opened because it does not exis

    使用maven创建web工程,将spring配置文件applicationContext.xml放在src/resource下,用eclipse编译时提示class path resource [ap ...

  5. [tomcat服务器启动SSM项目时问题]class path resource [smvc_servlet.xml] cannot be opened because it……

    问题发生背景:     在学习ssm框架[spring+springmvc+mybatis]项目CMS_system,当搭建完成ssm框架启动tomcat测试时,出现问题: 问题详情如下: 横线那句话 ...

  6. 解决java.io.FileNotFoundException: class path resource [beans.xml] cannot be opened because it does no

    解决java.io.FileNotFoundException: class path resource [beans.xml] cannot be opened because it does no ...

  7. class path resource [xxx.class] cannot be opened because it does not exist

    今天新pull的项目启动时,报错: class path resource [xxx.class] cannot be opened because it does not exist 经确认targ ...

  8. class path resource [jdbc.properties] cannot be opened because it does not exist

    在项目开发中遇到了这个问题,记录一下. 明明我的文件中这行代码引用了同级目录下的jdbc.properties文件,但是运行中却报错 <context:property-placeholder ...

  9. java.io.FileNotFoundException: class path resource [springmvc.xml] cannot be opened

    一般来说路径问题. 我检查了web.xml的行,发现我设置的是固定的springmvc,但我实际命名为springMVC,当然报错. 其实报错了通过耐心翻译很容易看出问题,path resource ...

  10. 遇到class path resource [applicationcontext.xml] cannot be opened becaus的问题该怎么解决??

    [applicationcontext.xml] cannot be opened becaus的问题该怎么解决? 本文旨在和小白一起成长,很不幸目前没有钱买idea,用了一段时间idea奈何到期了, ...

最新文章

  1. 《数据科学家养成手册》--第十一章算法学2---(非监督,监督贝叶斯概率以及损失函数)
  2. form表单提交数据编码方式和tomcat接受数据解码方式
  3. 微信公众平台开发(103) 四六级成绩查询
  4. java获取浏览器版本号
  5. WD硬盘 C1门 解决办法
  6. java jpa saveall方法优化_JPA批量插入(saveAll)
  7. 蓝桥杯c语言a组2015,2015第七届蓝桥杯决赛C语言A组--穿越雷区(DFS)
  8. 远程客户端连接MysqL数据库太慢解决方案
  9. 360发声明要求腾讯向6亿QQ注册用户道歉
  10. 又是low爆的借钱广告:被批三观扭曲,京东金融致歉
  11. 计算机科学在各专业领域中的应用,计算机科学在各专业领域中的应用
  12. STM32工作笔记005---STM32芯片解读
  13. 一加功耗dump开关_一加5/5TFlyme8 9.11.14 支持功能一览
  14. Ubuntu下的几种常见输入法
  15. JavaScript 计数器
  16. 上线啦,PP.io!
  17. HTML期末学生作业~html+css+javascript仿猫眼电影在线网站[毕业设计]
  18. matlab对比度拉伸,[转载][数字图像处理学习]分段线性变换函数——对比度拉伸...
  19. 深入理解c语言的操作符 ----【汇总】
  20. STM32F411 Discovery学习笔记(四)串口

热门文章

  1. CSS3图片边框四个角剪切
  2. Exception thrown from ApplicationListener handling ContextClosedEvent
  3. 【前端学习-函数】js基础学习笔记
  4. 优质的服务器机房有哪些表现
  5. java日期计算天数_用Java计算两个日期之间的天数
  6. DevOps的技术和工具有哪些?
  7. android开发界面转换,ios界面最省时最简单的办法转换成Android界面 – 学ui网
  8. 公务卡引发多米诺效应 推动POS系统“繁荣”
  9. 共阳极数码管显示0~9_《显示器件应用分析精粹》之(3)数码管静态显示
  10. 超纯水制备树脂MB-115、MB-106UP产水18.25兆欧