Tuesday, May 6, 2008

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

Recently I am trying to use the DWR library, since my company is behind the firewall, Eclipse is not able to access the dwr schema. so when I decleared the dwr namespace in the spring configuration file:
xmlns:dwr="http://www.directwebremoting.org/schema/spring-dwr"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.directwebremoting.org/schema/spring-dwr http://www.directwebremoting.org/schema/spring-dwr-2.0.xsd">

I got the cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'dwr:controller'. error in my Eclipse 3.3 version.

Inspired by the http://www.jroller.com/habuma/entry/fixing_spring_modules_xsd_errors

I download the http://www.directwebremoting.org/schema/spring-dwr-2.0.xsd and put it into my dwr.jar file and defined an entry in Web and XML" -> "XML Catalog".

The annoying error is gone :)

3 comments:

Anonymous said...

I just found out for Eclipse 3.3.2 that i need to have the Spring nature in my project AND the XML catalog reference to spring-dwr-2.0.xsd - as described in your post. If i do not have the Spring nature, validation does not work.
If i remove the reference to the xsd, Eclipse completely stucks for about half an hour.

MethoD said...

I'm using Netbeans and I got same issue.

How can I do it in Netbeans?

Exactly which folder to put spring-dwr-2.0.xsd file in dwr?

Mary said...

Hello, How do I get in touch with you? There is no email or contact info listed .. please advise .. thanks .. Mary. Please contact me maryregency at gmail dot com