即使在使用aspectj插件和其他依赖项之后,使用@Asynchronous的SWF工作流也会失败

时间:2016-05-09 06:58:35

标签: aspectj amazon-swf aspectj-maven-plugin

以下是我的示例工作流实施:

public class GreeterWorkflowImpl implements GreeterWorkflow {
    private helloWorld.HelloWorldWorkflow.GreeterActivitiesClient operations = new helloWorld.HelloWorldWorkflow.GreeterActivitiesClientImpl();

    public void greet() {
        Promise<String> name = operations.getName();
        Promise<String> greeting = operations.getGreeting(name);

        sayMore(greeting);

        //operations.say(greeting);
    }

    @Asynchronous
    public void sayMore(Promise<String> greeting) {
        System.out.println(greeting.get()+ " 8.0");
    }
}

这是错误:

工作流程执行失败

        ["java.lang.IllegalStateException",{"cause":null,"stackTrace":[{"methodName":"get","fileName":"Settable.java","lineNumber":91,"className":"com.amazonaws.services.simpleworkflow.flow.core.Settable","nativeMethod":false},{"methodName":"get","fileName":"Functor.java","lineNumber":35,"className":"com.amazonaws.services.simpleworkflow.flow.core.Functor","nativeMethod":false},{"methodName":"sayMore","fileName":"GreeterWorkflowImpl.java","lineNumber":23,"className":"helloWorld.HelloWorldWorkflow.GreeterWorkflowImpl","nativeMethod":false},
    {"methodName":"greet","fileName":"GreeterWorkflowImpl.java","lineNumber":16,"className":"helloWorld.HelloWorldWorkflow.GreeterWorkflowImpl","nativeMethod":false},{"methodName":"invoke0","fileName":"NativeMethodAccessorImpl.java","lineNumber":-2,"className":"sun.reflect.NativeMethodAccessorImpl","nativeMethod":true},{"methodName":"invoke","fileName":"NativeMethodAccessorImpl.java","lineNumber":62,"className":"sun.reflect.NativeMethodAccessorImpl","nativeMethod":false},{"methodName":"invoke","fileName":"DelegatingMethodAccessorImpl.java","lineNumber":43,"className":"sun.reflect.DelegatingMethodAccessorImpl","nativeMethod":false},{"methodName":"invoke","fileName":"Method.java","lineNumber":498,"className":"java.lang.reflect.Method","nativeMethod":false},{"methodName":"invokeMethod","fileName":"POJOWorkflowDefinition.java","lineNumber":150,"className":"com.amazonaws.services.simpleworkflow.flow.pojo.POJOWorkflowDefinition","nativeMethod":false},{"methodName":"access$1","fileName":"POJOWorkflowDefinition.java","lineNumber":148,"className":"com.amazonaws.services.simpleworkflow.flow.pojo.POJOWorkflowDefinition","nativeMethod":false},{"methodName":"doTry","fileName":"POJOWorkflowDefinition.java","lineNumber":76,"className":"com.amazonaws.services.simpleworkflow.flow.pojo.POJOWorkflowDefinition$1","nativeMethod":false},{"methodName":"","fileName":"","lineNumber":0,"className":"--- continuation
---","nativeMethod":false},{"methodName":"execute","fileName":"POJOWorkflowDefinition.java","lineNumber":66,"className":"com.amazonaws.services.simpleworkflow.flow.pojo.POJOWorkflowDefinition","nativeMethod":false},{"methodName":"doAsync","fileName":"AsyncDecider.java","lineNumber":70,"className":"com.amazonaws.services.simpleworkflow.flow.worker.AsyncDecider$WorkflowExecuteAsyncScope","nativeMethod":false}],"localizedMessage":"not ready","message":"not ready","suppressed":["[Ljava.lang.Throwable;",[]]}]

我已经按照这个答案(使用了aspectjrt和aspectj-maven-plugin)。

AspectJ Load time weaving fails in AWS SWF using Java?

0 个答案:

没有答案