Integrating flex with graniteds

701 views Asked by At

I have a server api wirtten in Java and client side written in flex and I am trying to configure them together using GraniteDS. However, when trying to add this line:

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

to the ApplicationContext.xml - then when trying to deploy my webapp (via glassfish) to a server i get this error:

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'.

Any ideas what might be the problem?

1

There are 1 answers

0
farnoux On

In your commonContext.xml file, you should define the xmlns:graniteds namespace and its corresponding xsi:schemaLocation.

As specified in the 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>