Tuesday, 15 February 2011

context.xml - Spring Cannot find the declaration of element Context -



context.xml - Spring Cannot find the declaration of element Context -

i have database config file below

<?xml version="1.0" encoding="iso-8859-1"?> <context name="env"> <context name="jdbc"> <resource name="testdb"> <property name="driver">com.mysql.jdbc.driver</property> <property name="url">jdbc:mysql://localhost:3306/test_db/property> <property name="username">test</property> <property name="password">test</property> <property name="read-only">false</property> <property name="connect-timeout">5</property> <property name="max-connections">50</property> <property name="max-idle-time">1800</property> <property name="max-life-time">7200</property> <property name="max-wait-time">5000</property> <property name="max-idle">2</property> </resource> </context> </context>

when trying deploy web app getting below error

2014-06-20 02:44:19 error contextloader:331 - context initialization failed org.springframework.beans.factory.xml.xmlbeandefinitionstoreexception: line 3 in xml document servletcontext resource [/web-inf/context.xml] invalid; nested exception org.xml.sax.saxparseexception; linenumber: 3; columnnumber: 21; cvc-elt.1: cannot find declaration of element 'context'. caused by: org.xml.sax.saxparseexception; linenumber: 3; columnnumber: 21; cvc-elt.1: cannot find declaration of element 'context'.

i using spring 4 , importing spring 4 xsd. xmlns xmlns:mvc xmlns:context xsi:schemalocation

spring context.xml

No comments:

Post a Comment