org.springframework.beans.factory.BeanDefinitionStoreException: Line 5 in XML document from file [C:\Users\pat\Google Drive\Prog\Eclipse\helloworld\beans.xml] is invalid; nested exception is org.xml.sax.SAXParseException: Document root element "beans", must match DOCTYPE root "null". org.xml.sax.SAXParseException; lineNumber: 5; columnNumber: 65; Document root element "beans", must match DOCTYPE root "null".

Stack Overflow | patricia | 6 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Can't load beans XSD in Eclipse - SAXParseException

    Stack Overflow | 6 months ago | patricia
    org.springframework.beans.factory.BeanDefinitionStoreException: Line 5 in XML document from file [C:\Users\pat\Google Drive\Prog\Eclipse\helloworld\beans.xml] is invalid; nested exception is org.xml.sax.SAXParseException: Document root element "beans", must match DOCTYPE root "null". org.xml.sax.SAXParseException; lineNumber: 5; columnNumber: 65; Document root element "beans", must match DOCTYPE root "null".
  2. 0

    Spring-modules-validation causing error

    Stack Overflow | 2 years ago | Alex
    org.springframework.beans.factory.BeanDefinitionStoreException: Line 6 in XML document from class path resource [spring/application-config.xml] is invalid; nested exception is org.xml.sax.SAXParseException: O elemento-raiz do documento "beans" deve corresponder à raiz de DOCTYPE "null". org.xml.sax.SAXParseException; lineNumber: 6; columnNumber: 116; O elemento-raiz do documento "beans" deve corresponder à raiz de DOCTYPE "null".

    1 unregistered visitors

    Root Cause Analysis

    1. org.springframework.beans.factory.BeanDefinitionStoreException

      Line 5 in XML document from file [C:\Users\pat\Google Drive\Prog\Eclipse\helloworld\beans.xml] is invalid; nested exception is org.xml.sax.SAXParseException: Document root element "beans", must match DOCTYPE root "null". org.xml.sax.SAXParseException; lineNumber: 5; columnNumber: 65; Document root element "beans", must match DOCTYPE root "null".

      at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException()
    2. Java RT
      DocumentBuilderImpl.parse
      1. com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
      2. com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source)
      3. com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
      4. com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
      5. com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
      6. com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.rootElementSpecified(Unknown Source)
      7. com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source)
      8. com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
      9. com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
      10. com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$ContentDriver.scanRootElementHook(Unknown Source)
      11. com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
      12. com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
      13. com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
      14. com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      15. com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
      16. com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
      17. com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
      18. com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
      19. com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
      19 frames
    3. Spring Beans
      AbstractBeanDefinitionReader.loadBeanDefinitions
      1. org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:222)
      2. org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:173)
      3. org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:148)
      4. org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:126)
      5. org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:142)
      5 frames
    4. Spring Context
      FileSystemXmlApplicationContext.<init>
      1. org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
      2. org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:81)
      3. org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
      4. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:269)
      5. org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:89)
      6. org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:74)
      7. org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:65)
      7 frames
    5. spring.tutorial
      App.main
      1. spring.tutorial.App.main(App.java:10)
      1 frame