Announcement Announcement Module
No announcement yet.
Does this SpringBlazeDS Integration works for LCDS Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Does this SpringBlazeDS Integration works for LCDS

    I would like to know if the SpringBlazeDS integration works on LCDS. I have tried this method on lcds 2.6 and it is not working.

  • #2
    Yes, it should work. LCDS just extends the BlazeDS core.


    • #3
      It doesnt appear as though it actually does just work. I fought with this all day yesterday assuming i was just doing something wrong. Then last night I finally had the bright idea to try it with BlazeDS and amazingly it all worked.

      When I configure the spring-blazeds in LCDS I get the following error when I launch tomcat.

      Feb 10, 2009 9:18:41 AM org.springframework.flex.messaging.MessageBrokerFa ctoryBean afterPropertiesSet
      INFO: MessageBroker with id 'mySpringManagedMessageBroker' is starting.
      [LCDS]MessageBroker id: mySpringManagedMessageBroker classLoader is: the MessageBroker's class loader and the context class loader (classLoader hashCode: 11087162 (parent hashCode: 16416372 (parent system))
      [LCDS]MessageBroker failed to start: Exception: java.lang.NullPointerException
      at flex.messaging.license.LicenseServiceImpl.getLicen seService(
      at flex.messaging.license.LicenseServiceImpl.getLicen seService(
      at flex.messaging.MessageBroker.startServices(Message
      at flex.messaging.MessageBroker.start(MessageBroker.j ava:353)
      at org.springframework.flex.messaging.MessageBrokerFa ctoryBean.afterPropertiesSet(MessageBrokerFactoryB
      at AutowireCapableBeanFactory.invokeInitMethods(Abstr
      at AutowireCapableBeanFactory.initializeBean(Abstract
      at AutowireCapableBeanFactory.doCreateBean(AbstractAu
      at AutowireCapableBeanFactory$
      at Method)
      at AutowireCapableBeanFactory.createBean(AbstractAuto
      at BeanFactory$1.getObject( 64)
      at ingletonBeanRegistry.getSingleton(DefaultSingleton
      at BeanFactory.doGetBean( )
      at BeanFactory.getBean(
      at BeanFactory.getBean(
      at istableBeanFactory.preInstantiateSingletons(Defaul
      at ationContext.finishBeanFactoryInitialization(Abstr
      at ationContext.refresh(AbstractApplicationContext.ja va:380)
      at org.springframework.web.servlet.FrameworkServlet.c reateWebApplicationContext( 02)
      at org.springframework.web.servlet.FrameworkServlet.i nitWebApplicationContext( )
      at org.springframework.web.servlet.FrameworkServlet.i nitServletBean(
      at it(
      at javax.servlet.GenericServlet.init(GenericServlet.j ava:212)
      at org.apache.catalina.core.StandardWrapper.loadServl et(
      at org.apache.catalina.core.StandardWrapper.load(Stan
      at org.apache.catalina.core.StandardContext.loadOnSta rtup(
      at org.apache.catalina.core.StandardContext.start(Sta
      at org.apache.catalina.core.ContainerBase.addChildInt ernal(
      at org.apache.catalina.core.ContainerBase.addChild(Co
      at org.apache.catalina.core.StandardHost.addChild(Sta
      at org.apache.catalina.startup.HostConfig.deployDirec tory(
      at org.apache.catalina.startup.HostConfig.deployDirec tories(
      at org.apache.catalina.startup.HostConfig.deployApps(
      at org.apache.catalina.startup.HostConfig.start(HostC
      at org.apache.catalina.startup.HostConfig.lifecycleEv ent(
      at org.apache.catalina.util.LifecycleSupport.fireLife cycleEvent(
      at org.apache.catalina.core.ContainerBase.start(Conta
      at org.apache.catalina.core.StandardHost.start(Standa
      at org.apache.catalina.core.ContainerBase.start(Conta
      at org.apache.catalina.core.StandardEngine.start(Stan
      at org.apache.catalina.core.StandardService.start(Sta
      at org.apache.catalina.core.StandardServer.start(Stan
      at org.apache.catalina.startup.Catalina.start(Catalin
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Native
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(De
      at java.lang.reflect.Method.invoke(
      at org.apache.catalina.startup.Bootstrap.start(Bootst
      at org.apache.catalina.startup.Bootstrap.main(Bootstr

      Feb 10, 2009 9:18:41 AM ingletonBeanRegistry destroySingletons
      INFO: Destroying singletons in [email protected]: defining beans [mySpringManagedMessageBroker,org.springframework.w eb.servlet.handler.SimpleUrlHandlerMapping#0,org.s pringframework.flex.messaging.servlet.MessageBroke rHandlerAdapter#0,userService,user]; root of factory hierarchy
      Feb 10, 2009 9:18:41 AM org.springframework.web.servlet.FrameworkServlet initServletBean
      SEVERE: Context initialization failed
      org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'mySpringManagedMessageBroker' defined in ServletContext resource [/WEB-INF/config/web-application-config.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException
      at AutowireCapableBeanFactory.initializeBean(Abstract
      at AutowireCapableBeanFactory.doCreateBean(AbstractAu
      at AutowireCapableBeanFactory$

      Which implies to me that there is something not configured with the license information for LCDS. However when loading the standard MessageBroker in web.xml no license information is required in LCDS.

      Not sure if this is a lack of configuration on my part (not providing a license) or if this is something that has not been dealt with in the framework.

      Has anyone actually gotten this working with LCDS?



      • #4
        So just so its out there, it appears that the spring flex code includes a custom MessageBroker which I expect is based on the blazeds code, and has some kind of conflict with whatever changes are made behind the scenes when LCDS is upgraded from BlazeDS.

        So at this point I think using this with LCDS is a no go. But I am not a project developer, so it might be in the works or I might be missing something in how this all works.


        • #5
          i am having the same issue..anyone has any ideas?


          • #6
            Looks like a potential solution has been suggested in our JIRA. Will examine in detail after I get M2 out today and report back (likely tomorrow).


            • #7
              I'm going to start using AdobeLCDS, and I was wondering if this issue has been resolved?
              Or if perhaps someone could post a link to the JIRA, I could see if I can use the solution proposed over there.



              • #8
                The issue in question is here:

                I've got a different fix from the proposed solution that will be committed later this week, but until that point you could used the workaround attached to the JIRA issue.

                I'll update this thread again once I've committed the change and a nightly build with the fix is available.


                • #9
                  Has anyone got the fix to work?

                  Hi again!
                  I tried to implement the fix. On the MessageBrokerFactoryBean, I set the line here

                  // Set the servlet config as thread local
                  FlexContext.setThreadLocalObjects(null, null, messageBroker, null,
                  null, servletConfig);
                  MessageBrokerFriendly.setInitServletContext(messag eBroker, servletConfig);

                  but I still get the same exception, the License could not be instantiated.
                  (I did a clean build, cleaned tomcat directory... Im sure the fix its in there.)

                  For now, I'm falling back to the old SpringFactory, but any ideas are apreciated.