Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does DTD error "White spaces are required between publicId and systemI" occur with Spring XSD

In my application context file Eclipse shows the error:

Referenced file contains errors (http://www.springframework.org/schema/integration). applicationContext.xml line 1 XML Problem

looking at the error detail in Eclipse I see:

            White spaces are required between publicId and systemId

According to other people with this problem it's related to the DOCTYPE which apparently must have a SYSTEM identifier.

Why in 2014 when DOCTYPE's are pretty much obsolete since we all use XSD instead of DTDs and there is no DOCTYPE in http://www.springframework.org/schema/integration (or should there be) does this error occur?

          <?xml version="1.0" encoding="UTF-8"?>
          <beans xmlns="http://www.springframework.org/schema/beans"
          xmlns:mvc="http://www.springframework.org/schema/mvc"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xmlns:p="http://www.springframework.org/schema/p"
          xmlns:context="http://www.springframework.org/schema/context"
          xmlns:jee="http://www.springframework.org/schema/jee"
          xmlns:int="http://www.springframework.org/schema/integration" 
          xmlns:mail="http://www.springframework.org/schema/integration/mail"
          xsi:schemaLocation="http://www.springframework.org/schema/beans 
                       http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
                       http://www.springframework.org/schema/mvc
                       http://www.springframework.org/schema/mvc/spring-mvc.xsd
                       http://www.springframework.org/schema/integration/mail 
                          http://www.springframework.org/schema/integration/mail/spring-integration-mail-3.0.xsd
                       http://www.springframework.org/schema/jee 
                       http://www.springframework.org/schema/jee/spring-jee-2.0.xsd
                       http://www.springframework.org/schema/context
                       http://www.springframework.org/schema/integration
                       http://www.springframework.org/schema/integration/spring-integration-3.0.xsd
                       http://www.springframework.org/schema/context/spring-context.xsd">

Thanks

like image 373
user1069528 Avatar asked Dec 01 '25 02:12

user1069528


1 Answers

You have to move spring-context.xsd to its id:

<beans 
http://www.springframework.org/schema/jee 
http://www.springframework.org/schema/jee/spring-jee-2.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/integration
http://www.springframework.org/schema/integration/spring-integration-3.0.xsd">
like image 100
Artem Bilan Avatar answered Dec 03 '25 00:12

Artem Bilan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!