org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 10 in XML document from ServletContext resource [/WEB-INF/spring/encuestame-task.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'mode' is not allowed to appear in element 'annotation-driven'.

JIRA | Juan Carlos Picado | 6 years 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

    When task config file is enabled. <!-- Task <import resource="spring/encuestame-task.xml" /> --> Mar 17 21:02:53 ERROR work.web.context.ContextLoader initWebApplicationContext Context initialization failed org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from relative location [spring/encuestame-task.xml] Offending resource: ServletContext resource [/WEB-INF/spring-app-context.xml]; nested exception is org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 10 in XML document from ServletContext resource [/WEB-INF/spring/encuestame-task.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'mode' is not allowed to appear in element 'annotation-driven'. at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68) at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85) at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:76) at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:218) at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseDefaultElement(DefaultBeanDefinitionDocumentReader.java:147) at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:132) at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) 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.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149) at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124) at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:93) at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130) at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4205) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4704) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1315) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061) at org.apache.catalina.core.StandardHost.start(StandardHost.java:840) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) at org.apache.catalina.core.StandardService.start(StandardService.java:525) at org.apache.catalina.core.StandardServer.start(StandardServer.java:754) at org.apache.catalina.startup.Catalina.start(Catalina.java:595) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Caused by: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 10 in XML document from ServletContext resource [/WEB-INF/spring/encuestame-task.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'mode' is not allowed to appear in element 'annotation-driven'. at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:202) ... 42 more Caused by: org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'mode' is not allowed to appear in element 'annotation-driven'. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaValidator.processAttributes(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.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) at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388) ... 45 more

    JIRA | 6 years ago | Juan Carlos Picado
    org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 10 in XML document from ServletContext resource [/WEB-INF/spring/encuestame-task.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'mode' is not allowed to appear in element 'annotation-driven'.
  2. 0

    struts2.0和spring2.5整合 冲突 待解决ing_高性能WEB开发_积木群组

    gimoo.net | 2 years ago
    org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 2 in XML document from ServletContext resource [/WEB-INF/applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
  3. 0

    Error Spring org.xml.sax.SAXParseException: Premature end of file On Jaxws Web Service

    Stack Overflow | 2 years ago | user3822212
    org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line -1 in XML document from ServletContext resource [/WEB-INF/applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException: Premature end of file.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    How to write Spring ApplicationContext.xml file?

    Stack Overflow | 4 years ago | Programmer
    org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 6 in XML document from ServletContext resource [/WEB-INF/applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 6; columnNumber: 578; cvc-elt.1: Cannot find the declaration of element 'beans'.
  6. 0

    org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'http'

    Stack Overflow | 5 years ago | Sandy
    org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 32 in XML document from class path resource [cm-application-context-security.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'http'.

  1. Dunmer 1 times, last 4 weeks ago
  2. SteVio1989 1 times, last 1 month ago
33 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. org.xml.sax.SAXParseException

    cvc-complex-type.3.2.2: Attribute 'mode' is not allowed to appear in element 'annotation-driven'.

    at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException()
  2. Xerces2-j
    DocumentBuilderImpl.parse
    1. org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
    2. org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
    3. org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    4. org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    5. org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
    6. org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
    7. org.apache.xerces.impl.xs.XMLSchemaValidator.processAttributes(Unknown Source)
    8. org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
    9. org.apache.xerces.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source)
    10. org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
    11. org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    12. org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    13. org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    14. org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    15. org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    16. org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
    17. org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
    17 frames
  3. Spring Beans
    AbstractBeanDefinitionReader.loadBeanDefinitions
    1. org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)
    2. org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388)
    3. org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
    4. org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
    5. org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:202)
    6. org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseDefaultElement(DefaultBeanDefinitionDocumentReader.java:147)
    7. org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:132)
    8. org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93)
    9. org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)
    10. org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)
    11. org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
    12. org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
    13. org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
    14. org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
    15. org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
    15 frames
  4. Spring
    XmlWebApplicationContext.loadBeanDefinitions
    1. org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)
    2. org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:93)
    2 frames
  5. Spring Context
    AbstractApplicationContext.refresh
    1. org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
    2. org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467)
    3. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397)
    3 frames
  6. Spring
    ContextLoaderListener.contextInitialized
    1. org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
    2. org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
    3. org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
    3 frames
  7. Glassfish Core
    Catalina.start
    1. org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4205)
    2. org.apache.catalina.core.StandardContext.start(StandardContext.java:4704)
    3. org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
    4. org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
    5. org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
    6. org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
    7. org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
    8. org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504)
    9. org.apache.catalina.startup.HostConfig.start(HostConfig.java:1315)
    10. org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
    11. org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
    12. org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061)
    13. org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
    14. org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
    15. org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
    16. org.apache.catalina.core.StandardService.start(StandardService.java:525)
    17. org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
    18. org.apache.catalina.startup.Catalina.start(Catalina.java:595)
    18 frames
  8. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:597)
    4 frames
  9. Glassfish Core
    Bootstrap.main
    1. org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    2. org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
    2 frames