myeclipse导入 一个项目出现后出现cvc-complex-type.2.4.a: Invalid content was found starting with element 'init-param'. 的错误。
cvc-complex-type.2.4.a: Invalid content was found starting with element 'init-param'. One of '{"http://java.sun.com/xml/ns/javaee":description, "http://
java.sun.com/xml/ns/javaee":display-name, "http://java.sun.com/xml/ns/javaee":icon, "http://java.sun.com/xml/ns/javaee":servlet-name}' is expected.

cvc-complex-type.2.4.a: Invalid content was found starting with element 'init-param'. One of '{"http://java.sun.com/xml/ns/javaee":description, "http://
java.sun.com/xml/ns/javaee":display-name, "http://java.sun.com/xml/ns/javaee":icon, "http://java.sun.com/xml/ns/javaee":servlet-name}' is expected.

解决办法
将这段代码加入到xml文件的"xmlns:xsi="的标签中。
http://www.springmodules.org/schema/cache/springmodules-cache.xsd
http://www.springmodules.org/schema/cache/springmodules-ehcache.xsd

本文档详述了如何解决在Myeclipse中遇到的cvc-complex-type错误,涉及'init-param'元素缺失预期内容,通过在XML文件中添加特定xmlns:xsi属性及引用相关xsd文件来修复问题。
2819

被折叠的 条评论
为什么被折叠?



