Announcement Announcement Module
Collapse
No announcement yet.
Spring Integration with LCDS Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Integration with LCDS

    I am trying to use Spring Flex Integration with LCDS.
    I get the following error.
    Code:
    org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [flex.springintegration.core.DataServicesConfigProcessor] for bean with name '_messageBrokerDataServicesConfigProcessor' defined in null; nested exception is java.lang.ClassNotFoundException: flex.springintegration.core.DataServicesConfigProcessor
    	at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1235)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:576)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getType(AbstractBeanFactory.java:549)
    	at org.springframework.flex.config.RemotingAnnotationPostProcessor.findRemotingDestinations(RemotingAnnotationPostProcessor.java:148)
    	at org.springframework.flex.config.RemotingAnnotationPostProcessor.postProcessBeanFactory(RemotingAnnotationPostProcessor.java:79)
    	at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:663)
    	at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:653)
    	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:407)
    	at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:442)
    	at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:458)
    	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.init(HttpServletBean.java:127)
    	at javax.servlet.GenericServlet.init(GenericServlet.java:212)
    	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
    	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)
    	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4187)
    	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4496)
    	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    	at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
    	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    	at org.apache.catalina.core.StandardService.start(StandardService.java:519)
    	at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    	at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.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(Bootstrap.java:289)
    	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
    Caused by: java.lang.ClassNotFoundException: flex.springintegration.core.DataServicesConfigProcessor
    	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1516)
    	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361)
    	at org.springframework.util.ClassUtils.forName(ClassUtils.java:257)
    	at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:408)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1256)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1227)
    	... 30 more
    I looked at the trunk code for Spring Flex Integration
    What library does DataServicesConfigProcessor belong to?
    It's neither part of BlazeDS 4.x nor LCDS 3.x

    Code:
    public static final String DATASERVICES_PROCESSOR_CLASS_NAME = "flex.springintegration.core.DataServicesConfigProcessor";

    I am using 1.5.0.M2 for Spring Flex

  • #2
    That refers to a class that the LCDS guys are working on. I don't believe it is yet part of any public release.

    Comment


    • #3
      so it isn't part of the spring-flex trunk nor it is part of the blazeds trunk?

      Comment


      • #4
        That is correct.

        Comment


        • #5
          okay so what would be the way to configure Spring DispatcherServlet and LCDS message broker to work together? Using the factory method? or is there any other way?

          Comment


          • #6
            Using LCDS with SpringBuild, on the BlazeDS Integration foundation to provide additional benefit, an add-on for LCDS are as an optional module of Spring, BlazeDS Integration is Spring Adapters for LCDS. The upcoming feature of LCDs Integration is ensure smooth integration of running BlazeDS Integration features with the LCDS NIO-based SocketServer.

            Comment


            • #7
              Originally posted by racyhall11 View Post
              Using LCDS with SpringBuild, on the BlazeDS Integration foundation to provide additional benefit, an add-on for LCDS are as an optional module of Spring, BlazeDS Integration is Spring Adapters for LCDS. The upcoming feature of LCDs Integration is ensure smooth integration of running BlazeDS Integration features with the LCDS NIO-based SocketServer.
              Unfortunately, I don't understand what you are trying to say here. I know the LCDS integration is in the works, but it hasn't reached a Milestone yet. I wanted to find out until then what would be the best way to configure LCDS with spring.

              Comment


              • #8
                Originally posted by andthereitgoes View Post
                okay so what would be the way to configure Spring DispatcherServlet and LCDS message broker to work together? Using the factory method? or is there any other way?
                Well, it depends on exactly which parts of the Spring support you are trying to use. It should be relatively easy to get the Remoting and Messaging support to work.

                Security is another story, because of the way we have to integrate with the AMF channels at a deeper level using Spring AOP. Some of the things we do there are not applicable to the RTMP or NIO channels. Additionally, the ideas of custom MessageInterceptors and ExceptionTranslators (which were extracted out of the original security integration), need special attention to be made to work with the LCDS channel types. This is what the LCDS team is currently working on but isn't yet available.

                If you don't need the above, then it could be made to work even with Spring BlazeDS 1.0.3 for Remoting and Messaging. The main problem is that you won't be able to use the <flex:message-broker> tag, because it causes the AOP hooks to be applied which are incompatible.

                The way to make it all work would be to manually configure the MessageBrokerFactoryBean, instead of using the <flex:message-broker> tag. If you get that set up correctly, then you should be able to continue to use the <flex:remoting-destination> and <flex:message-destination> (and its variants) tags just as you would with BlazeDS.

                This would be the equivalent of what gets set up by the basic <flex:message-broker /> tag:
                Code:
                <!-- Bootstraps the MessageBroker -->	
                <bean id="_messageBroker" class="org.springframework.flex.core.MessageBrokerFactoryBean">
                    <property name="configProcessors">
                        <list>
                            <bean class="org.springframework.flex.remoting.RemotingServiceConfigProcessor"/>
                            <bean class="org.springframework.flex.messaging.MessageServiceConfigProcessor"/>
                        </list>
                    </property>
                </bean>
                    
                <!-- Maps request paths at /messagebroker to the BlazeDS MessageBroker -->
                <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
                    <property name="mappings">
                        <value>
                            /*=_messageBroker
                        </value>
                    </property>
                </bean>
                	
                <!-- Dispatches requests mapped to a MessageBroker -->
                <bean class="org.springframework.flex.servlet.MessageBrokerHandlerAdapter"/>
                Now, perhaps the better option would be to get the current trunk in a state that is at least partially backwards-compatible with older versions of LCDS by not failing when the new DataServicesConfigProcessor class is not found. Then you would be able to at least still have the equivalent of the above manual configuration by using the <flex:message-broker /> tag, you just still wouldn't be able to use the above mentioned features with the LCDS endpoints (and we could log a warning regarding that).

                Comment


                • #9
                  Thanks for the reply. Yes perhaps it would be a good idea to get a the current trunk in that state so it's backwards-compatible.

                  I was wondering if with the above configuration would it be possible to configure data services as well without using SBD.

                  So rest of the services are using SBD and data services uses something like a Spring factory?

                  Comment


                  • #10
                    Yes, though I've not tried it, it is probably possible. It's a little clunky, but there's no reason the Spring Factory wouldn't work alongside the fully Spring-managed destinations.

                    Comment

                    Working...
                    X