Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with gcloud-java-datastore #1284

Closed
kpysniak opened this issue Sep 26, 2016 · 5 comments
Closed

Error with gcloud-java-datastore #1284

kpysniak opened this issue Sep 26, 2016 · 5 comments
Assignees

Comments

@kpysniak
Copy link

Hey all,

I am facing some issues with the google datastore sdk. It looks like some incompatibilities with packaged proto classes. The error I am seeing is:

java.lang.VerifyError: Bad return type Exception Details: Location: com/google/cloud/datastore/PathElement.toPb()Lcom/google/protobuf/GeneratedMessage; @4: areturn Reason: Type 'com/google/datastore/v1/Key$PathElement' (current frame, stack[0]) is not assignable to 'com/google/protobuf/GeneratedMessage' (from method signature) Current Frame: bci: @4 flags: { } locals: { 'com/google/cloud/datastore/PathElement' } stack: { 'com/google/datastore/v1/Key$PathElement' }

Has anyone seen that issue?

@mziccard
Copy link
Contributor

Hi @kpysniak, thanks for the report.

This seems like a duplicate of #1239. Are you using protobuf-java >= 3.0.0? The cause of this error is that protobuf-java 3.0.0 introduced a breaking change with respect to previous betas we still depend on protobuf-java 3.0.0-beta3. We are working on a fix (e.g. updating to 3.0.0 in our code and all our dependencies) and hope to release a new version of google-cloud-java soon.

@kpysniak
Copy link
Author

At the moment, I tried including only this:
libraryDependencies += "com.google.cloud" % "google-cloud" % "0.3.0"

but that didn't work. I also tried adding:
libraryDependencies += "com.google.protobuf" % "protobuf-java" % "3.0.0-beta-3"

but it didn't help. Would you suggest any next steps?

@kpysniak
Copy link
Author

When I tried with protobuf-java 3.0.0-beta-3, I am getting another error:

Caused by: java.lang.IllegalArgumentException: can't parse argument number:
at java.text.MessageFormat.makeFormat(MessageFormat.java:1429) ~[na:1.8.0_25]
at java.text.MessageFormat.applyPattern(MessageFormat.java:479) ~[na:1.8.0_25]
at java.text.MessageFormat.(MessageFormat.java:362) ~[na:1.8.0_25]
at java.text.MessageFormat.format(MessageFormat.java:840) ~[na:1.8.0_25]
at org.slf4j.bridge.SLF4JBridgeHandler.getMessageI18N(SLF4JBridgeHandler.java:264) ~[jul-to-slf4j-1.7.12.jar:1.7.12]
at org.slf4j.bridge.SLF4JBridgeHandler.callLocationAwareLogger(SLF4JBridgeHandler.java:220) ~[jul-to-slf4j-1.7.12.jar:1.7.12]
at org.slf4j.bridge.SLF4JBridgeHandler.publish(SLF4JBridgeHandler.java:297) ~[jul-to-slf4j-1.7.12.jar:1.7.12]
at java.util.logging.Logger.log(Logger.java:738) ~[na:1.8.0_25]
at java.util.logging.Logger.doLog(Logger.java:765) ~[na:1.8.0_25]
at java.util.logging.Logger.log(Logger.java:830) ~[na:1.8.0_25]
at com.google.protobuf.CodedOutputStream.getUnsafe(CodedOutputStream.java:2632) ~[protobuf-java-3.0.0-beta-3.jar:na]
at com.google.protobuf.CodedOutputStream.(CodedOutputStream.java:62) ~[protobuf-java-3.0.0-beta-3.jar:na]
... 56 common frames omitted
Caused by: java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[na:1.8.0_25]
at java.lang.Integer.parseInt(Integer.java:592) ~[na:1.8.0_25]
at java.lang.Integer.parseInt(Integer.java:615) ~[na:1.8.0_25]
at java.text.MessageFormat.makeFormat(MessageFormat.java:1427) ~[na:1.8.0_25]
... 67 common frames omitted

Could they be related?

@mziccard
Copy link
Contributor

I am confused, the errors are unrelated and I don't see why you should include protobuf-java 3.0.0-beta-3 since google-cloud-java already has it as a dependency. Can you share the full list of dependencies that you are using when the error in your first post happens?

@mziccard
Copy link
Contributor

mziccard commented Oct 4, 2016

Issue #1239 was fixed in google-cloud 0.4.0 and this issue is missing information required to identify its cause. Feel free to reopen with more details in case you are still experiencing it with google-cloud 0.4.0.

@mziccard mziccard closed this as completed Oct 4, 2016
github-actions bot pushed a commit to suztomo/google-cloud-java that referenced this issue Jun 29, 2022
github-actions bot pushed a commit that referenced this issue Aug 9, 2022
… announced through MSA. This is the cleanup (#1284)

- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 464897844

Source-Link: googleapis/googleapis@73c7cd8

Source-Link: https://github.com/googleapis/googleapis-gen/commit/ea44929316799e3e9f38656ab155f7b2e928da42
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWE0NDkyOTMxNjc5OWUzZTlmMzg2NTZhYjE1NWY3YjJlOTI4ZGE0MiJ9
github-actions bot pushed a commit to yoshi-code-bot/google-cloud-java that referenced this issue Oct 6, 2022
…3.0 (googleapis#1284)

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.cloud:google-cloud-storage](https://togithub.com/googleapis/java-storage) | `2.12.0` -> `2.13.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-storage/2.13.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-storage/2.13.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-storage/2.13.0/compatibility-slim/2.12.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-storage/2.13.0/confidence-slim/2.12.0)](https://docs.renovatebot.com/merge-confidence/) |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost.

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-automl).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4yMTYuMCIsInVwZGF0ZWRJblZlciI6IjMyLjIxNi4wIn0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants