IOException parsing XML document from class path resource [Webroot/web-inf/applicationcontext.xml];

Source: Internet
Author: User

Parsing XML document from class path resource [Applicationcontext.xml]; nested exception is java.io. Filenotfoundexception:class path Resource [ApplicationContext. XML] cannot is opened because it does not exist

Translation: parsing an XML document from a CLASSPATH resource [applicationcontext.xml]; nested exception IO. FileNotFoundException: classpath resource [ApplicationContext]. The XML cannot be opened because it does not exist

This is my problem, because too careless to put ApplicationContext. The XML file is placed in the package under SRC, so the error is not found, and placed under SRC, there will be no error, execution through

--------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------

The following is I see other people on the Internet error solutions, may be small partners will be used to reprint, use to refer to

IOException parsing XML document from class path resource [Webroot/web-inf/applicationcontext.xml];

Translation: Parsing XML document resources from Classpath IOException (Webroot/web-inf/Medium);

Spring of Java

Problem: When testing with JUnit, unable to get to the Applicationcontext.xml configuration file "Here the configuration file is placed under the Web-inf, if it is placed under the SRC, will not report this error"

notation: Classpathxmlapplicationcontext ac=new classpathxmlapplicationcontext ("/webroot/web-inf/applicationcontext.xml ");

Modify the method: In this way you can get

Filesystemxmlapplicationcontext ac=new filesystemxmlapplicationcontext ("/webroot/web-inf/applicationcontext.xml" );

Ext.: http://blog.csdn.net/wxl1990721/article/details/9196101

IOException parsing XML document from class path resource [Webroot/web-inf/applicationcontext.xml];

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.