You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@groovy.apache.org by marbon <ma...@mailbox.org> on 2016/04/15 17:40:18 UTC

No signature of method

Hi,

i have the following Java-Code that i want to convert to groovy:




My current version in groovy is this:


My problem is, that i get the following error, when i try to run the groovy
code:


The Java-exec-Method has the signature:


I tried to cast "new ExecStartResultCallback(System.out, System.err)" to
"ResultCallback", but it did not work.

Is there any way to force Groovy to handle the instance as a
ResultCallback-Instance so that the correct method is called?

Regards,
marbon



--
View this message in context: http://groovy.329449.n5.nabble.com/No-signature-of-method-tp5732344.html
Sent from the Groovy Users mailing list archive at Nabble.com.

Re: No signature of method

Posted by marbon <ma...@mailbox.org>.
Sorry, this was just a failure in the post. I removed .awaitCompletion()
temporary in the groovy-version to check, if it works without that. But it
did not make any difference. The error is the same.

I don't know how to force groovy to call the function. Although the method
signature is correct...



--
View this message in context: http://groovy.329449.n5.nabble.com/No-signature-of-method-tp5732344p5732377.html
Sent from the Groovy Users mailing list archive at Nabble.com.

Re: No signature of method

Posted by John Wagenleitner <jo...@gmail.com>.
In your Java version you call awaitCompletion on the new
ExecStartResultCallback:

.exec(
        new ExecStartResultCallback(System.out, System.err)
.awaitCompletion()
);

In your Groovy version you don't, maybe just a mis-placed ending paren?

.exec(new ExecStartResultCallback(System.out, System.err))
.awaitCompletion()





On Fri, Apr 15, 2016 at 8:40 AM, marbon <ma...@mailbox.org> wrote:

> Hi,
>
> i have the following Java-Code that i want to convert to groovy:
>
>
>
>
> My current version in groovy is this:
>
>
> My problem is, that i get the following error, when i try to run the groovy
> code:
>
>
> The Java-exec-Method has the signature:
>
>
> I tried to cast "new ExecStartResultCallback(System.out, System.err)" to
> "ResultCallback", but it did not work.
>
> Is there any way to force Groovy to handle the instance as a
> ResultCallback-Instance so that the correct method is called?
>
> Regards,
> marbon
>
>
>
> --
> View this message in context:
> http://groovy.329449.n5.nabble.com/No-signature-of-method-tp5732344.html
> Sent from the Groovy Users mailing list archive at Nabble.com.
>