Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-1856

Error while selecting appropriate method

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.0
    • 1.1-beta-1
    • None
    • None
    • Linux, JDK 1.5

    Description

      When I try to execute following script:

      import org.dom4j.tree.DefaultElement

      def initialAction = new DefaultElement("initial-action");
      def actionElement = new DefaultElement("action");
      initialAction.add(actionElement);

      I got following exception:
      Cannot resolve which method to invoke for

      {class org.dom4j.tree.DefaultElement}

      due to overlapping prototypes between:

      {interface org.dom4j.Node} {interface org.dom4j.Element}

      at groovy.lang.MetaClassImpl.chooseMostSpecificParams(MetaClassImpl.java:1869)
      at groovy.lang.MetaClassImpl.chooseMethod(MetaClassImpl.java:1817)
      at groovy.lang.MetaClassImpl.getMethodWithoutCaching(MetaClassImpl.java:629)
      at groovy.lang.MetaClassImpl.getMethodWithCaching(MetaClassImpl.java:583)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:470)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:449)
      at org.codehaus.groovy.runtime.Invoker.invokePojoMethod(Invoker.java:129)
      at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:117)
      at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:111)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:187)

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            partizan Alexander Borovsky
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: