Интеграция flex с гранитами - PullRequest
0 голосов
/ 06 ноября 2011

У меня есть серверный api wirtten на Java и клиентская часть, написанная на flex, и я пытаюсь настроить их вместе, используя GraniteDS.Однако при попытке добавить эту строку:

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

в ApplicationContext.xml - тогда при попытке развернуть мое веб-приложение (через 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'.

Есть идеи, в чем может быть проблема?

1 Ответ

0 голосов
/ 06 ноября 2011

В вашем файле 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>
...