Announcement Announcement Module
Collapse
No announcement yet.
tx namespace deploying using gwt-container Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • tx namespace deploying using gwt-container

    Hi I have been stuck at this for a while. I have been developing a gwt + srping 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
    should mention i am deploying in the gwt container inside sts using google plugin for eclipse.

    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'.
    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="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:fileath/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/schem...ontext-3.0.xsd and type as schema location.
    Appreciate any help or pointers !
    Last edited by anshumania; May 13th, 2011, 01:55 PM. Reason: added details for runtime

  • #2
    I added a JIRA issue to track these things:
    https://issuetracker.springsource.com/browse/STS-1772

    Cheers,
    -Martin

    Comment


    • #3
      the way my project was setup was that i had a webproject dependent on a java project which uses the tx:annotation.
      so when the spring-config files from webproject import the java project spring-config which has a pom dependency on spring-transaction the runtime for the jetty container (of gwt) cannot pick up the transaction.xsd's from the maven dependencies in the classpath.
      the way i got around it is to push the spring-transaction jar into the web-inf/lib and (i think) manually add the key-xsd pair in the xml-catalog under windows-preferences.
      I guess packaging the modules correctly would not allow this problem in a production deployment. But am still wondering why would this happen anyway.

      Comment

      Working...
      X