0

我有一个用Java编写的服务器api和用flex编写的客户端,我正在尝试使用GraniteDS将它们一起配置。但是,当尝试添加此行时:

<graniteds:flex-filter url-pattern="/*"/>

到 ApplicationContext.xml - 然后在尝试将我的 webapp(通过 glassfish)部署到服务器时出现此错误:

org.apache.catalina.LifecycleException: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 86 in XML document from ServletContext resource [/WEB-INF/commonContext.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 'graniteds:flex-filter'.

任何想法可能是什么问题?

4

1 回答 1

0

在您的commonContext.xml文件中,您应该定义xmlns:graniteds命名空间及其对应的xsi:schemaLocation.

文档中所述:

<?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:graniteds="http://www.graniteds.org/config"
  xsi:schemaLocation="
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
    http://www.graniteds.org/config http://www.graniteds.org/public/dtd/2.1.0/granite-config-2.1.xsd">

  <graniteds:flex-filter url-pattern="/*" />

</beans>
于 2011-11-06T19:23:21.963 回答