implementação com dpHibernate

0 respostas
furacao123

estou tentando configurar o dpHibernate na minha aplicação pegando como exemplo
este site http://ria.dzone.com/articles/lazy-loading-flex-blazeds-hibernate mas
estou tendo problemas com as tags flex no applicationContext

Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'flex:remoting-destination'. One of '{"http://www.springframework.org/schema/flex":mapping, "http://www.springframework.org/schema/flex":config-processor, "http://www.springframework.org/schema/flex":exception-translator, "http://www.springframework.org/schema/flex":message-interceptor, "http://www.springframework.org/schema/flex":remoting-service, "http://www.springframework.org/schema/flex":message-service, "http://www.springframework.org/schema/flex":secured}' is expected.
        at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
        at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)...

Segue o arquivo ApplicationContext

<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:context="http://www.springframework.org/schema/context"
	xmlns:jee="http://www.springframework.org/schema/jee"
	xmlns:tx="http://www.springframework.org/schema/tx"
        xmlns:flex="http://www.springframework.org/schema/flex"
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
		http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.5.xsd
		http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
                http://www.springframework.org/schema/flex http://www.springframework.org/schema/flex/spring-flex-1.0.xsd">


<!-- Defines the remoting adapter, which intercepts inbound & outbound messages, and routes them thruogh dpHibernate -->
    <bean id="dpHibernateRemotingAdapter"
    class="org.springframework.flex.core.ManageableComponentFactoryBean">
        <constructor-arg
        value="org.dphibernate.adapters.RemotingAdapter" />
        <property name="properties">
            <value>
            {"dpHibernate" :
                {
                    "serializerFactory" : "org.dphibernate.serialization.SpringContextSerializerFactory"
                }
            }
            </value>
        </property>
    </bean>
<!-- Provides a basic service for lazy loading operations through dpHibernate.
It's also exported as a remoting destination, which makes it accessible to flex clients
 -->
    <bean id="dataAccessService"
        class="org.dphibernate.services.SpringLazyLoadService"
        autowire="constructor">
        <flex:remoting-destination />
    </bean>
<!-- The main serializer. Converts outbound POJO's to ASObjects with dpHibernate proxies for lazy loading.  Required -->
    <bean     id="dpHibernateSerializer"
        class="org.dphibernate.serialization.HibernateSerializer"
        scope="prototype">
        <property name="pageSize" value="10"/>
    </bean>
    <bean     id="dpHibernateDeserializer"
        class="org.dphibernate.serialization.HibernateDeserializer"
        scope="prototype" />


<!-- Set up the dpHibernate adapter to be the default adapter for BlazeDS -->
    <flex:message-broker services-config-path="/WEB-INF/flex/services-config.xml">
        <flex:remoting-destination default-adapter-id="dpHibernateRemotingAdapter"
        default-channels="my-amf,my-secure-amf" />
    </flex:message-broker>

O que esta errado na tag?

Criado 11 de fevereiro de 2011
Respostas 0
Participantes 1