GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(java): register test class for reflection to fix native image test by mpeddada1 · Pull Request #766 · googleapis/java-core

This repository was archived by the owner on Dec 3, 2023. It is now read-only.

Conversation

@mpeddada1

@mpeddada1 mpeddada1 commented Mar 16, 2022

Copy link
Copy Markdown
Contributor

Running mvn test -Dtest=com.google.cloud.spanner.DatabaseAdminClientTest -Pnative -DfailIfNoTests=false locally in java-spanner results in the following error message:

 com.google.cloud.spanner.SpannerException: UNKNOWN: com.google.api.gax.rpc.UnknownException: io.grpc.StatusRuntimeException: UNKNOWN
       com.google.cloud.spanner.SpannerExceptionFactory.newSpannerExceptionPreformatted(SpannerExceptionFactory.java:284)
       com.google.cloud.spanner.SpannerExceptionFactory.newSpannerException(SpannerExceptionFactory.java:61)
       com.google.cloud.spanner.SpannerExceptionFactory.newSpannerException(SpannerExceptionFactory.java:181)
       com.google.cloud.spanner.spi.v1.GapicSpannerRpc.get(GapicSpannerRpc.java:1682)
       com.google.cloud.spanner.spi.v1.GapicSpannerRpc.lambda$listBackups$5(GapicSpannerRpc.java:1021)
       [...]
     Caused by: java.util.concurrent.ExecutionException: com.google.api.gax.rpc.UnknownException: io.grpc.StatusRuntimeException: UNKNOWN
       com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:588)
       com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:567)
       com.google.cloud.spanner.spi.v1.GapicSpannerRpc.get(GapicSpannerRpc.java:1676)
       [...]
     Caused by: com.google.api.gax.rpc.UnknownException: io.grpc.StatusRuntimeException: UNKNOWN
       com.google.api.gax.rpc.ApiExceptionFactory.createException(ApiExceptionFactory.java:75)
       com.google.api.gax.grpc.GrpcApiExceptionFactory.create(GrpcApiExceptionFactory.java:72)
       com.google.api.gax.grpc.GrpcApiExceptionFactory.create(GrpcApiExceptionFactory.java:60)
       com.google.api.gax.grpc.GrpcExceptionCallable$ExceptionTransformingFuture.onFailure(GrpcExceptionCallable.java:97)
       com.google.api.core.ApiFutures$1.onFailure(ApiFutures.java:68)
       [...]
     Caused by: io.grpc.StatusRuntimeException: UNKNOWN
       io.grpc.Status.asRuntimeException(Status.java:535)
       [...]

Digging through the stacktrace revealed that an inner class of com.google.cloud.spanner.MockDatabaseAdminServiceImpl wasn't accessible to the native image builder. This resulted in an Exception being thrown when (String) obj.getClass().getMethod("getName") was called here:

https://github.com/googleapis/java-spanner/blob/7de41bf96ceebe45663d07c4416c488ad4f54832/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MockDatabaseAdminServiceImpl.java#L588

cc @meltsufin

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mpeddada1
fix(java): register test class for reflection to fix native image test
5c53259
@mpeddada1
mpeddada1 requested review from a team, Neenu1995, meltsufin and suztomo March 16, 2022 22:44
@gcf-owl-bot
🦉 Updates from OwlBot post-processor
7ea5bb5
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
suztomo
suztomo approved these changes Mar 17, 2022
View reviewed changes

