1
votes

I have a gradle project in my Eclipse with a number of spring-integration context XMLs. These context XML files used to validate okay against the spring-integration schemas but now, for some reason, they are showing 'cvc-complex-type' errors. e.g. I have an element with an error-channel attribute. But on validation, it has started saying: "cvc-complex-type.3.2.2: Attribute 'error-channel' is not allowed to appear in element 'int:gateway'."

Now, looking in my Eclipse preferences' General -> Network Connections -> Cache, I can see that only spring-integration-1.0.xsd is in the cache (which wouldn't know anything about an error-channel attribute in gateway element), so I can see why the validation error appears. But, my project's classpath is working with spring-integration-core-2.2.0 so I would expect the spring context XMLs to validate against spring-integration-2.2.xsd schema, but it no longer does, for some unknown reason.

My spring context XMLs, have the following namespace declaration:

http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd.

Any ideas why the validation is not happening against spring-integration-2.2.xsd schemas any more? And what may have caused it?

The project itself, still compiles and runs okay as the project itself is aware of the 2.2 xsd schema, but not Eclipse.

Thanks for any help on this matter,

PM.

1

1 Answers

2
votes

Here is an answer: http://forum.spring.io/forum/spring-projects/integration/738046-eclipse-cannot-find-the-spring-integration-3-0-xsd-and-fails-validation Quote Gary:

If you enable "Spring Nature" on the project, STS should resolve the schemas from the jars.