cvc-elt.1 Cannot find the declaration of element 'additionalHeaders'
up vote
0
down vote
favorite
Upgrading an old Spring MVC 2 project to Spring Boot 2, such error occurs:
2018-11-07 15:26:38.371 ERROR 4893 --- [ main]
o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
Line 8 in XML document from URL
[jar:file:/Users/guojiahao/.m2/repository/javax/validation/validation-api/2.0.1.Final/validation-api-2.0.1.Final.jar!/xml-header-style.xml] is invalid; nested exception is org.xml.sax.SAXParseException;
lineNumber: 8; columnNumber: 20; cvc-elt.1: Cannot find the
declaration of element 'additionalHeaders'. at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:404)
~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336)
~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:304)
~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:188)
~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:224)
~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:195)
~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.lambda$loadBeanDefinitionsFromImportedResources$0(ConfigurationClassBeanDefinitionReader.java:358)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
~[na:1.8.0_172] at
org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsFromImportedResources(ConfigurationClassBeanDefinitionReader.java:325)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:144)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:117)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:327)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:232)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:275)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:95)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:691)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:528)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)
~[spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE] at
org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775)
[spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE] at
org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
[spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE] at
org.springframework.boot.SpringApplication.run(SpringApplication.java:316)
[spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE] at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1260)
[spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE] at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1248)
[spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE] at
com.example.ite.Application.main(Application.java:9) [classes/:na]
Caused by: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the
declaration of element 'additionalHeaders'. at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:396)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:284)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1901)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:741)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:374)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:613)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3132)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:852)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:243)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)
~[na:1.8.0_172] at
org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:77)
~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadDocument(XmlBeanDefinitionReader.java:434)
~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:392)
~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE] ... 23 common frames
omitted
Process finished with exit code 1
Validation-api is one of dependencies of spring-starter-web:
I have no idea why the problem occurs. Could you offer some hint or are there any ways I could go to debug to find out the solution of the problem?
java spring spring-mvc spring-boot
add a comment |
up vote
0
down vote
favorite
Upgrading an old Spring MVC 2 project to Spring Boot 2, such error occurs:
2018-11-07 15:26:38.371 ERROR 4893 --- [ main]
o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
Line 8 in XML document from URL
[jar:file:/Users/guojiahao/.m2/repository/javax/validation/validation-api/2.0.1.Final/validation-api-2.0.1.Final.jar!/xml-header-style.xml] is invalid; nested exception is org.xml.sax.SAXParseException;
lineNumber: 8; columnNumber: 20; cvc-elt.1: Cannot find the
declaration of element 'additionalHeaders'. at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:404)
~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336)
~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:304)
~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:188)
~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:224)
~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:195)
~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.lambda$loadBeanDefinitionsFromImportedResources$0(ConfigurationClassBeanDefinitionReader.java:358)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
~[na:1.8.0_172] at
org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsFromImportedResources(ConfigurationClassBeanDefinitionReader.java:325)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:144)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:117)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:327)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:232)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:275)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:95)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:691)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:528)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)
~[spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE] at
org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775)
[spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE] at
org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
[spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE] at
org.springframework.boot.SpringApplication.run(SpringApplication.java:316)
[spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE] at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1260)
[spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE] at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1248)
[spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE] at
com.example.ite.Application.main(Application.java:9) [classes/:na]
Caused by: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the
declaration of element 'additionalHeaders'. at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:396)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:284)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1901)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:741)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:374)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:613)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3132)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:852)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:243)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)
~[na:1.8.0_172] at
org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:77)
~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadDocument(XmlBeanDefinitionReader.java:434)
~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:392)
~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE] ... 23 common frames
omitted
Process finished with exit code 1
Validation-api is one of dependencies of spring-starter-web:
I have no idea why the problem occurs. Could you offer some hint or are there any ways I could go to debug to find out the solution of the problem?
java spring spring-mvc spring-boot
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Upgrading an old Spring MVC 2 project to Spring Boot 2, such error occurs:
2018-11-07 15:26:38.371 ERROR 4893 --- [ main]
o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
Line 8 in XML document from URL
[jar:file:/Users/guojiahao/.m2/repository/javax/validation/validation-api/2.0.1.Final/validation-api-2.0.1.Final.jar!/xml-header-style.xml] is invalid; nested exception is org.xml.sax.SAXParseException;
lineNumber: 8; columnNumber: 20; cvc-elt.1: Cannot find the
declaration of element 'additionalHeaders'. at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:404)
~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336)
~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:304)
~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:188)
~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:224)
~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:195)
~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.lambda$loadBeanDefinitionsFromImportedResources$0(ConfigurationClassBeanDefinitionReader.java:358)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
~[na:1.8.0_172] at
org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsFromImportedResources(ConfigurationClassBeanDefinitionReader.java:325)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:144)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:117)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:327)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:232)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:275)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:95)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:691)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:528)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)
~[spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE] at
org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775)
[spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE] at
org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
[spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE] at
org.springframework.boot.SpringApplication.run(SpringApplication.java:316)
[spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE] at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1260)
[spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE] at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1248)
[spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE] at
com.example.ite.Application.main(Application.java:9) [classes/:na]
Caused by: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the
declaration of element 'additionalHeaders'. at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:396)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:284)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1901)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:741)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:374)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:613)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3132)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:852)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:243)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)
~[na:1.8.0_172] at
org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:77)
~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadDocument(XmlBeanDefinitionReader.java:434)
~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:392)
~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE] ... 23 common frames
omitted
Process finished with exit code 1
Validation-api is one of dependencies of spring-starter-web:
I have no idea why the problem occurs. Could you offer some hint or are there any ways I could go to debug to find out the solution of the problem?
java spring spring-mvc spring-boot
Upgrading an old Spring MVC 2 project to Spring Boot 2, such error occurs:
2018-11-07 15:26:38.371 ERROR 4893 --- [ main]
o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
Line 8 in XML document from URL
[jar:file:/Users/guojiahao/.m2/repository/javax/validation/validation-api/2.0.1.Final/validation-api-2.0.1.Final.jar!/xml-header-style.xml] is invalid; nested exception is org.xml.sax.SAXParseException;
lineNumber: 8; columnNumber: 20; cvc-elt.1: Cannot find the
declaration of element 'additionalHeaders'. at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:404)
~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336)
~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:304)
~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:188)
~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:224)
~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:195)
~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.lambda$loadBeanDefinitionsFromImportedResources$0(ConfigurationClassBeanDefinitionReader.java:358)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
~[na:1.8.0_172] at
org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsFromImportedResources(ConfigurationClassBeanDefinitionReader.java:325)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:144)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:117)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:327)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:232)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:275)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:95)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:691)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:528)
~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)
~[spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE] at
org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775)
[spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE] at
org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
[spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE] at
org.springframework.boot.SpringApplication.run(SpringApplication.java:316)
[spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE] at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1260)
[spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE] at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1248)
[spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE] at
com.example.ite.Application.main(Application.java:9) [classes/:na]
Caused by: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the
declaration of element 'additionalHeaders'. at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:396)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:284)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1901)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:741)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:374)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:613)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3132)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:852)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:243)
~[na:1.8.0_172] at
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)
~[na:1.8.0_172] at
org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:77)
~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadDocument(XmlBeanDefinitionReader.java:434)
~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE] at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:392)
~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE] ... 23 common frames
omitted
Process finished with exit code 1
Validation-api is one of dependencies of spring-starter-web:
I have no idea why the problem occurs. Could you offer some hint or are there any ways I could go to debug to find out the solution of the problem?
java spring spring-mvc spring-boot
java spring spring-mvc spring-boot
asked Nov 7 at 7:50
guo
3,49772048
3,49772048
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53185364%2fcvc-elt-1-cannot-find-the-declaration-of-element-additionalheaders%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password