New Spring/BlazeDS Integration Test Drive

UPDATE: I posted a new version of the Test Drive for the M2 build of the Spring / BlazeDS integration project here. Please use that version.

SpringSource recently announced the Spring / BlazeDS Integration project. You can read more about the project and download the bits at http://www.springsource.org/spring-flex.

To help developers get started with the integration, I put together a new “Spring / BlazeDS Test Drive”. This Test Drive consists of a minimal version of Tomcat with BlazeDS and the “Spring / BlazeDS integration” preconfigured and ready to use. It also includes a series of samples running “out-of-the-box” that should allow you to get up and running integrating Flex (and Adobe AIR) with Spring in minutes.

Installation Instructions:

  1. Download the Spring / Flex TestDrive here: http://coenraets.org/downloads/spring-flex-testdrive.zip
  2. Unzip it in your root directory
  3. Navigate to /spring-flex-testdrive/tomcat/bin and start Tomcat (for instance: catalina run)
  4. Open a browser and access http://localhost:8080
  5. Follow the instructions

As always, I’d would love to hear your feedback and your ideas to improve this Test Drive.

Christophe

64 Responses to New Spring/BlazeDS Integration Test Drive

  1. JC January 27, 2009 at 1:36 pm #

    WOW !!! Chistophe congratulations, great post!!

  2. cease January 27, 2009 at 2:30 pm #

    I just downloaded, unzipped, and ran startup.bat on windows machine, and I get this error

    SEVERE: Context initialization failed
    org.springframework.beans.factory.CannotLoadBeanClassException: Error loading cl
    ass [flex.spring.samples.product.ProductDAO] for bean with name ‘productDAO’ def
    ined in ServletContext resource [/WEB-INF/config/web-application-config.xml]: pr
    oblem with class file or dependent class; nested exception is java.lang.Unsuppor
    tedClassVersionError: Bad version number in .class file (unable to load class fl
    ex.spring.samples.product.ProductDAO)

  3. Joe Parks January 27, 2009 at 3:08 pm #

    What version of Java are you using? It appears that the “test-drive” package was compiled with a later version.

  4. Christophe January 27, 2009 at 3:35 pm #

    Hi,
    Yes the test drive package was compiled with 1.6. I will post a version built with 1.5 shortly.
    Christophe

  5. Christophe January 27, 2009 at 4:20 pm #

    I rebuilt it using 1.5. You can download it and try again… It should work with a JRE 1.5 now.

  6. Bing January 28, 2009 at 4:54 am #

    Hi Christophe,

    Very nice,I have been tested and share with our Chinese people, you can look at this one http://forum.j2eemx.com/flex/3341-spring-blazeds-flex.html

    Cheers!

  7. Anri January 28, 2009 at 7:03 am #

    Hi Christophe,

    excellent test drive samples!

    Thank a lot for sharing such a nice work !

  8. Hubert January 31, 2009 at 10:58 am #

    Hi Christopher,
    Excellent work!

    Cheers!

  9. Karunya February 2, 2009 at 2:15 pm #

    Hi Christophe,

    Thanks for the Article, this is very useful. But I have couple of questions,
    - Can you provide instructions to deploy this in JBOSS (ver-4.2.2.GA)( that will help a lot)
    - Another big issue I have is, in my company we use the shared web server, so I cannot install BLAZEDS in the Server library. Is there any way around to use BLAZEDS local to my project.

    I really appreciate all your help.

    Thanks,
    Karunya

  10. Orlando Geronimo February 4, 2009 at 5:02 pm #

    Hi Christopher,

    This is amazing.

    Cheers!,
    Orlando

  11. Bryan February 5, 2009 at 4:08 pm #

    Building the examples from source using Maven would be a really nice touch!

    A lot of people using Spring/BlazeDS will have their code built with a CI server and typically maven. Documentation on doing this and not messing up the WTP tools in Eclipse is non existent.

  12. Ramesh February 8, 2009 at 1:36 pm #

    Chris

    Thanks for creating the test drive kit. It gives a stable starting point.

    Please can you suggest how we go about using AMF for the following set up: We have outsourced Flex develpment and are managing J2ee development internally. I am not sure how can flex team access remote objects ..Should we pursue AMF3 / blaze DS route . Earlier we were using Web service based approach and hence it was relatively easy for the flex developers to communicate with the server side components.

    Appreciate your help / suggestions of the same

    Ramesh

  13. Mickaël February 9, 2009 at 8:57 am #

    Thank you very much Christophe. I adapted your tutorial for DM Server, for those who are interested here it is the link to integrate
    Christophe’s samples in DM Server.

    Mickaël

  14. Ramesh February 9, 2009 at 9:42 am #

    Chris

    Pls ignore my earlier post. I have managed to resovle this by manipulating the services-config.xml.

    Thanks
    Ramesh

  15. Kannan February 12, 2009 at 4:03 am #

    I can run the sample using Tomcat, but the same won’t run on any other server, like WASCE v2 or weblogic 10.I created a WAR file and deploy it. The page loads and when clicked on get data nothing happens. so can anyone help on what are the things to check, I am sure all the required jars are in place, because I don’t get any error, when running in tomcat. I did not modify much on the xml. (I just removed the JDBC part and i am returning the output but manually adding data to list, But i guess the request does not even reach the bean)… So please guide me.

  16. Doshi February 12, 2009 at 10:39 am #

    Chris,

    Can you please post the project files for fb3/eclipse.

    Instruction to import the source and build deployable components will work too.

    Thanks alot for the good work.

    Doshi

  17. bruce.peng February 17, 2009 at 10:52 pm #

    Good Job

  18. Henry Olson February 18, 2009 at 7:32 am #

    Christophe,

    Very helpful. I especially appreciated the design progression on the contact manager.

    Worked fine on my Mac after I ran “chmod +x *.sh” in the tomcat/bin directory.

    What’s the best way to build? I didn’t see any e.g. ant files.

    Thanks,

  19. Shekhar February 18, 2009 at 11:19 am #

    Hello Christophe,

    Ref:: Spring BlazeDS Integration–> Integration with Spring Security

    I am trying to integrate Spring Security with BlazeDS. I have two configuration files :applicationContext.xml, and applicationContext-securitycheck.xml.

    However, when I run the app on server I get the following error::
    Error creating bean with name ‘org.springframework.web.servlet.handler.SimpleUrlHandlerMapping#0′ defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘mySpringManagedMessageBroker’ defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: FlexConfigurationManager requires a non-null ServletConfig – Is it being used outside a WebApplicationContext?

    Can you let me know if this is doable? Also, when is the next release for this slated?

  20. Timmy February 22, 2009 at 3:03 am #

    Could you make an example project of BlazeDS multi module application with Maven?

  21. sten February 25, 2009 at 4:31 pm #

    How BlazeDS do serialization of entity? I think it may beget problem with Hibernate lazy init, isn’t it?

  22. ghd hair straighteners March 17, 2009 at 8:52 am #

    This Test Drive consists of a minimal version of Tomcat with BlazeDS and the “Spring / BlazeDS integration” preconfigured and ready to use. It also includes a series of samples running

  23. araç sorgulama March 17, 2009 at 4:54 pm #

    Hi Christopher,

    This is amazing.

  24. Guy14 March 30, 2009 at 5:44 am #

    Nice example.
    I’d like to test my code.
    I’ve some questions:
    - How to configure it if context is not ROOT ?
    - I try to do a project in fb3 from a copy of spring-blazeds-101.
    I get this error : [RPC Fault faultString="[MessagingError message='Destination 'productService' either does not exist or the destination has no channels defined (and the application does not define any default channels.)']” faultCode=”InvokeFailed” faultDetail=”Couldn’t establish a connection to ‘productService’”]
    Can you help me or do you have a fb3 project or better a maven project ?
    Thanks a lot

  25. jimmy March 31, 2009 at 12:44 am #

    hi
    does the M2 support the hibernite lazy?

  26. Veena April 7, 2009 at 1:32 pm #

    Great Christopher… Nice explanation. Many thanks…

    I too tried implementating your approach in my project and getting the same problem as posted

    [RPC Fault faultString="[MessagingError message='Destination 'productService' either does not exist or the destination has no channels defined (and the application does not define any default channels.)']” faultCode=”InvokeFailed” faultDetail=”Couldn’t establish a connection to ‘productService’”].

    Do let me know your thoughts.

  27. Moussa April 9, 2009 at 7:02 am #

    I can run the testdrive but when I try to implement my own project and access the remote object, I’ve the following error
    Error :(mx.messaging.messages::RemotingMessage)#0
    body = (Array)#1
    clientId = (null)
    destination = “”
    headers = (Object)#2
    messageId = “6D66222C-2C4F-5BD6-79ED-8ABFFBE2858B”
    operation = “sayHello”
    source = (null)
    timestamp = 0
    timeToLive = 0 Couldn’t establish a connection to ‘testExportService’

    Pls help.

  28. mssmotorrd May 3, 2009 at 7:56 am #

    It’s the first time I commented here and I must say you share us genuine, and quality information for bloggers! Good job.
    p.s. You have a very good template for your blog. Where did you find it?

  29. George May 4, 2009 at 6:37 am #

    miracle you got this running with the erroneous documentation. I’ve followed the docs to the letter 10 times, and it never forwards on to the amf gateway.. I don’t know how you did it either, because using your config file gives me this:

    Your example would be infinitely more useful if you actually posted the .project files too! It’s nice to see it works, but tbh, it feels more like ner ner ner ner ner, than actually any help right now.

    This is what I get if I turn your server into an eclipse project and run on tomcat:

    O: Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext@bb83e]: org.springframework.beans.factory.support.DefaultListableBeanFactory@83c12d
    May 4, 2009 12:33:31 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
    INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@83c12d: defining beans []; root of factory hierarchy
    May 4, 2009 12:33:32 PM org.springframework.beans.factory.support.DefaultSingletonBeanRegistry destroySingletons
    INFO: Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@83c12d: defining beans []; root of factory hierarchy
    May 4, 2009 12:33:32 PM org.springframework.web.servlet.FrameworkServlet initServletBean
    SEVERE: Context initialization failed
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter’: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/objectweb/asm/commons/EmptyVisitor
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:881)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:838)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:443)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:412)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:383)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:259)
    at org.springframework.web.servlet.DispatcherServlet.createDefaultStrategy(DispatcherServlet.java:731)
    at org.springframework.web.servlet.DispatcherServlet.getDefaultStrategies(DispatcherServlet.java:698)
    at org.springframework.web.servlet.DispatcherServlet.initHandlerAdapters(DispatcherServlet.java:528)
    at org.springframework.web.servlet.DispatcherServlet.initStrategies(DispatcherServlet.java:387)
    at org.springframework.web.servlet.DispatcherServlet.onRefresh(DispatcherServlet.java:374)
    at org.springframework.web.servlet.FrameworkServlet.onApplicationEvent(FrameworkServlet.java:498)
    at org.springframework.web.servlet.FrameworkServlet.onApplicationEvent(FrameworkServlet.java:1)
    at org.springframework.context.event.GenericApplicationListenerAdapter.onApplicationEvent(GenericApplicationListenerAdapter.java:53)
    at org.springframework.context.event.SourceFilteringListener.onApplicationEventInternal(SourceFilteringListener.java:97)
    at org.springframework.context.event.SourceFilteringListener.onApplicationEvent(SourceFilteringListener.java:68)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:98)
    at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:272)
    at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:725)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:379)
    at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:427)
    at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:341)
    at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:307)
    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:1172)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:992)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4371)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
    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:516)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
    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:585)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
    Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/objectweb/asm/commons/EmptyVisitor
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:142)
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:875)
    … 42 more
    Caused by: java.lang.NoClassDefFoundError: org/objectweb/asm/commons/EmptyVisitor
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1847)
    at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:890)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1354)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
    at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.(AnnotationMethodHandlerAdapter.java:145)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:127)
    … 44 more
    May 4, 2009 12:33:32 PM org.apache.catalina.core.ApplicationContext log
    SEVERE: StandardWrapper.Throwable
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter’: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/objectweb/asm/commons/EmptyVisitor
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:881)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:838)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:443)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:412)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:383)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:259)
    at org.springframework.web.servlet.DispatcherServlet.createDefaultStrategy(DispatcherServlet.java:731)
    at org.springframework.web.servlet.DispatcherServlet.getDefaultStrategies(DispatcherServlet.java:698)
    at org.springframework.web.servlet.DispatcherServlet.initHandlerAdapters(DispatcherServlet.java:528)
    at org.springframework.web.servlet.DispatcherServlet.initStrategies(DispatcherServlet.java:387)
    at org.springframework.web.servlet.DispatcherServlet.onRefresh(DispatcherServlet.java:374)
    at org.springframework.web.servlet.FrameworkServlet.onApplicationEvent(FrameworkServlet.java:498)
    at org.springframework.web.servlet.FrameworkServlet.onApplicationEvent(FrameworkServlet.java:1)
    at org.springframework.context.event.GenericApplicationListenerAdapter.onApplicationEvent(GenericApplicationListenerAdapter.java:53)
    at org.springframework.context.event.SourceFilteringListener.onApplicationEventInternal(SourceFilteringListener.java:97)
    at org.springframework.context.event.SourceFilteringListener.onApplicationEvent(SourceFilteringListener.java:68)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:98)
    at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:272)
    at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:725)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:379)
    at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:427)
    at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:341)
    at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:307)
    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:1172)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:992)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4371)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
    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:516)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
    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:585)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
    Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/objectweb/asm/commons/EmptyVisitor
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:142)
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:875)
    … 42 more
    Caused by: java.lang.NoClassDefFoundError: org/objectweb/asm/commons/EmptyVisitor
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1847)
    at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:890)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1354)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
    at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.(AnnotationMethodHandlerAdapter.java:145)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:127)
    … 44 more
    May 4, 2009 12:33:32 PM org.apache.catalina.core.StandardContext loadOnStartup
    SEVERE: Servlet /metServer threw load() exception
    java.lang.NoClassDefFoundError: org/objectweb/asm/commons/EmptyVisitor
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1847)
    at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:890)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1354)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
    at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.(AnnotationMethodHandlerAdapter.java:145)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:127)
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:875)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:838)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:443)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:412)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:383)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:259)
    at org.springframework.web.servlet.DispatcherServlet.createDefaultStrategy(DispatcherServlet.java:731)
    at org.springframework.web.servlet.DispatcherServlet.getDefaultStrategies(DispatcherServlet.java:698)
    at org.springframework.web.servlet.DispatcherServlet.initHandlerAdapters(DispatcherServlet.java:528)
    at org.springframework.web.servlet.DispatcherServlet.initStrategies(DispatcherServlet.java:387)
    at org.springframework.web.servlet.DispatcherServlet.onRefresh(DispatcherServlet.java:374)
    at org.springframework.web.servlet.FrameworkServlet.onApplicationEvent(FrameworkServlet.java:498)
    at org.springframework.web.servlet.FrameworkServlet.onApplicationEvent(FrameworkServlet.java:1)
    at org.springframework.context.event.GenericApplicationListenerAdapter.onApplicationEvent(GenericApplicationListenerAdapter.java:53)
    at org.springframework.context.event.SourceFilteringListener.onApplicationEventInternal(SourceFilteringListener.java:97)
    at org.springframework.context.event.SourceFilteringListener.onApplicationEvent(SourceFilteringListener.java:68)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:98)
    at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:272)
    at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:725)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:379)
    at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:427)
    at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:341)
    at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:307)
    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:1172)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:992)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4371)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
    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:516)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
    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:585)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
    May 4, 2009 12:33:32 PM org.apache.coyote.http11.Http11Protocol start
    INFO: Starting Coyote HTTP/1.1 on http-8080
    May 4, 2009 12:33:32 PM org.apache.jk.common.ChannelSocket init
    INFO: JK: ajp13 listening on /0.0.0.0:8009
    May 4, 2009 12:33:32 PM org.apache.jk.server.JkMain start
    INFO: Jk running ID=0 time=0/47 config=null
    May 4, 2009 12:33:32 PM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 1741 ms

  30. JMilo May 25, 2009 at 10:19 pm #

    I’ve a small problem with a very simple POJO using RemoteObject and the Spring-BlazeDS integration framework you have provided.

    I added my simple POJO class (Repeater) and its config to web-application-config.xml:

    ————-

    ————-

    The MXML of the Flex app, and declaration of RemoteObject:

    ————-

    PROBLEM: Flex error: “Couldn’t establish a connection to ‘repeater’”.

    I know my Repeater POJO is loaded by Spring, because its constructor prints a message to screen when I start the BlazeDS server. But the Flex app can’t access it.

    THANKS!

  31. JMilo May 25, 2009 at 10:21 pm #

    DOUBLE POST because first post filtered out the XML.

    I’ve a small problem with a very simple POJO using RemoteObject and the Spring-BlazeDS integration framework you have provided.

    I added my simple POJO class (Repeater) and its config to web-application-config.xml:

    ————-

    Implementation of Repeater
    bean id=”repeaterSvc” class=”flex.spring.samples.repeater.Repeater”>

    /bean


    bean id=”repeater” class=”org.springframework.flex.messaging.remoting.FlexRemotingServiceExporter”>

    /bean

    ————-

    The MXML of the Flex app, and declaration of RemoteObject:
    mx:RemoteObject id=”ro” destination=”repeater” fault=”faultHandler(event)”>

    /mx:RemoteObject

    ————-

    PROBLEM: Flex error: “Couldn’t establish a connection to ‘repeater’”.

    I know my Repeater POJO is loaded by Spring, because its constructor prints a message to screen when I start the BlazeDS server. But the Flex app can’t access it.

    THANKS!

  32. moya May 30, 2009 at 10:26 pm #

    hi , i want to connect to oracle within BlazeDS and Spring . how can i configure my BlazeDS to connect to alternative Database such as mysql and oracle .

  33. moya May 31, 2009 at 3:21 am #

    hi
    i want to know i must use sampledb or i have alternative
    thanks .

  34. bedava film izle July 28, 2009 at 4:18 am #

    Hello and good day,

    He showed us that it is also possible without drugs! He did a great job!

    Thank you

  35. Andrew August 10, 2009 at 1:15 pm #

    Awesome post Chris. What is the best way to integrate Spring with Livecycle Data Services? Is it similar to the way you integrate it with BlazeDS?

  36. siemens servisi November 4, 2009 at 3:40 am #

    thanx for informations

  37. Simple Simon February 15, 2010 at 9:34 am #

    DeGroot points out that, while customers and suppliers may have their own ways of calculating dielectric constant, having a standardized IPC methodology will allow for better benchmarking of such attributes as frequency, classes of material types, and standardized test structures that are similar to practical signal traces.

  38. Elton Bicalho February 16, 2010 at 11:53 am #

    Well done!
    Keep this share up.

    Thanks,

    Elton Bicalho

  39. agung April 14, 2010 at 11:52 am #

    Hi Mr. Coenroet,

    I’m a beginner and have a little problem, please help me

    I have tried the example project you provide spring-flex-testdrive. and the results are indeed very helpful for beginners. and when I create a project in a secured section as you make but I am using a flex project. I had a little problem when implementing a remote object in the remote config and setting at web.xml, and when I was running out the error message

    “Send failed, error Channel.Connect.Failed NetConnection.Call.Failed: HTTP: Status 404: url: ‘ http://localhost:8080/WebContent/messagebroker/amf ‘-Client.Error.MessageSend ”

    please help me …
    Thanks a lot

  40. George Brown July 27, 2010 at 1:39 am #

    Hi Christopher,

    This is amazing. The samples are great to get started, I will start my build.

    George Brown

  41. Hidayath July 29, 2010 at 2:46 am #

    Hi Christophe, nice article…

    Could you help setting the FlexClient timeout. My web application uses spring-flex-1.0.3.RELEASE , spring 2.5.x and blazeds 3.2.x. My configurations are …

    I’m trying to continuously push data to Flex UI, but the data pushing is stopped after 30 minutes the app loaded in the browser

    THanks … thanks.. thanks…

  42. Hidayath July 29, 2010 at 2:49 am #

    Hi Christophe, nice article…

    Could you help setting the FlexClient timeout? My web application uses spring-flex-1.0.3.RELEASE , spring 2.5.x and blazeds 3.2.x. My configurations are …My configurations were …

    <flex:message-broker>
    <flex:message-service default-channels=”my-streaming-amf”/>
    </flex:message-broker>

    I’m trying to continuously push data to Flex UI, but the data pushing is stopped after 30 minutes the app loaded in the browser

    THanks … thanks.. thanks…

  43. Bedava July 31, 2010 at 6:46 am #

    Bedava her şey burada

  44. Bedava July 31, 2010 at 6:47 am #

    Bedava her şey buradau kamuik amlkiumlk amluikamlkiemlakmlku lmkalmgel burada her eşeamle kimlakml keuiml kamleik mlkuaml k gel bakalım istediğim müzik 2010 burda bedava üstelik ve mbxeaeia

  45. Kral oyun August 1, 2010 at 10:21 am #

    Thanks teşekkürler

  46. Kral oyun August 1, 2010 at 10:22 am #

    Thanks teşekkürler saolun güzel bir site başarılar Thanks teşekkürler

  47. Room loading os wind November 5, 2010 at 8:03 am #

    Room loading os windows xp win 7. programing

    link

    http://cmthai.homeip.net

    Thank you very much

  48. Percy December 28, 2010 at 3:33 am #

    Can you please give this demo a spring-dm version?

  49. engineering leveling March 29, 2011 at 7:14 pm #

    its working, thanks a lot.

  50. Aditi November 14, 2011 at 5:24 am #

    Hi,
    I am trying to deploy the spring flex test drive on weblogic 11g version. the first page of application is getting open. then navigation to next page wont happen. I am not getting error log also. When tried to check for messagebroker, getting error as http 404 not found on webbrowser. Could you please help me out in this?? Is there any server specific configuration required to be done?

  51. Uday Gade January 24, 2012 at 7:20 pm #

    I am new to spring, When I “http://coenraets.org/downloads/spring-flex-testdrive.zip” URL to download I am getting 404 error, can you provide me a sample example of spring with flex.
    I am using sprint 2.5 with flex4.5.

  52. kiran June 9, 2012 at 2:10 pm #

    my jdk is 1.7, I am getting ProductDAO not found exception. If it runs on 1.6 it should run on 1.7 also…but its not running…:(

Trackbacks/Pingbacks

  1. Rimple on Tech - January 31, 2009

    Great Flex Spring/BlazeDS Samples by Christophe Coenrets…

  2. Blog Xebia France - Revue de Presse Xebia - February 2, 2009

    [...] Coenraets, évangéliste Flex pour Adobe, met à disposition sur son blog un code source complet, illustrant l’utilisation de la M1 de ce projet. L’archive, [...]

  3. Edelson Media » Blog Archive » Spring BlazeDS Integration - February 3, 2009

    [...] is  an easy test drive from Christophe at [...]

  4. Confluence: Oleg Ilyenko - February 5, 2009

    Adobe Flex…

    General info !flexlogo1.png! Flex is a highly productive, free open source framework for building and maintaining expressive web applications that deploy consistently on all major browsers, desktops, and operating systems…….

  5. Christophe Coenraets » Blog Archive » Speaking at QCon London in March - February 17, 2009

    [...] to “sneak peeking” some new development in the Flex world, I will be focusing on the Spring / Flex integration recently announced by SpringSource and Adobe. I hope to see you [...]

  6. Christophe Coenraets » Blog Archive » Spring / BlazeDS Integration on Adobe TV - February 20, 2009

    [...] If you are interested in this integration, make sure you check out the Spring / BlazeDS Integration page on the SpringSource web site and the new Spring / BlazeDS Integration Test Drive. [...]

  7. Tampa Flash, Flex and AIR Developers Group » Blog Archive » Another guest speaker joining us next week… - February 24, 2009

    [...] Java web applications with Spring.  Christophe Coenraets, fellow evangelist, recently blogged about this in detail and did a segment on Adobe TV about [...]

  8. Jeremy Grelle, SpringSource joining us in Tampa next week « Greg Wilson’s Ramblings - February 24, 2009

    [...] Java web applications with Spring. Christophe Coenraets, fellow enterprise evangelist, recently blogged about this in detail and did a segment on Adobe TV about [...]

  9. Simple Spring Example Project - February 25, 2009

    [...] the new Spring BlazeDS Integration provided by Spring with BlazeDS projects. Check out the awesome blog post and video by Christophe Coenraets for a walk through of the Spring BlazeDS Integration. His example [...]

  10. Christophe Coenraets » Blog Archive » Spring/BlazeDS Integration Test Drive: M2 Update Available - March 11, 2009

    [...] updated my Test Drive for the M2 build of the Spring / BlazeDS integration [...]

  11. James Ward - RIA Cowboy » Get The Tour de Flex DVD - March 11, 2009

    [...] Spring / Flex Test Drive [...]

  12. Integrating Spring with Flex on TOMCAT « Aditya’s Blog - April 23, 2009

    [...] http://coenraets.org/blog/2009/01/new-springblazeds-integration-test-drive/ [...]

Leave a Reply