Announcement Announcement Module

Spring Modules forum decommissioned in favor of Spring Extensions

As the Spring Modules project has been replaced by the Spring Extensions ( project, this forum has been decommissioned in favour of Spring Extensions one at:

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.

Costin Leau
SpringSource - Spring Training, Consulting, and Support - "From the Source"
See more
See less
cvc-complex-type error with xsd Page Title Module
Move Remove Collapse
Conversation Detail Module
  • 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.

    Erik Weibust

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns=""

    <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" />

    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:


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


      • #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.


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

          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(
          	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(
          	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(
          Here's my caching context:
          <?xml version="1.0" encoding="UTF-8"?>
          	GMA cache-related configurations.
          <beans xmlns="" xmlns:xsi=""
          		xmlns:p="" xmlns:context=""
          		xmlns:jee="" xmlns:tx=""
          <context:component-scan base-package="" />
           <ehcache:config configLocation="classpath:ehcache-gma.xml"/>
           	<ehcache:caching cacheName="fooCache" id="fooModel"/>
          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.