Spring Security 3.1 xsd and jars mismatch issue

Posted by kmansoor on Stack Overflow See other posts from Stack Overflow or by kmansoor
Published on 2012-10-10T18:15:54Z Indexed on 2012/10/10 21:37 UTC
Read the original article Hit count: 407

Filed under:
|
|
|
|

I'm Trying to migrate from spring framework 3.0.5 to 3.1 and spring-security 3.0.5 to 3.1 (not to mention hibernate 3.6 to 4.1). Using Apache IVY.

I'm getting the following error trying to start Tomcat 7.23 within Eclipse Helios (among a host of others, however this is the last in the console):

org.springframework.beans.factory.BeanDefinitionStoreException: Line 7 in XML document from ServletContext resource [/WEB-INF/focus-security.xml] is invalid; nested exception is org.xml.sax.SAXParseException: Document root element "beans:beans", must match DOCTYPE root "null".
org.xml.sax.SAXParseException: Document root element "beans:beans", must match DOCTYPE root "null".

my security config file looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/security"
xmlns:beans="http://www.springframework.org/schema/beans"    xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
                    http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd
                    http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.1.xsd">

Ivy.xml looks like this:

<dependencies>
<dependency org="org.hibernate" name="hibernate-core" rev="4.1.7.Final"/>
<dependency org="org.hibernate" name="com.springsource.org.hibernate.validator" rev="4.2.0.Final" />
<dependency org="org.hibernate.javax.persistence" name="hibernate-jpa-2.0-api" rev="1.0.1.Final"/>
<dependency org="org.hibernate" name="hibernate-entitymanager" rev="4.1.7.Final"/>
<dependency org="org.hibernate" name="hibernate-validator" rev="4.3.0.Final"/>

<dependency org="org.springframework" name="spring-context" rev="3.1.2.RELEASE"/>
<dependency org="org.springframework" name="spring-web" rev="3.1.2.RELEASE"/>   
<dependency org="org.springframework" name="spring-tx" rev="3.1.2.RELEASE"/>
<dependency org="org.springframework" name="spring-webmvc" rev="3.1.2.RELEASE"/>
<dependency org="org.springframework" name="spring-test" rev="3.1.2.RELEASE"/>

<dependency org="org.springframework.security" name="spring-security-core" rev="3.1.2.RELEASE"/>
<dependency org="org.springframework.security" name="spring-security-web" rev="3.1.2.RELEASE"/>
<dependency org="org.springframework.security" name="spring-security-config" rev="3.1.2.RELEASE"/>
<dependency org="org.springframework.security" name="spring-security-taglibs" rev="3.1.2.RELEASE"/>

<dependency org="net.sf.dozer" name="dozer" rev="5.3.2"/>
<dependency org="org.apache.poi" name="poi" rev="3.8"/>
<dependency org="commons-io" name="commons-io" rev="2.4"/>
<dependency org="org.slf4j" name="slf4j-api" rev="1.6.6"/>
<dependency org="org.slf4j" name="slf4j-log4j12" rev="1.6.6"/>
<dependency org="org.slf4j" name="slf4j-ext" rev="1.6.6"/>
<dependency org="log4j" name="log4j" rev="1.2.17"/>
<dependency org="org.testng" name="testng" rev="6.8"/>
<dependency org="org.dbunit" name="dbunit" rev="2.4.8"/>
<dependency org="org.easymock" name="easymock" rev="3.1"/>
</dependencies>

I understand (hope) this error is due to a mismatch between the declared xsd and the jars on the classpath. Any pointers will be greatly appreciated.

© Stack Overflow or respective owner

Related posts about tomcat

Related posts about spring-security