1 Reply Latest reply on Jul 27, 2015 8:48 AM by Brad Lawryk

    LCDS with Spring 4  throwing NoSuchMethod error in DefaultThreadpoolExecutor. Unable fix the issue.Please help

    justinr82152109

      Please find the below stack trace

       

      • org.springframework.beans.factory.BeanCreationExceptionorg.springframework.beans.factory.BeanCreationException: Error creating bean with name '_messageBroker': Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanInitializationException: MessageBroker initialization failed; nested exception is java.lang.NoSuchMethodError: flex.messaging.util.concurrent.DefaultThreadPoolExecutor.<init>(IIJLedu/emory/mathcs/back port/java/util/concurrent/TimeUnit;Ledu/emory/mathcs/backport/java/util/concurrent/Blockin gQueue;Ledu/emory/mathcs/backport/java/util/concurrent/ThreadFactory;)V at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:547) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingle tons(DefaultListableBeanFactory.java:703) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitializ ation(AbstractApplicationContext.java:760) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:627) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)

      at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)

      at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)

      at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)

      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(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

      at java.lang.reflect.Method.invoke(Unknown Source)

      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.factory.BeanCreationException: Error creating bean with name '_messageBroker': Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanInitializationException: MessageBroker initialization failed; nested exception is java.lang.NoSuchMethodError: flex.messaging.util.concurrent.DefaultThreadPoolExecutor.<init>(IIJLedu/emory/mathcs/back port/java/util/concurrent/TimeUnit;Ledu/emory/mathcs/backport/java/util/concurrent/Blockin gQueue;Ledu/emory/mathcs/backport/java/util/concurrent/ThreadFactory;)V at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBe an(AbstractAutowireCapableBeanFactory.java:1553) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:539) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195) at org.springframework.beans.factory.support.AbstractBeanFactory.isSingleton(AbstractBeanFactory.java:426) at org.springframework.context.support.AbstractApplicationContext.isSingleton(AbstractApplicationContext.java:1002) at org.springframework.web.servlet.handler.AbstractUrlHandlerMapping.registerHandler(AbstractUrlHandlerMapping.java:285) at org.springframework.web.servlet.handler.SimpleUrlHandlerMapping.registerHandlers(SimpleUrlHandlerMapping.java:129) at org.springframework.web.servlet.handler.SimpleUrlHandlerMapping.initApplicationContext(SimpleUrlHandlerMapping.java:104) at org.springframework.context.support.ApplicationObjectSupport.initApplicationContext(ApplicationObjectSupport.java:120) at org.springframework.web.context.support.WebApplicationObjectSupport.initApplicationContex t(WebApplicationObjectSupport.java:72) at org.springframework.context.support.ApplicationObjectSupport.setApplicationContext(ApplicationObjectSupport.java:74) at org.springframework.context.support.ApplicationContextAwareProcessor.invokeAwareInterface s(ApplicationContextAwareProcessor.java:119) at org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeIni tialization(ApplicationContextAwareProcessor.java:94) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPos tProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:407) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBe an(AbstractAutowireCapableBeanFactory.java:1545) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:539) ... 35 more

      Caused by: org.springframework.beans.factory.BeanInitializationException: MessageBroker initialization failed; nested exception is java.lang.NoSuchMethodError: flex.messaging.util.concurrent.DefaultThreadPoolExecutor.<init>(IIJLedu/emory/mathcs/back port/java/util/concurrent/TimeUnit;Ledu/emory/mathcs/backport/java/util/concurrent/Blockin gQueue;Ledu/emory/mathcs/backport/java/util/concurrent/ThreadFactory;)V at org.springframework.flex.core.MessageBrokerFactoryBean.afterPropertiesSet(MessageBrokerFactoryBean.java:207) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMe thods(AbstractAutowireCapableBeanFactory.java:1612) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBe an(AbstractAutowireCapableBeanFactory.java:1549) ... 54 more

      Caused by: java.lang.NoSuchMethodError: flex.messaging.util.concurrent.DefaultThreadPoolExecutor.<init>(IIJLedu/emory/mathcs/back port/java/util/concurrent/TimeUnit;Ledu/emory/mathcs/backport/java/util/concurrent/Blockin gQueue;Ledu/emory/mathcs/backport/java/util/concurrent/ThreadFactory;)V at flex.messaging.socketserver.SocketServer.buildDefaultExecutor(SocketServer.java:1854)at flex.messaging.socketserver.SocketServer.initialize(SocketServer.java:1220) at flex.messaging.endpoints.BaseSocketServerEndpoint.initialize(BaseSocketServerEndpoint.java:217) at flex.messaging.endpoints.RTMPEndpoint.initialize(RTMPEndpoint.java:230) at flex.messaging.config.MessagingConfiguration.createEndpoints(MessagingConfiguration.java:326) at flex.messaging.config.MessagingConfiguration.configureBroker(MessagingConfiguration.java:113) at org.springframework.flex.core.MessageBrokerFactoryBean.afterPropertiesSet(MessageBrokerFactoryBean.java:162) ... 56 more

       


      Here we using LCDS. When we used this with Spring 3 it worked well. Now we are trying to migrate Spring to the latest version 4.1.6, but its throwing the above error. I also Update Spring-flex-jar to the version 1.6. Previously it was 1.0.3. Please help guys awaiting for your reply