Announcement Announcement Module
Collapse
No announcement yet.
SAXParseException : Document root must match DOCTYPE root "null" Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • SAXParseException : Document root must match DOCTYPE root "null"

    Hi,

    I'm migrating some code from Spring 1.X to Spring 2.0.1 and I am using now schema configuration. Like on :

    PHP Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
        
    </beans>
    I'm reading this configuration file using :

    PHP Code:
    String[] paths = new String[] {"my/path/to/Context.xml");
    new 
    ClassPathXmlApplicationContext(paths); 
    And it raises following error :
    PHP Code:
    org.springframework.beans.factory.BeanDefinitionStoreExceptionLine 4 in XML document from class path resource [my/path/to/Context.xmlis invalidnested exception is org.xml.sax.SAXParseExceptionDocument root element "beans"must match DOCTYPE root "null"
    Well, the configuration file is obviously correct so I don't see where the error can come from.

    I'm using JDK 1.5.0_08.

    Thanks for any help,
    Damien.

  • #2
    Hi,

    I checked the different posts on this forum (in fact, I didn't know where was the Search function...) and they gave me the solution : a mix between version 1.X and version 2.0...

    Thanks for your help,
    Damien.

    Comment

    Working...
    X