Results 1 to 5 of 5

Thread: cvc-complex-type error with xsd

  1. #1

    Default 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. #2
    Join Date
    Aug 2004
    Posts
    1,072

    Default

    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

  3. #3
    Join Date
    Jul 2007
    Posts
    11

    Default

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

  4. #4

    Default 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

  5. #5

    Default

    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
    Attached Images Attached Images

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •