2011-11-06 70 views
0

我有一个服务器api wirtten在Java和客户端用flex编写,我想用GraniteDS将它们配置在一起。然而,试图将此行添加时:集成flex与graniteds

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

到applicationContext.xml的 - 尝试部署web应用程序我(通过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'.

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

回答

0

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

documentation指定:

<?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>