0
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/mvc"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:beans="http://www.springframework.org/schema/beans"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:tx="http://www.springframework.org/schema/tx"
     xmlns:task="http://www.springframework.org/schema/task"
    xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
        http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
        http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.0.xsd ">

    <!-- DispatcherServlet Context: defines this servlet's request-processing infrastructure -->

    <!-- Enables the Spring MVC @Controller programming model -->
    <annotation-driven />

    <!-- Handles HTTP GET requests for /resources/** by efficiently serving up static resources in the ${webappRoot}/resources directory -->
    <resources mapping="/resources/**" location="/resources/" />
    <task:annotation-driven/>
    <!-- Resolves views selected for rendering by @Controllers to .jsp resources in the /WEB-INF/views directory -->
    <beans:bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
        <beans:property name="prefix" value="/WEB-INF/views/" />
        <beans:property name="suffix" value=".jsp" />
    </beans:bean>

    <context:component-scan base-package="com.tetra.ecable" />

    <beans:bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
        destroy-method="close">
        <beans:property name="driverClassName" value="com.mysql.jdbc.Driver" />
        <beans:property name="url"
            value="jdbc:mysql://localhost:3306/nibblrdw_collections" />
        <beans:property name="username" value="root" />
        <beans:property name="password" value="" />
    </beans:bean>

    <!-- Hibernate 4 SessionFactory Bean definition -->
    <beans:bean id="sessionFactory"
        class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
        <beans:property name="dataSource" ref="dataSource" />
        <beans:property name="annotatedClasses">
            <beans:list>
                <beans:value>com.tetra.ecable.model.Admin</beans:value>
                <beans:value>com.tetra.ecable.model.SAdmin</beans:value>
                <beans:value>com.tetra.ecable.model.Subs</beans:value>
                <beans:value>com.tetra.ecable.model.SubsTyp</beans:value>
                <beans:value>com.tetra.ecable.model.CablePoc</beans:value>
                <beans:value>com.tetra.ecable.model.City</beans:value>
                <beans:value>com.tetra.ecable.model.Ctry</beans:value>
                <beans:value>com.tetra.ecable.model.Addr</beans:value>
                <beans:value>com.tetra.ecable.model.StPrv</beans:value>
                <beans:value>com.tetra.ecable.model.Area</beans:value>
                <beans:value>com.tetra.ecable.model.BillCyc</beans:value>
                <beans:value>com.tetra.ecable.model.BillDisc</beans:value>
                <beans:value>com.tetra.ecable.model.Cntc</beans:value>
                <beans:value>com.tetra.ecable.model.CustBillRelt</beans:value>
                <beans:value>com.tetra.ecable.model.CustDevRelt</beans:value>
                <beans:value>com.tetra.ecable.model.CustSubsRelt</beans:value>
                <beans:value>com.tetra.ecable.model.DevDet</beans:value>
                <beans:value>com.tetra.ecable.model.DevTyp</beans:value>
                <beans:value>com.tetra.ecable.model.LicnDet</beans:value>
                <beans:value>com.tetra.ecable.model.LicnDisc</beans:value>
                <beans:value>com.tetra.ecable.model.LicnSt</beans:value>
                <beans:value>com.tetra.ecable.model.Mnth</beans:value>
                <beans:value>com.tetra.ecable.model.PayMod</beans:value>
                <beans:value>com.tetra.ecable.model.SecQues</beans:value>
                <beans:value>com.tetra.ecable.model.SubsTyp</beans:value>
                <beans:value>com.tetra.ecable.model.SubsDisc</beans:value>
                <beans:value>com.tetra.ecable.model.SubsReq</beans:value>
                <beans:value>com.tetra.ecable.model.SubsReqTypSt</beans:value>
                <beans:value>com.tetra.ecable.model.SubsSt</beans:value>
                <beans:value>com.tetra.ecable.model.SubsTyp</beans:value>
                <beans:value>com.tetra.ecable.model.TaxTyp</beans:value>
                <beans:value>com.tetra.ecable.model.Tikt</beans:value>
                <beans:value>com.tetra.ecable.model.TiktEta</beans:value>
                <beans:value>com.tetra.ecable.model.TiktSt</beans:value>
                <beans:value>com.tetra.ecable.model.TiktTyp</beans:value>
                <beans:value>com.tetra.ecable.model.Usr</beans:value>
                <beans:value>com.tetra.ecable.model.UsrRelt</beans:value>
                <beans:value>com.tetra.ecable.model.UsrTyp</beans:value>
                <beans:value>com.tetra.ecable.model.VendDevRelt</beans:value>
                <beans:value>com.tetra.ecable.model.VendLicnRelt</beans:value>
                <beans:value>com.tetra.ecable.model.Staff</beans:value>
                <beans:value>com.tetra.ecable.model.StafRole</beans:value>
            </beans:list>
        </beans:property>
        <beans:property name="hibernateProperties">
            <beans:props>
                <beans:prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect
                </beans:prop>
                <beans:prop key="hibernate.show_sql">true</beans:prop>
            </beans:props>
        </beans:property>
    </beans:bean>

    <beans:bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
        <beans:property name="prefix" value="/WEB-INF/views/" />
        <beans:property name="suffix" value=".jsp" />
    </beans:bean>

    <!-- Configure to plugin JSON as request and response in method handler -->

    <beans:bean id="multipartResolver"
        class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
        </beans:bean>
    <tx:annotation-driven transaction-manager="transactionManager"/>

    <beans:bean id="transactionManager" class="org.springframework.orm.hibernate4.HibernateTransactionManager">
        <beans:property name="sessionFactory" ref="sessionFactory" />
    </beans:bean>
    <beans:bean id="billGen" class="com.tetra.ecable.bill.BillGenerator"></beans:bean>
</beans:beans>

servlet-context.xml

tx jar file

spring-tx-3.1.1.RELEASE.jar

error message

org.xml.sax.SAXParseException; lineNumber: 108; columnNumber: 69; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'tx:annotation-driven'.

I am getting this error when running the Spring mvc application with out internet connection.

TResponse
  • 3,940
  • 7
  • 43
  • 63
jaya sankar
  • 39
  • 2
  • 13
  • possible duplicate of [Spring schemaLocation fails when there is no internet connection](http://stackoverflow.com/questions/1729307/spring-schemalocation-fails-when-there-is-no-internet-connection) – void Jan 31 '15 at 05:27
  • 1
    How do you expect that a `4.0` version will reside in a `3.1` version jar? Either upgrade your spring version (4.0 minimum) or, as recommended, use the version-less xsd files. However I would strongly suggest you first check your class path because I would suspect that you are mixing different spring versions. – M. Deinum Jan 31 '15 at 10:05
  • Thanks Deinum you are rights – jaya sankar Feb 02 '15 at 06:03

0 Answers0