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.
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.
Yes, it should work. LCDS just extends the BlazeDS core.
Jeremy Grelle
Staff Engineer, Web Products Team
SpringSource
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(LicenseServiceImpl.java:95)
at flex.messaging.license.LicenseServiceImpl.getLicen seService(LicenseServiceImpl.java:81)
at flex.data.DataService.start(DataService.java:149)
at flex.messaging.MessageBroker.startServices(Message Broker.java:1426)
at flex.messaging.MessageBroker.start(MessageBroker.j ava:353)
at org.springframework.flex.messaging.MessageBrokerFa ctoryBean.afterPropertiesSet(MessageBrokerFactoryB ean.java:169)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:1369)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1335)
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:222)
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:423)
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.addChildInt ernal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(Co ntainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(Sta ndardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDirec tory(HostConfig.java:926)
at org.apache.catalina.startup.HostConfig.deployDirec tories(HostConfig.java:889)
at org.apache.catalina.startup.HostConfig.deployApps( HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostC onfig.java:1149)
at org.apache.catalina.startup.HostConfig.lifecycleEv ent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLife cycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1053)
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(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootst rap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:413)
Feb 10, 2009 9:18:41 AM org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry destroySingletons
INFO: Destroying singletons in org.springframework.beans.factory.support.DefaultL istableBeanFactory@71537: 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 org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1338)
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)
........
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?
Thanks.
sim
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.
i am having the same issue..anyone has any ideas?
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).
Jeremy Grelle
Staff Engineer, Web Products Team
SpringSource
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.
Thanks!
The issue in question is here:
http://jira.springframework.org/browse/FLEX-28
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.
Jeremy Grelle
Staff Engineer, Web Products Team
SpringSource
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);
setupInternalPathResolver();
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.