Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

NullPointerException in TransactionExceptionHandler #2256

Copy link
Copy link

Description

@cmaan
Issue body actions

Starting with google-cloud-datastore:1.2.1, a user exception thrown within a datastore transaction (runInTransaction) triggers a NullPointerException in com.google.cloud.datastore.TransactionExceptionHandler. The original exception is swallowed.

For reference, a minimal build.gradle which triggers the problem on gradle run is:

import com.google.cloud.datastore.DatastoreOptions;

buildscript {
	repositories {
                mavenCentral()
                maven {
                       	url "https://jitpack.io"
                }
        }
	dependencies {
                //classpath "com.google.cloud:google-cloud-datastore:1.2.0" // works
                classpath "com.google.cloud:google-cloud-datastore:1.2.1" // breaks
                //classpath "com.google.cloud:google-cloud-datastore:1.2.2" // breaks
                //classpath "com.github.GoogleCloudPlatform.google-cloud-java:google-cloud-datastore:95f0dd7eb3b7b360ce51b1930c1f75cc2bb91140" // breaks
        }
}

task run() {
	def ds = DatastoreOptions.newBuilder()
                .build()
                .getService();
        ds.runInTransaction({ rw ->
                throw new RuntimeException("foobar");
        });
}
Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.