Announcement Announcement Module
Collapse
No announcement yet.
Basic Configuration Problem Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Basic Configuration Problem

    I am getting this error:
    SEVERE: StandardWrapper.Throwable
    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.flex.remoting.RemotingDestina tionExporter#0': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Could not find a proper RemotingService in the Flex MessageBroker.
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1337)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:473)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory$1.run(AbstractAutowireC apableBeanFactory.java:409)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:380)
    at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 64)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:221)
    at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:261 )
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:185)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:164)
    at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:429)
    at org.springframework.context.support.AbstractApplic ationContext.finishBeanFactoryInitialization(Abstr actApplicationContext.java:728)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:380)
    at org.springframework.web.servlet.FrameworkServlet.c reateWebApplicationContext(FrameworkServlet.java:4 02)
    at org.springframework.web.servlet.FrameworkServlet.i nitWebApplicationContext(FrameworkServlet.java:316 )
    at org.springframework.web.servlet.FrameworkServlet.i nitServletBean(FrameworkServlet.java:282)
    at org.springframework.web.servlet.HttpServletBean.in it(HttpServletBean.java:126)
    at javax.servlet.GenericServlet.init(GenericServlet.j ava:212)
    at org.apache.catalina.core.StandardWrapper.loadServl et(StandardWrapper.java:1172)
    at org.apache.catalina.core.StandardWrapper.load(Stan dardWrapper.java:992)
    at org.apache.catalina.core.StandardContext.loadOnSta rtup(StandardContext.java:4058)
    at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4371)
    at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1045)
    at org.apache.catalina.core.StandardHost.start(Standa rdHost.java:719)
    at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1045)
    at org.apache.catalina.core.StandardEngine.start(Stan dardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(Sta ndardService.java:516)
    at org.apache.catalina.core.StandardServer.start(Stan dardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalin a.java:578)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootst rap.java:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:413)
    Caused by: java.lang.IllegalArgumentException: Could not find a proper RemotingService in the Flex MessageBroker.
    at org.springframework.util.Assert.notNull(Assert.jav a:112)
    at org.springframework.flex.remoting.RemotingDestinat ionExporter.createDestination(RemotingDestinationE xporter.java:132)
    at org.springframework.flex.core.AbstractDestinationF actory.afterPropertiesSet(AbstractDestinationFacto ry.java:61)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:1368)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1334)
    ... 34 more
    My Web.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">

    <display-name>Spring BlazeDS Integration Samples</display-name>

    <servlet>
    <servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherSe rvlet</servlet-class>
    <init-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>
    /WEB-INF/spring/application-context.xml
    </param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
    <servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
    <url-pattern>/messagebroker/*</url-pattern>
    </servlet-mapping>

    </web-app>
    My application-context.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:flex="http://www.springframework.org/schema/flex"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
    http://www.springframework.org/schema/beans
    http://www.springframework.org/schem...-beans-2.5.xsd
    http://www.springframework.org/schema/flex
    http://www.springframework.org/schema/flex/spring-flex-1.0.xsd">



    <flex:message-broker services-config-path="/WEB-INF/flex/services-config.xml">
    <flex:message-service
    default-channels="my-streaming-amf,my-longpolling-amf,my-polling-amf" />

    </flex:message-broker>


    <bean id="_messageBroker" class="org.springframework.flex.core.MessageBroker FactoryBean" />

    <bean id="productService" class="br.com.springtest.bean.ProductDAO" >
    <flex:remoting-destination/>
    <constructor-arg ref="dataSource"/>
    </bean>


    <!-- <flex:message-broker id="_messageBroker" services-config-path="/WEB-INF/flex/services-config.xml">
    <flex:mapping pattern="/messagebroker/*" />

    </flex:message-broker>

    <flex:message-broker/>-->


    <!-- Maps request paths at /messagebroker to the BlazeDS MessageBroker -->
    <bean class="org.springframework.web.servlet.handler.Sim pleUrlHandlerMapping">
    <property name="mappings">
    <value>
    /*=_messageBroker
    </value>
    </property>
    </bean>


    <!-- Expose the productService bean for BlazeDS remoting -->
    <bean id="product"
    class="org.springframework.flex.remoting.RemotingD estinationExporter">
    <property name="messageBroker" ref="_messageBroker"/>
    <property name="service" ref="productService"/>
    <property name="serviceId" value="productService"/>
    <property name="includeMethods" value="read, update"/>
    <property name="excludeMethods" value="create, delete"/>
    <property name="channels" value="my-amf, my-secure-amf"/>
    </bean>

    <!-- <bean id="mySpringManagedMessageBroker" class="org.springframework.flex.core.MessageBroker FactoryBean">
    <property name="servicesConfigPath" value="classpath*:flex/services-config.xml" />
    </bean>-->



    <!-- Dispatches requests mapped to a MessageBroker -->
    <bean class="org.springframework.flex.servlet.MessageBro kerHandlerAdapter"/>

    <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverM anagerDataSource">
    <property name="driverClassName" value="com.mysql.jdbc.Driver" />
    <property name="url" value="jdbc:mysql://localhost:3306/spring" />
    <property name="username" value="root"/>
    <property name="password" value="root"/>
    </bean>

    </beans>

    My services-config.xml is the same from blazeds.war

    I dont know what to do.... I need any help plzzzzzzzzzzzzzzzzz!!!!!!!

  • #2
    I make a changes but a receive the same error message:

    My Web.xml
    <listener>
    <listener-class>flex.messaging.HttpFlexSession</listener-class>
    </listener>

    <servlet>
    <servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
    <servlet-class>
    org.springframework.web.servlet.DispatcherServlet
    </servlet-class>
    <init-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>
    /WEB-INF/spring/application-context.xml
    </param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
    <servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
    <url-pattern>/messagebroker/*</url-pattern>
    </servlet-mapping>

    </web-app>
    My applicationContext.xml

    <flex:message-broker
    services-config-path="/WEB-INF/flex/services-config.xml">
    <flex:message-service default-channels="my-amf" />
    </flex:message-broker>


    <bean id="_messageBroker"
    class="org.springframework.flex.core.MessageBroker FactoryBean" />

    <bean
    class="org.springframework.web.servlet.handler.Sim pleUrlHandlerMapping">
    <property name="mappings">
    <value>/*=_messageBroker</value>
    </property>
    </bean>

    <bean id="productService"
    class="br.com.springtest.bean.ProductDAO">
    </bean>

    <flex:remoting-destination ref="productService" />
    My error trace:
    SEVERE: StandardWrapper.Throwable
    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.flex.remoting.RemotingDestina tionExporter#0': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Could not find a proper RemotingService in the Flex MessageBroker.
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1337)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:473)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory$1.run(AbstractAutowireC apableBeanFactory.java:409)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:380)
    at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 64)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:221)
    at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:261 )
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:185)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:164)
    at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:429)
    at org.springframework.context.support.AbstractApplic ationContext.finishBeanFactoryInitialization(Abstr actApplicationContext.java:728)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:380)
    at org.springframework.web.servlet.FrameworkServlet.c reateWebApplicationContext(FrameworkServlet.java:4 02)
    at org.springframework.web.servlet.FrameworkServlet.i nitWebApplicationContext(FrameworkServlet.java:316 )
    at org.springframework.web.servlet.FrameworkServlet.i nitServletBean(FrameworkServlet.java:282)
    at org.springframework.web.servlet.HttpServletBean.in it(HttpServletBean.java:126)
    at javax.servlet.GenericServlet.init(GenericServlet.j ava:212)
    at org.apache.catalina.core.StandardWrapper.loadServl et(StandardWrapper.java:1172)
    at org.apache.catalina.core.StandardWrapper.load(Stan dardWrapper.java:992)
    at org.apache.catalina.core.StandardContext.loadOnSta rtup(StandardContext.java:4058)
    at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4371)
    at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1045)
    at org.apache.catalina.core.StandardHost.start(Standa rdHost.java:719)
    at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1045)
    at org.apache.catalina.core.StandardEngine.start(Stan dardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(Sta ndardService.java:516)
    at org.apache.catalina.core.StandardServer.start(Stan dardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalin a.java:578)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootst rap.java:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:413)
    Caused by: java.lang.IllegalArgumentException: Could not find a proper RemotingService in the Flex MessageBroker.
    at org.springframework.util.Assert.notNull(Assert.jav a:112)
    at org.springframework.flex.remoting.RemotingDestinat ionExporter.createDestination(RemotingDestinationE xporter.java:132)
    at org.springframework.flex.core.AbstractDestinationF actory.afterPropertiesSet(AbstractDestinationFacto ry.java:61)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:1368)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1334)
    ... 34 more
    07/06/2009 10:31:35 org.apache.catalina.core.StandardContext loadOnStartup
    SEVERE: Servlet /TestSpringFlex threw load() exception
    java.lang.IllegalArgumentException: Could not find a proper RemotingService in the Flex MessageBroker.
    at org.springframework.util.Assert.notNull(Assert.jav a:112)
    at org.springframework.flex.remoting.RemotingDestinat ionExporter.createDestination(RemotingDestinationE xporter.java:132)
    at org.springframework.flex.core.AbstractDestinationF actory.afterPropertiesSet(AbstractDestinationFacto ry.java:61)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:1368)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1334)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:473)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory$1.run(AbstractAutowireC apableBeanFactory.java:409)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:380)
    at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 64)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:221)
    at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:261 )
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:185)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:164)
    at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:429)
    at org.springframework.context.support.AbstractApplic ationContext.finishBeanFactoryInitialization(Abstr actApplicationContext.java:728)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:380)
    at org.springframework.web.servlet.FrameworkServlet.c reateWebApplicationContext(FrameworkServlet.java:4 02)
    at org.springframework.web.servlet.FrameworkServlet.i nitWebApplicationContext(FrameworkServlet.java:316 )
    at org.springframework.web.servlet.FrameworkServlet.i nitServletBean(FrameworkServlet.java:282)
    at org.springframework.web.servlet.HttpServletBean.in it(HttpServletBean.java:126)
    at javax.servlet.GenericServlet.init(GenericServlet.j ava:212)
    at org.apache.catalina.core.StandardWrapper.loadServl et(StandardWrapper.java:1172)
    at org.apache.catalina.core.StandardWrapper.load(Stan dardWrapper.java:992)
    at org.apache.catalina.core.StandardContext.loadOnSta rtup(StandardContext.java:4058)
    at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4371)
    at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1045)
    at org.apache.catalina.core.StandardHost.start(Standa rdHost.java:719)
    at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1045)
    at org.apache.catalina.core.StandardEngine.start(Stan dardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(Sta ndardService.java:516)
    at org.apache.catalina.core.StandardServer.start(Stan dardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalin a.java:578)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootst rap.java:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:413)
    I getting this error when a put this line in my xml:
    <bean id="productService"
    class="br.com.springtest.bean.ProductDAO">
    </bean>
    I appreciate any help!

    Comment


    • #3
      Why do you have these in there?
      Code:
      <bean id="_messageBroker"
      class="org.springframework.flex.core.MessageBroker FactoryBean" />
      
      <bean
      class="org.springframework.web.servlet.handler.Sim pleUrlHandlerMapping">
          <property name="mappings">
          <value>/*=_messageBroker</value>
          </property>
      </bean>
      They definitely should not be there since you are using the config namespace tags.

      Comment

      Working...
      X