@suztomo suztomo left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may want to move SpannerFeature.java to spanner repository to save your time.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mpeddada1 mpeddada1 added kokoro:run Add this label to force Kokoro to re-run the tests. labels Apr 1, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Apr 1, 2022
@mpeddada1
mpeddada1 merged commit 6fe52c3 into main Apr 1, 2022
@mpeddada1
mpeddada1 deleted the fix-spanner-test branch April 1, 2022 19:55
@release-please release-please Bot mentioned this pull request Apr 1, 2022
chore(main): release 2.6.0 #786
Merged
gcf-merge-on-green Bot pushed a commit that referenced this pull request Apr 14, 2022
@release-please
chore(main): release 2.6.0 (#786)
95b1e0c
🤖 I have created a release *beep* *boop*
---


## [2.6.0](v2.5.11...v2.6.0) (2022-04-14)


### Features

* **java:** remove GoogleJsonClentFeature and OpenCensusFeature after relocation ([#793](#793)) ([2880112](2880112))
* **java:** remove Netty Native Image configuration after relocation to gax ([#771](#771)) ([9ba04f9](9ba04f9))
* **java:** remove protobuf Native Image configuration ([#784](#784)) ([0bc8549](0bc8549))
* remove native-image.properties settings  after relocation ([#794](#794)) ([e24bfdd](e24bfdd))
* remove resource-config after relocation ([#795](#795)) ([87e2973](87e2973))
* remove substitutions after relocation to gax ([#789](#789)) ([29291e9](29291e9))


### Bug Fixes

* **java:** register test class for reflection to fix native image test ([#766](#766)) ([6fe52c3](6fe52c3))


### Dependencies

* revert protobuf to 3.19 and common-protos 2.8.3 ([#798](#798)) ([0f36a84](0f36a84))
* update dependency com.google.api-client:google-api-client-bom to v1.34.0 ([#800](#800)) ([8430aee](8430aee))
* update dependency com.google.api:gax-bom to v2.16.0 ([#785](#785)) ([fd435b0](fd435b0))
* update dependency com.google.api.grpc:proto-google-common-protos to v2.8.1 ([#792](#792)) ([4d201ac](4d201ac))
* update dependency com.google.api.grpc:proto-google-common-protos to v2.8.2 ([#796](#796)) ([dc28a0f](dc28a0f))
* update dependency com.google.api.grpc:proto-google-iam-v1 to v1.3.0 ([#783](#783)) ([4ed5ba4](4ed5ba4))
* update dependency com.google.api.grpc:proto-google-iam-v1 to v1.3.1 ([#799](#799)) ([fce5315](fce5315))
* update dependency com.google.errorprone:error_prone_annotations to v2.12.1 ([#788](#788)) ([4e71f68](4e71f68))
* update dependency com.google.http-client:google-http-client-bom to v1.41.6 ([#791](#791)) ([fe006c6](fe006c6))
* update dependency com.google.http-client:google-http-client-bom to v1.41.7 ([#797](#797)) ([570f8d5](570f8d5))
* update dependency com.google.protobuf:protobuf-bom to v3.20.0 ([#787](#787)) ([19202bc](19202bc))
* update dependency io.grpc:grpc-bom to v1.45.1 ([#780](#780)) ([6e3bf35](6e3bf35))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
suztomo pushed a commit to googleapis/google-cloud-java that referenced this pull request Feb 1, 2023
@release-please
chore(main): release 2.6.0 (#786)
473b790
🤖 I have created a release *beep* *boop*
---


## [2.6.0](googleapis/java-core@v2.5.11...v2.6.0) (2022-04-14)


### Features

* **java:** remove GoogleJsonClentFeature and OpenCensusFeature after relocation ([#793](googleapis/java-core#793)) ([cafd489](googleapis/java-core@cafd489))
* **java:** remove Netty Native Image configuration after relocation to gax ([#771](googleapis/java-core#771)) ([9cc7dba](googleapis/java-core@9cc7dba))
* **java:** remove protobuf Native Image configuration ([#784](googleapis/java-core#784)) ([7a8df66](googleapis/java-core@7a8df66))
* remove native-image.properties settings  after relocation ([#794](googleapis/java-core#794)) ([219a519](googleapis/java-core@219a519))
* remove resource-config after relocation ([#795](googleapis/java-core#795)) ([8ed3110](googleapis/java-core@8ed3110))
* remove substitutions after relocation to gax ([#789](googleapis/java-core#789)) ([85280b1](googleapis/java-core@85280b1))


### Bug Fixes

* **java:** register test class for reflection to fix native image test ([#766](googleapis/java-core#766)) ([fa07125](googleapis/java-core@fa07125))


### Dependencies

* revert protobuf to 3.19 and common-protos 2.8.3 ([#798](googleapis/java-core#798)) ([27ca70c](googleapis/java-core@27ca70c))
* update dependency com.google.api-client:google-api-client-bom to v1.34.0 ([#800](googleapis/java-core#800)) ([3abc47d](googleapis/java-core@3abc47d))
* update dependency com.google.api:gax-bom to v2.16.0 ([#785](googleapis/java-core#785)) ([bd33a76](googleapis/java-core@bd33a76))
* update dependency com.google.api.grpc:proto-google-common-protos to v2.8.1 ([#792](googleapis/java-core#792)) ([3f85e62](googleapis/java-core@3f85e62))
* update dependency com.google.api.grpc:proto-google-common-protos to v2.8.2 ([#796](googleapis/java-core#796)) ([d6ea18e](googleapis/java-core@d6ea18e))
* update dependency com.google.api.grpc:proto-google-iam-v1 to v1.3.0 ([#783](googleapis/java-core#783)) ([48594f3](googleapis/java-core@48594f3))
* update dependency com.google.api.grpc:proto-google-iam-v1 to v1.3.1 ([#799](googleapis/java-core#799)) ([9fe7d35](googleapis/java-core@9fe7d35))
* update dependency com.google.errorprone:error_prone_annotations to v2.12.1 ([#788](googleapis/java-core#788)) ([cfdabb4](googleapis/java-core@cfdabb4))
* update dependency com.google.http-client:google-http-client-bom to v1.41.6 ([#791](googleapis/java-core#791)) ([d9ff405](googleapis/java-core@d9ff405))
* update dependency com.google.http-client:google-http-client-bom to v1.41.7 ([#797](googleapis/java-core#797)) ([dfc3c57](googleapis/java-core@dfc3c57))
* update dependency com.google.protobuf:protobuf-bom to v3.20.0 ([#787](googleapis/java-core#787)) ([51f59fc](googleapis/java-core@51f59fc))
* update dependency io.grpc:grpc-bom to v1.45.1 ([#780](googleapis/java-core#780)) ([cd8a078](googleapis/java-core@cd8a078))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@Neenu1995 Neenu1995 Awaiting requested review from Neenu1995
@meltsufin meltsufin Awaiting requested review from meltsufin
1 more reviewer
@suztomo suztomo suztomo approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@mpeddada1 @suztomo @yoshi-kokoro
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.