Skip to content

Error with gcloud-java-datastore #1284

Closed

Description

@kpysniak

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?

Activity

  1. mziccard commented on Sep 26, 2016

    @mziccard
    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.

  2. kpysniak commented on Sep 26, 2016

    @kpysniak
    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?

  3. kpysniak commented on Sep 26, 2016

    @kpysniak
    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?

  4. mziccard commented on Sep 26, 2016

    @mziccard
    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?

  5. mziccard commented on Oct 4, 2016

    @mziccard
    Contributor

    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.

  6. 4 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Sponsor
    SponsoredKunjungi sekarang
    Promo