没有方法签名:java.lang.String.waitFor()适用于参数类型:()值:[]

时间:2019-08-28 22:36:55

标签: groovy

出于某种原因,我今天开始收到此异常:

19/08/28 17:33:01.739 ERROR: No signature of method: java.lang.String.waitFor() is applicable for argument types: () values: []
Possible solutions: wait(), wait(long), wait(long, int), with(groovy.lang.Closure), notify()
groovy.lang.MissingMethodException: No signature of method: java.lang.String.waitFor() is applicable for argument types: () values: []
Possible solutions: wait(), wait(long), wait(long, int), with(groovy.lang.Closure), notify()
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:55)
    at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:46)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
    at jiraActionExecutor.addIssueKeyToIncidentDetails(jiraActionExecutor.groovy:132)
    at jiraActionExecutor$addIssueKeyToIncidentDetails.callCurrent(Unknown Source)
    at jiraActionExecutor.run(jiraActionExecutor.groovy:104)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:567)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1054)
    at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:704)
    at groovy.lang.GroovyObjectSupport.invokeMethod(GroovyObjectSupport.java:44)
    at groovy.lang.Script.invokeMethod(Script.java:78)
    at com.ifountain.opsgenie.client.script.GroovyCompiledScriptEngine.doRun(GroovyCompiledScriptEngine.java:21)
    at com.ifountain.opsgenie.client.script.AbstractCompiledScriptEngine.runScript(AbstractCompiledScriptEngine.java:30)
    at com.ifountain.opsgenie.client.script.ScriptManager.runScript(ScriptManager.java:62)
    at com.ifountain.opsgenie.client.marid.alert.AlertActionUtils.executeActionScript(AlertActionUtils.java:43)
    at com.ifountain.opsgenie.client.marid.alert.PubnubAlertActionListener.processMessage(PubnubAlertActionListener.java:163)
    at com.ifountain.opsgenie.client.marid.alert.PubnubAlertActionListener$2$1$1.run(PubnubAlertActionListener.java:99)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:835)

我找不到任何指示使用此方法的适当方法的信息。这是它正在中断的代码:

if (responseBody != null) {
        process = [ 'bash', '-c', "curl -X POST \
                                    -H \"Content-Type: application/json\" \
                                    -H \"Authorization: GenieKey 8e927cdc-aa94\" \
                                    -d '${json}' \
                                    https://api.opsgenie.com/v1/incidents/${incidentId}/details?identifierType=id" \
                ].execute().text
        process.waitFor()
        logger.debug(process.err.text)
        logger.debug(process.text)

我在做什么错了?

0 个答案:

没有答案