Announcement Announcement Module
Collapse

Spring Modules forum decommissioned in favor of Spring Extensions

As the Spring Modules project has been replaced by the Spring Extensions (http://www.springsource.org/extensions) project, this forum has been decommissioned in favour of Spring Extensions one at:
http://forum.springsource.org/forumdisplay.php?f=44

Please see the Spring Extensions home page for a complete list of current projects in Java, .NET and ActionScript. You can also propose one if you want.

Cheers,
Costin Leau
SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
http://twitter.com/costinl
See more
See less
cvc-complex-type error with xsd Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • cvc-complex-type error with xsd

    I am getting some unusual errors in Eclipse that I haven't seen before. I'm not 100% sure the issue is with springmodules-ehcache, but it's the only place Eclipse is complaining in my project, which has many bean definition xml files.

    I'm pasting my beans root element with the namespace declaration, the ehcache elements that Eclipse is erroring on, and the error messages. I hope somebody knows what I'm doing wrong, or how I can resolve the issue.

    The key is that in all the examples I've seen, the way I've used springmodules-ehcache is the way they say to set it up.

    Thanks...
    Erik Weibust


    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:aop="http://www.springframework.org/schema/aop"
    xmlns:tx="http://www.springframework.org/schema/tx"
    xmlns:ehcache="http://www.springmodules.org/schema/ehcache"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
    http://www.springframework.org/schema/aop
    http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
    http://www.springframework.org/schema/tx
    http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
    http://www.springmodules.org/schema/ehcache
    http://www.springmodules.org/schema/cache/springmodules-ehcache.xsd">

    <ehcache:config configLocation="classpath:ehcache.xml" /> // line 132

    <ehcache:annotations> // line 134
    <ehcache:caching id="loanCache" cacheName="loanCache" />
    <ehcache:caching id="checkImageCache" cacheName="checkImageCache" />
    <ehcache:caching id="transactionHistoryCache" cacheName="transactionHistoryCache" />
    <ehcache:caching id="staticDescriptionCache" cacheName="staticDescriptionCache" />
    <ehcache:caching id="securityCache" cacheName="securityCache" />
    <ehcache:caching id="feeListCache" cacheName="feeListCache" />
    </ehcache:annotations>

    cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'ehcache:config'. line 132

    cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'ehcache:annotations'. line 134

  • #2
    I'm also starting to experience the same set of nasty errors since I started using Eclipse Europa (not sure why it wasn't a problem before Europa). Anyhow, here's the JIRA issue that refers to this problem: http://opensource.atlassian.com/proj...browse/MOD-329

    Comment


    • #3
      is there any workaround for this at the moment? Im also encoutering the same problem.

      Comment


      • #4
        Work around to cvc-complex-type error

        Craig Walls has written a detailed post on his blog that provides a solid work-around to this problem.

        http://www.jroller.com/habuma/entry/...les_xsd_errors

        Comment


        • #5
          I've followed the workaround specified in the previous post, but still experiencing the following during deployment on server startup:

          Code:
          2009-08-25 17:34:03,961 (ContextLoader Line:215) Context initialization failed 
          org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 22 in XML document from class path resource [cachingContext-gma.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'ehcache:config'.
          	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:404)
          	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
          	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
          Here's my caching context:
          Code:
          <?xml version="1.0" encoding="UTF-8"?>
          <!-- 
          	GMA cache-related configurations.
          -->
          <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          		xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context"
          		xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx"
          		xmlns:aop="http://www.springframework.org/schema/aop"
          		xmlns:ehcache="http://www.springmodules.org/schema/ehcache"
          		xsi:schemaLocation="
          			http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
          			http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
          			http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.5.xsd
          			http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
          			http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
          			http://www.springmodules.org/schema/ehcache http://www.springmodules.org/schema/cache/springmodules-ehcache.xsd
          			">
          <!-- 
          <context:component-scan base-package="com.citi.gdos.iris.gma.dao" />
           -->
           
           <ehcache:config configLocation="classpath:ehcache-gma.xml"/>
           <ehcache:annotations>
           	<ehcache:caching cacheName="fooCache" id="fooModel"/>
           </ehcache:annotations>
          </beans>
          I'm also attaching the printscreens of the configurations I put into my MyEclipse environment.

          If versions of some jars are important please let me know and I supply that info.

          Thank you in advance.
          Simeon

          Comment

          Working...
          X