Frage

I have been stuck at this for a while. I have been developing a gwt + spring backend java project. My project is structure with a GWT project and another java project for spring services and so on. Each project contains their respective spring-config files. while trying to load the spring configs if i were to use tx:annotation-driven

i get the following continuously. org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/tx/spring-tx-3.0.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.

cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'tx:annotation-driven'.

should mention i am deploying in the gwt container inside sts using google plugin for eclipse.

my spring-servlet namespace begins as so

<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="h ttp://www.w3.org/2001/XMLSchema-instance" xmlns:aop="h ttp://www.springframework.org/schema/aop" xmlns:context="h ttp://www.springframework.org/schema/context" xmlns:p="h ttp://www.springframework.org/schema/p" xmlns:util="h ttp://www.springframework.org/schema/util" xmlns:tx="h ttp://www.springframework.org/schema/tx" xsi:schemaLocation="h ttp://www.springframework.org/schema/aop h ttp://www.springframework.org/schema/aop/spring-aop-3.0.xsd h ttp://www.springframework.org/schema/beans h ttp://www.springframework.org/schema/beans/spring-beans-3.0.xsd h ttp://www.springframework.org/schema/util h ttp://www.springframework.org/schema/util/spring-util-3.0.xsd h ttp://www.springframework.org/schema/tx h ttp://www.springframework.org/schema/tx/spring-tx-3.0.xsd h ttp://www.springframework.org/schema/context h ttp://www.springframework.org/schema/context/spring-context-3.0.xsd"> <tx:annotation-driven transaction-manager="transactionManager"/>

I have gone through a lot of posts to understand it but have not been able to solve the issue. a) Tried to import the schema into the xml-catalog using : jar:file:path/to/spring-framework-3.0.5.RELEASE/dist/org.springframework.transaction-3.0.5.RELEASE.jar!/org/springframework/transaction/config/spring-tx-3.0.xsd with key as http://www.springframework.org/schema/context/spring-context-3.0.xsd and type as schema location.

Appreciate any help or pointers !

War es hilfreich?

Lösung

For others who face similar problems in an environment which includes STS and maven. Make sure you have the correct jar added to your pom.xml and then either update ur dependencies ; refresh your workspace ; close your project and reopen or restart STS with -clean option. One of the above will make it work for you. HTH

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top