spring loaded custom schema abnormal White spaces are required between publicId and systemId.

spring project started error
An error log is as follows:
Caused by: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 1 in XML document from URL [jar:file:webapps/ROOT/WEB-INF/lib/xxx-biz-1.0.jar!/xxx/sponsor-group-pipeline.xml] is invalid; nested exception is org.xml.sax.SAXParseException; systemId: http://www.xxx.com/schema/hipac/pipeline.xsd; lineNumber: 1; columnNumber: 50; White spaces are required between publicId and systemId.
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:399) ~[spring-beans-4.1.9.RELEASE.jar:4.1.9.RELEASE]
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336) ~[spring-beans-4.1.9.RELEASE.jar:4.1.9.RELEASE]
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:304) ~[spring-beans-4.1.9.RELEASE.jar:4.1.9.RELEASE]
    at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:245) ~[spring-beans-4.1.9.RELEASE.jar:4.1.9.RELEASE]
    ... 54 common frames omitted
Caused by: org.xml.sax.SAXParseException: White spaces are required between publicId and systemId.
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203) ~[na:1.8.0_45]

 

google for a long time, basically said there should be a space between systemId and publicId xml header definition, that is, the contents of which cook
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xmlns:hipac="http://www.xxx.com/schema/hipac"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.xxx.com/schema/hipac http://www.xxx.com/schema/hipac/pipeline.xsd">

 

Is the red part above, you can actually see my configuration is no problem
 
That problem is where is it, the beginning of the problem has been suspected jar package conflicts, but the investigation for a long time, and other normal application also compared the lot jar versions, we have found no problems
Since this has scheam is my own definition, all have a corresponding configuration parsing in the spring, is spring.handlers and spring.schemas two documents, we look at the contents of two files
spring.handlers
http\://www.xxx.com/schema/hipac=com.xxx.engine.choreography.pipeline.namespace.EngineNamespaceHandler
spring.schemas
http\://www.xxx.com/schema/hipac/pipeline.xsd=com/xxx/engine/choreography/pipeline/xsd/pipeline.xsd

  

 
These two documents is a designated path xsd, one schemas analytic category, suspected to be a problem with these two files to load
Therefore, the access code is found in the application of the next two files actually have found applications in both profiles, but the content is almost (but different values, but also the code and find the corresponding class XSD), here it is suspected, the big problem here is the probability.
Then immediately delete these two files, and then deploy it again, OK, smooth and successful.
 
After this question, let me think of it when access is just another application before had this situation, but forget how was resolved, and now in retrospect, in fact, was the configuration file path or class xsd wrong path due.
 
However, spring is also the prompt start of the pit ah, very misleading, and always thought it was referenced in the profile of the problem, wasting a lot of time parsing spring back to sechemas better looking at. 

Guess you like

Origin www.cnblogs.com/yissheng/p/11494854.html