Announcement Announcement Module
Collapse
No announcement yet.
spring1.2.3's import config file of problem? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • spring1.2.3's import config file of problem?

    org.springframework.beans.factory.BeanDefinitionSt oreException: Line 6 in XML document from class path resource [resource.xml] is invalid; nested exception is org.xml.sax.SAXParseException: Element type "import" must be declared.
    org.xml.sax.SAXParseException: Element type "import" must be declared.
    at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(U nknown Source)
    at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
    at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:127)
    at org.springframework.context.support.AbstractXmlApp licationContext.loadBeanDefinitions(AbstractXmlApp licationContext.java:124)
    at org.springframework.context.support.AbstractXmlApp licationContext.refreshBeanFactory(AbstractXmlAppl icationContext.java:64)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:239)
    at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:80)
    at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:65)
    at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:56)



    mydtd :
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">


    http://www.springframework.org/dtd/spring-beans.dtd clearly includes "import" element ?

  • #2
    That's odd. The Spring bean definition DTD definitely declares the "import" element. Maybe you're running against an old jar file or at least an old DTD file on your classpath?

    Juergen

    Comment


    • #3
      oh

      Originally posted by Juergen Hoeller
      That's odd. The Spring bean definition DTD definitely declares the "import" element. Maybe you're running against an old jar file or at least an old DTD file on your classpath?

      Juergen
      yes, i think so ,but after checking,

      there is not dtd file in my classpath,besides,my spring.jar not a old version.but a new version.

      what's wrong?

      Comment

      Working...
      X