Hi maybe it is a stupid question but currently I am testing on using spanner with appengine. However I have problem even running an empty transaction neither local nor remote environment. I have tried both mvm and flex.
What I basically did is just run a trivial transaction
System.out.println("HELLO")
TransactionRunner.TransactionCallable callable = new TransactionRunner.TransactionCallable<Void>() {
@Nullable
@Override
public Void run(TransactionContext transaction) throws Exception {
System.out.println("WORLD")
}}
databaseClient.readWriteTransaction().run(callable);
However this code seems to be blocking at the last line and takes forever to return. I tried the same code (and with more complex transaction logic) outside of appengine and it is just working as expected.
Again it is very simple example I am trying to follow but however I cannot get it. So I am wondering what might possible go wrong.
EDIT:
Sorry my bad, i don't think it is a problem about transaction. I have tried just do a singeUse read it is also blocking forever. So I suspecting there is some permission issue that I need to set up for spanner on appengine? However I really couldn't find it anywhere in doc...
EDIT:
After waiting a while, get stacktrace like this
Exception in thread "grpc-default-executor-0" java.lang.NullPointerException
at com.google.appengine.tools.development.RequestEndListenerHelper.getListeners(RequestEndListenerHelper.java:52)
at com.google.appengine.tools.development.RequestEndListenerHelper.register(RequestEndListenerHelper.java:39)
at com.google.appengine.tools.development.RequestThreadFactory$1$1.start(RequestThreadFactory.java:65)
at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:950)
at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1368)
at io.grpc.auth.GoogleAuthLibraryCallCredentials.applyRequestMetadata(GoogleAuthLibraryCallCredentials.java:100)
at io.grpc.internal.CallCredentialsApplyingTransportFactory$CallCredentialsApplyingTransport.newStream(CallCredentialsApplyingTransportFactory.java:98)
at io.grpc.internal.DelayedClientTransport$PendingStream.createRealStream(DelayedClientTransport.java:392)
at io.grpc.internal.DelayedClientTransport$PendingStream.access$100(DelayedClientTransport.java:379)
at io.grpc.internal.DelayedClientTransport$2.run(DelayedClientTransport.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at com.google.appengine.tools.development.RequestThreadFactory$1$1$2.run(RequestThreadFactory.java:110)
at java.security.AccessController.doPrivileged(Native Method)
at com.google.appengine.tools.development.RequestThreadFactory$1$1.run(RequestThreadFactory.java:107)