Skip navigation
Jeff Battershall
Currently Being Moderated

CF 9.01 Upgrade breaks Flex Gateway - Help!!!!

Sep 1, 2010 5:08 AM

I have an AIR app which is using DataServicesMessaging with subtopics enabled.  I can create the Consumer in AIR but when I subscribe, I get the following error:

 

"Error","cfthread-0","08/31/10","21:03:35",,"CATALOG_ATTRIBUTES_831AE0 FE-B7D2-90A5-87AD-CAC5E01116D9: Event handler exception."

flex.messaging.MessageException: Event handler exception.

at coldfusion.flex.CFEventGatewayAdapter.allowSend(CFEventGatewayAdapter .java:376)

at flex.messaging.services.messaging.SubscriptionManager.addSubtopicSubs cribers(SubscriptionManager.java:330)

at flex.messaging.services.messaging.SubscriptionManager.addSubtopicSubs cribers(SubscriptionManager.java:311)

at flex.messaging.services.messaging.SubscriptionManager.getSubscriberId s(SubscriptionManager.java:264)

at flex.messaging.services.MessageService.pushMessageToClients(MessageSe rvice.java:495)

at coldfusion.flex.CFEventGatewayAdapter.send(CFEventGatewayAdapter.java :250)

at coldfusion.eventgateway.flex.FlexMessagingGateway.outgoingMessage(Fle xMessagingGateway.java:204)

at coldfusion.runtime.CFPage.SendGatewayMessage(CFPage.java:269)

at cfCatalogService2ecfc315059253$func_CFFUNCCFTHREAD_CFCATALOGSERVICE2E CFC3150592531.runFunction(C:\inetpub\wwwroot\staging9sites\staging9si\ com\pmdm\suppliers\services\CatalogService.cfc:110)

at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)

at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMetho d.java:368)

at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.ja va:55)

at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)

at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)

at coldfusion.runtime.UDFMethod.invokeCFThread(UDFMethod.java:201)

at coldfusion.thread.Task.invokeFunction(Task.java:274)

at coldfusion.thread.Task.run(Task.java:140)

at coldfusion.scheduling.ThreadPool.run(ThreadPool.java:201)

at coldfusion.scheduling.WorkerThread.run(WorkerThread.java:71)

 

 
Replies
  • Currently Being Moderated
    Sep 2, 2010 11:08 PM   in reply to Jeff Battershall

    Jeff,

           In CF 9.0.1 allowSend and allowSubscribe event calls is delegated to the user defined allowSend and allowSubscribe methods defined on the gateway cfc. This would allow you to get control to prevent anyone from subscribing or sending to a particular subtopic. These methods can return either a true or false based on whether subscription or sending should be allowed for that user.

     

    The only condition though is that these functions will be invoked in gateway cfc only if the gateway id is specified under the messaging destination in messaging-config.xml instead of the default * present under the destination.

    1. While subscribing, consumer.subtopic has to be set to the subtopic string.

    2. While sending, DSSubtopic has to be set on the message header.
    msg.headers["DSSubtopic"] = "abc";

    3. In onincomingmessage, DSSubtopic has to be on the message header by picking it up from the event object.

       <cfset msg.headers["DSSubtopic"] = event.data.headers.DSSubtopic />   

    4. allow-subpoic has to set to true in the messaging-config.xml destination.4.

                <server>
        <allow-subtopics>true</allow-subtopics>
       </server>

    It looks to me that this error is coming up when allowSend is being invoked on the gateway cfc. Although care is taken that if the method is not defined in the gateway cfc, a default true is returned back. Try adding an allowSend method that takes in an argument of type any that just returns true.

     

    Also can you give me a sample code that is causing this error? Both the code on the client side that subscribes and the entry in messaging-config.xml.

     

    Rakshith

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 3, 2010 6:33 AM   in reply to Jeff Battershall

    Jeff,

         Thanks for the sample code and network monitor data. The info you have provided should help us reproduce the issue here.

     

    I will get back to you once we try this out.

     

    Rakshith

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 7, 2010 6:26 AM   in reply to Jeff Battershall

    Jeff,

         My team mate here tried to reproduce the issue. He is somehow not encountering the issue. I will check again with him.

     

    CF 9.0.1 does not a full installer. Upgrading from CF 9.0 is the only option.

     

    Rakshith

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 7, 2010 10:54 PM   in reply to Jeff Battershall

    Yes, that's right.

     

    You will be installing CF 9.01 and you have to upgrade that to CF 9.0.1 using the CF 9.0.1 updater.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 7, 2010 10:58 PM   in reply to Jeff Battershall

    Are you saying that the same code runs fine on the OS X developer edition? If yes, then it would be worth going through the upgrade process again.

     

    I don't think the issue can be environment specific.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 8, 2010 4:09 AM   in reply to Jeff Battershall

    That's good to know.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 9, 2010 12:31 AM   in reply to Jeff Battershall

    The only information we have now is here http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSd160b5fdf5100e 8f512047ac12a37f1eafb-8000.html

     

    Perhaps I can come up with a blog entry describing this one in detail.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 8, 2011 4:15 AM   in reply to raksh naresh

    Hi,

    I''m getting a non-descriptive error

    Error Occurred While Processing Request - Google Chrome.jpg

     

    The stack trace says the following

    Error Occurred While Processing Request - Google Chrome_2.jpg

     

    I don't know how to fix this. In my CFC I have

     

         <cffunction name="allowSend" access="public" returntype="boolean">
              <cfargument name="subtopic" type="any" required="true"/>
               
              <cfreturn true/>
               
         </cffunction>
    
     
    

     

    Hope anyone can help

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 9, 2011 7:57 AM   in reply to Joost van der Drift

    I'm running 8.0.1, but might be helpful to you anyway. Another undocumented change in this patch is that CFC functions called from Flex must have access="remote" set on them; without this patch they did not. I woke up today to a "our (Flex-based) site is down, help!" call and found my exception.log full of

    "The method 'foo' in component bar cannot be accessed remotely. "
     
    |
    Mark as:
  • Currently Being Moderated
    Feb 9, 2011 8:12 AM   in reply to fedsol

    Hi

    thanks for the reply. My issue however appears when addressing the gateway from Coldfusion. I do not address the gateway from Flex.

     

    Regards,

    Joost

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points