2011-11-06 56 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>