-2

I have seen this same error in multiple questions and tried each solution. Nothing seems to work. I trimmed the error for easier pasting the error is on line 7 at the quote. Here is my xml code. TIA EDIT I added the code that calls the root-context.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns="http://java.sun.com/xml/ns/javaee" 
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee web-app_2_5.xsd" 
version="2.5">
<display-name>Subject</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring/root-context.xml</param-value>
</context-param>
</web-app>


<?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:util="http://www.springframework.org/schema/util" 
    xmlns:beans="http://www.springframework.org/schema/beans" 
    xsi:schemLocation="
    http://www.springframework.org/schema/util 
    http://www.springframework.org/schema/util/spring-util-3.1.xsd
    http://www.springframework.org/schema/beans 
    http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">  

<beans:import resource="security-context.xml" /> 
<beans:bean id="subjectProps" 
    class="org.springframework.beans.factory.config.PropertiesFactoryBean"> 
    <beans:property name="locations">
        <beans:list> 
            <beans:value>WEB-INF/spring/subject.properties</beans:value> 
            <beans:value>WEB-INF/spring/subject_sql.properties</beans:value> 
        </beans:list> 
    </beans:property> 
</beans:bean>

<beans:bean id="subjectUtilProperites" 
 class="main.java.mil.serena.subject.common.SubjectProperties"> 
    <beans:property name="properties" ref="subjectProps"/> 
</beans:bean> 
<beans:bean id="publicationUtilProperties" 
  class="main.java.mil.serena.web.common.properties.SubPubProperties"> 
    <beans:property name="properties" ref="subjectProps"/> 
</beans:bean>
</beans>
Becky
  • 7
  • 3
  • Can you provide more context? Maybe post the code that is reading this xml file if you have it? – randypaq13 Aug 19 '20 at 20:52
  • I [spotted](https://stackoverflow.com/a/63496096/290085) your issue. You've [asked questions](https://stackoverflow.com/users/2394670/becky?tab=questions) here for seven years and never [**accepted**](https://meta.stackexchange.com/q/5234/234215) an answer. Could you please accept all answers that have helped you? Thank you. – kjhughes Aug 19 '20 at 23:08
  • Your update presents additional new problems, including `` being closed by ``. For any remaining problems, please post new questions. And, again, please accept answers that have helped you to here and in the past. Thank you. – kjhughes Aug 20 '20 at 16:28
  • Sorry about that that was a typo. I had to cut the amount of code from the web.xml down and added the last tag. – Becky Aug 20 '20 at 16:36

1 Answers1

1

Change

    xsi:schemLocation="

to

    xsi:schemaLocation="
             ^
kjhughes
  • 106,133
  • 27
  • 181
  • 240
  • Thank you for noticing my typo I will correct that. I still get the same error. So I'll keep looking. – Becky Aug 20 '20 at 15:07
  • I verified that your XML validates successfully once the `xsi:schemLocation` typo is corrected, so double check your fix -- this improvement alone should suffice for the content posted. Oh, of course make sure that you close the root `beans` element too (but failure to do so would yield a different error anyway). – kjhughes Aug 20 '20 at 15:25