Announcement Announcement Module
Collapse
No announcement yet.
NoSuchFieldError: ASYNC_MESSAGE_FILTERS_ELEMENT_CHILDREN Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • NoSuchFieldError: ASYNC_MESSAGE_FILTERS_ELEMENT_CHILDREN

    When I attempt to load my web application in Tomcat I get the following exception:

    Code:
    BeanInitializationException: MessageBroker initialization failed; nested exception is java.lang.NoSuchFieldError: ASYNC_MESSAGE_FILTERS_ELEMENT_CHILDREN
    My web.xml looks like this:

    Code:
    <web-app>
    
        <listener>
            <listener-class>flex.messaging.HttpFlexSession</listener-class>
        </listener>
    
        <servlet>
            <servlet-name>dispatcherServlet</servlet-name>
            <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
            <init-param>
                <param-name>contextConfigLocation</param-name>
                <param-value>/WEB-INF/spring/application-context.xml</param-value>
            </init-param>
            <load-on-startup>1</load-on-startup>
        </servlet>
    
        <servlet-mapping>
            <servlet-name>dispatcherServlet</servlet-name>
            <url-pattern>/messagebroker/*</url-pattern>
        </servlet-mapping>
    
    </web-app>
    The application context configuration file looks like this:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans>
        
        <bean id="dataService" class="com.abc.webapp.blazeds.service.NacemDataService"/>
            
        <flex:message-broker/>
        
        <flex:remoting-destination ref="dataService" />
    
    </beans>
    I have the following in WEB-INF/flex/services-config.xml:

    Code:
    <services-config>
    
        <services>
            <default-channels>
               <channel ref="my-amf"/>
            </default-channels>
        </services>
    
        <channels>
    
            <channel-definition id="my-amf" 
                                class="mx.messaging.channels.AMFChannel">
                <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf"
                          class="flex.messaging.endpoints.AMFEndpoint"/>
            </channel-definition>
    
            <channel-definition id="my-secure-amf" 
                                class="mx.messaging.channels.SecureAMFChannel">
                <endpoint url="https://{server.name}:{server.port}/{context.root}/messagebroker/amfsecure"
                          class="flex.messaging.endpoints.SecureAMFEndpoint"/>
                <properties>
                    <add-no-cache-headers>false</add-no-cache-headers>
                </properties>
            </channel-definition>
    
            <channel-definition id="my-polling-amf" 
                                class="mx.messaging.channels.AMFChannel">
                <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amfpolling"
                          class="flex.messaging.endpoints.AMFEndpoint"/>
                <properties>
                    <polling-enabled>true</polling-enabled>
                    <polling-interval-seconds>4</polling-interval-seconds>
                </properties>
            </channel-definition>
            
            <channel-definition id="my-longpolling-amf" 
                                class="mx.messaging.channels.AMFChannel">
                <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amflongpolling"
                          class="flex.messaging.endpoints.AMFEndpoint"/>
                <properties>
                    <polling-enabled>true</polling-enabled>
                    <polling-interval-seconds>5</polling-interval-seconds>
                    <wait-interval-millis>60000</wait-interval-millis>
                    <client-wait-interval-millis>1</client-wait-interval-millis>
                    <max-waiting-poll-requests>200</max-waiting-poll-requests>
                </properties>
            </channel-definition>        
    
            <channel-definition id="my-streaming-amf" 
                                class="mx.messaging.channels.StreamingAMFChannel">
                <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/streamingamf" 
                          class="flex.messaging.endpoints.StreamingAMFEndpoint"/>
            </channel-definition>
    
        </channels>
        
        <logging>
            <target class="flex.messaging.log.ConsoleTarget" level="Warn">
                <properties>
                    <prefix>[BlazeDS] </prefix>
                    <includeDate>false</includeDate>
                    <includeTime>false</includeTime>
                    <includeLevel>false</includeLevel>
                    <includeCategory>false</includeCategory>
                </properties>
                <filters>
                    <pattern>Endpoint.*</pattern>
                    <pattern>Service.*</pattern>
                    <pattern>Configuration</pattern>
                </filters>
            </target>
        </logging>
    
        <system>
            <redeploy>
                <enabled>false</enabled>
            </redeploy>
        </system>
    
    </services-config>
    Can anyone surmise what I may be doing wrong?

    Thanks in advance for your help!

    --James
    Last edited by monocongo; Nov 1st, 2010, 01:18 PM. Reason: removed extraneous information

  • #2
    Can you provide the full stack trace of that exception? It sounds like BlazeDS is having a problem parsing your services-config.xml, but I don't see anything wrong with it.

    Comment


    • #3
      Thanks, Jeremy. Here's what I see in my Tomcat log:

      Code:
      Nov 1, 2010 3:10:12 PM org.apache.catalina.core.ApplicationContext log
      INFO: Initializing Spring FrameworkServlet 'dispatcherServlet'
      Nov 1, 2010 3:10:18 PM org.apache.catalina.core.ApplicationContext log
      SEVERE: StandardWrapper.Throwable
      org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_messageBrokerDefaultHandlerMapping': Initialization of bean failed; nested exception is 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.NoSuchFieldError: ASYNC_MESSAGE_FILTERS_ELEMENT_CHILDREN
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
      	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
      	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
      	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:574)
      	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
      	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
      	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.addChildInternal(ContainerBase.java:791)
      	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
      	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
      	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:905)
      	at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:740)
      	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:500)
      	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
      	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
      	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
      	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
      	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(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:289)
      	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
      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.NoSuchFieldError: ASYNC_MESSAGE_FILTERS_ELEMENT_CHILDREN
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1412)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
      	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
      	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.isSingleton(AbstractBeanFactory.java:393)
      	at org.springframework.context.support.AbstractApplicationContext.isSingleton(AbstractApplicationContext.java:1095)
      	at org.springframework.web.servlet.handler.AbstractUrlHandlerMapping.registerHandler(AbstractUrlHandlerMapping.java:382)
      	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:119)
      	at org.springframework.web.context.support.WebApplicationObjectSupport.initApplicationContext(WebApplicationObjectSupport.java:72)
      	at org.springframework.context.support.ApplicationObjectSupport.setApplicationContext(ApplicationObjectSupport.java:73)
      	at org.springframework.context.support.ApplicationContextAwareProcessor.invokeAwareInterfaces(ApplicationContextAwareProcessor.java:106)
      	at org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:85)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:394)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1405)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
      	... 40 more
      Caused by: org.springframework.beans.factory.BeanInitializationException: MessageBroker initialization failed; nested exception is java.lang.NoSuchFieldError: ASYNC_MESSAGE_FILTERS_ELEMENT_CHILDREN
      	at org.springframework.flex.core.MessageBrokerFactoryBean.afterPropertiesSet(MessageBrokerFactoryBean.java:201)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1469)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
      	... 59 more
      Caused by: java.lang.NoSuchFieldError: ASYNC_MESSAGE_FILTERS_ELEMENT_CHILDREN
      	at flex.messaging.config.ServerConfigurationParser.messageFilters(ServerConfigurationParser.java:1488)
      	at flex.messaging.config.ServerConfigurationParser.parseTopLevelConfig(ServerConfigurationParser.java:90)
      	at flex.messaging.config.AbstractConfigurationParser.parse(AbstractConfigurationParser.java:68)
      	at org.springframework.flex.config.FlexConfigurationManager.getMessagingConfiguration(FlexConfigurationManager.java:108)
      	at org.springframework.flex.core.MessageBrokerFactoryBean.afterPropertiesSet(MessageBrokerFactoryBean.java:136)
      	... 61 more

      Comment


      • #4
        It looks like I was not using the correct JAR files, and I'm past my error now after replacing the JARs I was using with flex-*.jar from blazeds-turnkey-4.0.0.14931.zip\resources\lib

        Sorry for any confusion, and thanks again for trying to help me.

        --James

        Comment

        Working...
        X