title: Spring BlazeDS Integration configuration error
body: <p>We have an existing (no Spring) Flex/BlazeDS application which we are in the process of migrating to use Spring BlazeDS Integration. Within the Maven pom, there is dependency on <strong>spring-flex-core 1.5.2.RELEASE</strong>, and this brings in <strong>Spring 3.0.5-RELEASE</strong> and <strong>BlazeDS 4.0.0.14931</strong></p>
  
  <p>I have removed the flex configuration from web.xml, and instead load Spring.
  When the Spring application context just includes</p>
  
  <pre><code>&lt;flex:message-broker/&gt;
  </code></pre>
  
  <p>everything is great, and the application continues to function.</p>
  
  <p>The problem is when I define a message destination, as follows:</p>
  
  <pre><code>&lt;flex:message-destination id="BlazeDs2" /&gt;
  </code></pre>
  
  <p>The following error is thrown, any help is greatly appreciated:</p>
  
  <pre><code>03 Apr 2012 17:44:12,737 ERROR main DispatcherServlet - Context initialization failed
  org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with 
  name 'BlazeDs2': Invocation of init method failed; nested exception is 
  java.lang.IllegalArgumentException: 'name' must not be null at 
  org.springframework.beans.factory.support.Abstract   
  AutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
  at org.springframework.beans.factory.support.Abstract    
  AutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) at
  org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean
  (AbstractAuto wireCapableBeanFactory.java:456)
  at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject
  (AbstractBeanFactory.java:2 91)
  at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton
  (DefaultSingleton BeanRegistry.java:222)
  at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean
  (AbstractBeanFactory.java:288 )
  at org.springframework.beans.factory.support.Abstract BeanFactory.getBean 
  (AbstractBeanFactory.java:190)
  at org.springframework.beans.factory.support.
  DefaultListableBeanFactory.preInstantiateSingletons
  (DefaultListableBeanFactory.java:580)
  at org.springframework.context.support.AbstractApplic ationContext.
  finishBeanFactoryInitialization(Abstr actApplicationContext.java:895)
  at org.springframework.context.support.AbstractApplicationContext.refresh
  (AbstractApplicationContext.ja va:425)
  at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext
  (FrameworkServlet.java:4 42)
  at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext 
  (FrameworkServlet.java:4 58)
  at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext 
  (FrameworkServlet.java:339 )
  at org.springframework.web.servlet.FrameworkServlet.initServletBean
  (FrameworkServlet.java:306)
  at org.springframework.web.servlet.HttpServletBean.in it(HttpServletBean.java:127)
  at javax.servlet.GenericServlet.init(GenericServlet.j ava:212)
  at org.apache.catalina.core.StandardWrapper.loadServl et(StandardWrapper.java:1173)
  at org.apache.catalina.core.StandardWrapper.load(Stan dardWrapper.java:993)
  at org.apache.catalina.core.StandardContext.loadOnSta rtup(StandardContext.java:4420)
  at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4733)
  at org.apache.catalina.core.ContainerBase.addChildInt ernal(ContainerBase.java:799)
  at org.apache.catalina.core.ContainerBase.addChild(Co ntainerBase.java:779)
  at org.apache.catalina.core.StandardHost.addChild(Sta ndardHost.java:601)
  at org.apache.catalina.startup.HostConfig.deployDescr iptor(HostConfig.java:675)
  at org.apache.catalina.startup.HostConfig.deployDescr iptors(HostConfig.java:601)
  at org.apache.catalina.startup.HostConfig.deployApps( HostConfig.java:502)
  at org.apache.catalina.startup.HostConfig.start(HostC onfig.java:1315)
  at org.apache.catalina.startup.HostConfig.lifecycleEv ent(HostConfig.java:324)
  at org.apache.catalina.util.LifecycleSupport.fireLife cycleEvent
  (LifecycleSupport.java:142)
  at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1061)
  at org.apache.catalina.core.StandardHost.start(Standa rdHost.java:840)
  at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1053)
  at org.apache.catalina.core.StandardEngine.start(Stan dardEngine.java:463)
  at org.apache.catalina.core.StandardService.start(Sta ndardService.java:525)
  at org.apache.catalina.core.StandardServer.start(Stan dardServer.java:754)
  at org.apache.catalina.startup.Catalina.start(Catalin a.java:595)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke  
  (DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at org.apache.catalina.startup.Bootstrap.start(Bootst rap.java:289)
  at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:414)
  Caused by: java.lang.IllegalArgumentException: 'name' must not be null
  at org.springframework.util.Assert.notNull(Assert.jav a:112)
  at org.springframework.beans.factory.BeanFactoryUtils .transformedBeanName  
  (BeanFactoryUtils.java:70)
  at org.springframework.beans.factory.support.
  AbstractBeanFactory.transformedBeanName   (AbstractBeanFactor y.java:993)
  at org.springframework.beans.factory.support.Abstract BeanFactory.containsBean  
  (AbstractBeanFactory.java: 355)
  at org.springframework.flex.core.AbstractDestinationF actory.configureAdapter 
  (AbstractDestinationFactory .java:168)
  at org.springframework.flex.core.AbstractDestinationF actory.afterPropertiesSet 
  (AbstractDestinationFacto ry.java:75)
  at org.springframework.beans.factory.support.Abstract 
  AutowireCapableBeanFactory.invokeInitMethods  
  (AbstractAutowireCapableBeanFactory.java:1477)
  at org.springframework.beans.factory.support.Abstract  
  AutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
  ... 41 more 
  </code></pre>