Zend Framework

Amf server fails with Exception "Duplicate method registered:"

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 1.7.8
  • Fix Version/s: None
  • Component/s: Zend_Amf
  • Labels:
    None

Description

The Amf_Server throws an Exception with Message "Duplicate method registered:" in Zend_Amf_Server line 595

This happens, if a AMF request contains at least two bodies, where the first body calls ClassA::funcA and the second calls a nonexistent method of the same class eg. ClassA::nonexistentFunc .
The Exception is misleading and something like "Function xy is not defined" should be thrown.

Regards
Stefan

Activity

Hide
Wade Arnold added a comment -

Can you please supply sample code for this issue. I can not reproduce it.

Show
Wade Arnold added a comment - Can you please supply sample code for this issue. I can not reproduce it.
Hide
Stefan Klug added a comment -

Testcase showing the problem

Show
Stefan Klug added a comment - Testcase showing the problem
Hide
Stefan Klug added a comment -

I've attached a testcase, showing the problem.
You'll have to adjust the path to the ZendFramework in amfgateway.php to get it to run. Then simply open test.swf in a webbrowser and hit the button TWO times.
I had to hit the exute button twice, to get flash to send the two requests in one AMF Message.
A charles log of my session is also in the archive.
The last amf request is the one with the wrong exception message.

BTW. Is there any infrastructure available to easy developing of such small testcases? In the Zend Unittests I've only found tests based on recorded amf messages, but no mxlm...

Show
Stefan Klug added a comment - I've attached a testcase, showing the problem. You'll have to adjust the path to the ZendFramework in amfgateway.php to get it to run. Then simply open test.swf in a webbrowser and hit the button TWO times. I had to hit the exute button twice, to get flash to send the two requests in one AMF Message. A charles log of my session is also in the archive. The last amf request is the one with the wrong exception message. BTW. Is there any infrastructure available to easy developing of such small testcases? In the Zend Unittests I've only found tests based on recorded amf messages, but no mxlm...
Hide
Sean Thayne added a comment -

Had this same issue affect me today.

Show
Sean Thayne added a comment - Had this same issue affect me today.

People

Vote (1)
Watch (0)

Dates

  • Created:
    Updated: