Test project execution, encountered SQL-MAPCONFIG-2.DTD file does not exist problems

Source: Internet
Author: User

[Persistence/sql-map-.xml]; Nested exception is java.io.FileNotFoundException:class path resource [SQL-MAP-CONFIG-2.DTD] cannot be opened because it does not exist

at Org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions ( xmlbeandefinitionreader.java:416)

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:143)

at Org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions ( abstractbeandefinitionreader.java:178)

at Org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource ( defaultbeandefinitiondocumentreader.java:174)

... More

caused By:java.io.FileNotFoundException:class path resource [SQL-MAP-CONFIG-2.DTD] cannot be opened because it does not Exist

at Org.springframework.core.io.ClassPathResource.getInputStream (classpathresource.java:143)

at Org.springframework.beans.factory.xml.ResourceEntityResolver.resolveEntity ( RESOURCEENTITYRESOLVER.JAVA:98)

at org.apache.xerces.util.EntityResolverWrapper.resolveEntity (Unknown Source)

at org.apache.xerces.impl.XMLEntityManager.resolveEntity (Unknown Source)

at Org.apache.xerces.impl.xmldocumentscannerimpl$dtddispatcher.dispatch (Unknown Source)

at Org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument (Unknown Source)

at Org.apache.xerces.parsers.XML11Configuration.parse (Unknown Source)

at Org.apache.xerces.parsers.XML11Configuration.parse (Unknown Source)

at Org.apache.xerces.parsers.XMLParser.parse (Unknown Source)



I found my original XML configuration to be:

<?xml version= "1.0" encoding= "GB2312"?>

<! DOCTYPE sqlmapconfig Public "-//ibatis.com//dtd SQL Map Config 2.0//en" "Sql-map-config-2.dtd" >


Change it to:

<?xml version= "1.0" encoding= "GB2312"?>

<! DOCTYPE sqlmapconfig Public "-//ibatis.com//dtd SQL Map Config 2.0//en" "http://ibatis.apache.org/dtd/ Sql-map-config-2.dtd ">

can be resolved.

Test project execution, encountered SQL-MAPCONFIG-2.DTD file does not exist problems

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.