Search code examples
javaactionscript-3apache-flexblazedsamf

Java, BlazeDS, Flex - Error #10566: Cannot create property smallMessage on AcknowledgeMessage?


I have a working Flex/Java application, but if I log out of the channelSet and log back in, in the debug console I am seeing numerous instances of this error:

ReferenceError: Error #1056: Cannot create property smallMessage on mx.messaging.messages.AcknowledgeMessage.

The error itself doesn't seem to interfere with app.

The AcknowledgeMessage class is not my class -- and I don't know why the Java side and Flex side don't match up with regard to properties on their internal classes.

Any help is appreciated.

Versions:

  • Flex 4.1.0.16076
  • BlazeDS 4.0.0.14931
  • Spring-Flex 1.5.0.RELEASE

Solution

  • We are having exactly the same problem in our application. I've managed to hide the error using the following ugly hack.

    First, create a class like so:

    public class FixedAcknowledgeMessage extends AcknowledgeMessage {
        private var _smallMessage : *;
    
        public function FixedAcknowledgeMessage() { }
    
        public function get smallMessage() : * {
            return _smallMessage;
        }
    
        public function set smallMessage(value : *) : void {
            _smallMessage = value;
        }   
    }
    

    And then, in your startup code, replace AcknowledgeMessage with your fixed one:

    registerClassAlias("flex.messaging.messages.AcknowledgeMessage", FixedAcknowledgeMessage);
    

    We also do the same hack for the classes ErrorMessage and AsyncMessage, which seem to suffer from the same problem. I have no idea if this hack may have some negative side effects, and I would love to find a more proper fix for it.