Results 1 to 3 of 3

Thread: spring1.2.3's import config file of problem?

  1. #1
    Join Date
    Sep 2004
    Posts
    6

    Default 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. #2
    Join Date
    Aug 2004
    Location
    Linz, Austria
    Posts
    391

    Default

    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

  3. #3
    Join Date
    Sep 2004
    Posts
    6

    Default oh

    Quote 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?

Similar Threads

  1. Acegi in portlets
    By dreed in forum Security
    Replies: 37
    Last Post: Apr 27th, 2008, 06:34 AM
  2. Replies: 19
    Last Post: Sep 10th, 2007, 12:46 PM
  3. Saving large files to a db using hibernate?
    By Dan Washusen in forum Data
    Replies: 10
    Last Post: Sep 20th, 2006, 12:18 PM
  4. Replies: 3
    Last Post: Sep 22nd, 2005, 10:14 AM
  5. Replies: 2
    Last Post: May 2nd, 2005, 05:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •