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

  • JC

    WOW !!! Chistophe congratulations, great post!!

  • cease

    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)

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

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

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

  • 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!

  • Anri

    Hi Christophe,

    excellent test drive samples!

    Thank a lot for sharing such a nice work !

  • Pingback: Rimple on Tech()

  • Hubert

    Hi Christopher,
    Excellent work!

    Cheers!

  • Pingback: Blog Xebia France - Revue de Presse Xebia()

  • Karunya

    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

  • Pingback: Edelson Media » Blog Archive » Spring BlazeDS Integration()

  • Hi Christopher,

    This is amazing.

    Cheers!,
    Orlando

  • Pingback: Confluence: Oleg Ilyenko()

  • Bryan

    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.

  • 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

  • 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

  • Chris

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

    Thanks
    Ramesh

  • Kannan

    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.

  • Doshi

    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

  • Pingback: Christophe Coenraets » Blog Archive » Speaking at QCon London in March()

  • bruce.peng

    Good Job

  • Henry Olson

    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,

  • Shekhar

    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?

  • Pingback: Christophe Coenraets » Blog Archive » Spring / BlazeDS Integration on Adobe TV()

  • Timmy

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

  • Pingback: Tampa Flash, Flex and AIR Developers Group » Blog Archive » Another guest speaker joining us next week…()

  • Pingback: Jeremy Grelle, SpringSource joining us in Tampa next week « Greg Wilson’s Ramblings()

  • Pingback: Simple Spring Example Project()

  • sten

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

  • Pingback: Christophe Coenraets » Blog Archive » Spring/BlazeDS Integration Test Drive: M2 Update Available()

  • Pingback: James Ward - RIA Cowboy » Get The Tour de Flex DVD()

  • 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

  • Hi Christopher,

    This is amazing.

  • Guy14

    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

  • hi
    does the M2 support the hibernite lazy?

  • Veena

    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.

  • Moussa

    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.

  • Pingback: Integrating Spring with Flex on TOMCAT « Aditya’s Blog()

  • 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?

  • George

    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

  • JMilo

    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!

  • JMilo

    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!

  • moya

    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 .

  • moya

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

  • Hello and good day,

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

    Thank you

  • Andrew

    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?

  • thanx for informations

  • 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.

  • Well done!
    Keep this share up.

    Thanks,

    Elton Bicalho

  • agung

    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

  • Hi Christopher,

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

    George Brown

  • Hidayath

    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…

  • Hidayath

    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…

  • Bedava her şey burada

  • 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

  • Thanks teşekkürler

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

  • Room loading os windows xp win 7. programing

    link

    http://cmthai.homeip.net

    Thank you very much

  • Percy

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

  • its working, thanks a lot.

  • Aditi

    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?

  • Uday Gade

    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.

  • kiran

    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…:(

css.php