Java SDK Hello world exception

Hi, one more question (not sure I should post it here or in the forum):
I’m trying to follow the Java SDK Quick Start tutorial (doing exactly what is written there) and I’m getting the following exception:

23:15:52.535 [Workflow Executor taskQueue="HelloWorldTaskQueue", namespace="default": 11] ERROR io.temporal.internal.worker.PollerOptions - uncaught exception
java.lang.RuntimeException: Failure processing workflow task. WorkflowId=90301852-b4ce-45c5-9a74-1d2cb7516509, RunId=cce8f93b-0e16-4963-bcdf-c94743a61bf0
	at io.temporal.internal.worker.WorkflowWorker$TaskHandlerImpl.wrapFailure(WorkflowWorker.java:324)
	at io.temporal.internal.worker.WorkflowWorker$TaskHandlerImpl.wrapFailure(WorkflowWorker.java:273)
	at io.temporal.internal.worker.PollTaskExecutor.lambda$process$0(PollTaskExecutor.java:79)
	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:834)
Caused by: java.lang.Error: io.temporal.internal.worker.WorkflowExecutionException: class io.temporal.internal.sync.POJOWorkflowImplementationFactory$POJOWorkflowImplementation$RootWorkflowInboundCallsInterceptor cannot access a member of interface com.mycompany.poc.temporal.HelloWorld with modifiers "public abstract"
	at io.temporal.internal.sync.POJOWorkflowImplementationFactory$POJOWorkflowImplementation$RootWorkflowInboundCallsInterceptor.execute(POJOWorkflowImplementationFactory.java:288)
	at io.temporal.internal.sync.POJOWorkflowImplementationFactory$POJOWorkflowImplementation.execute(POJOWorkflowImplementationFactory.java:250)
	at io.temporal.internal.sync.WorkflowExecuteRunnable.run(WorkflowExecuteRunnable.java:52)
	at io.temporal.internal.sync.SyncWorkflow.lambda$start$0(SyncWorkflow.java:121)
	at io.temporal.internal.sync.CancellationScopeImpl.run(CancellationScopeImpl.java:104)
	at io.temporal.internal.sync.WorkflowThreadImpl$RunnableWrapper.run(WorkflowThreadImpl.java:107)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	... 3 common frames omitted

Am I missing something or the tutorial is out of date? (edited)

There is known issue with the tutorial which we are going to fix. Make sure that the interface is public:

public class GettingStarted {

    private static Logger logger = Workflow.getLogger(GettingStarted.class);

    @WorkflowInterface
    public interface HelloWorld {
        @WorkflowMethod
        void sayHello(String name);
    }
}

Thanks , that helped! I didn’t even pay attention to the interface access modifier.

1 Like