No Such Method Exception#

Runtime message.

Explanation#

This page is about runtime error messages of the form NoSuchMethodException: No public methodName with number arguments in className.

The Orc program attempted to invoke a method methodName on an object. The Orc syntax for this is obj.methodName(arg), where methodName is a method name, and arg is a list of arguments. No public method was found in the obj object's class that was public and had the matching number of arguments.

Advice about this Orc error message is below. Since people use Orc in various ways, we've given you the power to enhance this write-up with your perspective. Edit

Possible Causes#

  • The type of the object is not the type expected.
  • The method name is misspelled.
  • The given number of arguments is incorrect.
  • The method is private, protected, or package access.

Advice#

  • Examine the className class, and check method methodName's name.
  • Examine the className class, and check method methodName's signature.
  • Examine the className class, and check method methodName's visibility.
  • Enable the Orc type checker to verify the object is of the expected type.

Related Reference Topics#


Related User Guide Sections#


See other Orc messages

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-1) was last changed on 05-Sep-2013 17:49 by John Thywissen