Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Example is not working #86

Open
haiminh87 opened this issue Aug 22, 2019 · 10 comments
Open

Example is not working #86

haiminh87 opened this issue Aug 22, 2019 · 10 comments

Comments

@haiminh87
Copy link

I cloned master and follow the instruction here https://rejoiner.io/docs/examples.html
But got this error

{
  "errors": [
    {
      "message": "Exception while fetching data (/sayHello) : java.lang.IllegalArgumentException: argument type mismatch",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "sayHello"
      ]
    }
  ],
  "data": {
    "sayHello": null
  }
}

@siderakis
Copy link
Member

I’ve seen something similar before, can you rerun the installDist command then relaunch the two processes.

@siderakis
Copy link
Member

I just tested from a clean install and it seems to be working.

@timburks
Copy link

timburks commented Oct 7, 2019

I'm also experiencing this with fresh builds on two platforms (MacOS and Ubuntu). My Java versions are 1.8.0_151 (MacOS) and 1.8.0_222 (Ubuntu).

@jhaals
Copy link

jhaals commented Oct 22, 2019

I'm currently running into the same issue when ./gradlew openIdea, starting both servers for helloworld and executing the graphql query

@WillemHoman
Copy link

WillemHoman commented Dec 8, 2019

yup, me too on jdk1.8.0_152, 9+181 osx all examples

@DianaSuvorova
Copy link
Contributor

Same here. java version "1.8.0_152" macOS 10.14.6 with gradle example

@DianaSuvorova
Copy link
Contributor

Some more details on the issue. The error happens on this line

return method.invoke(module, methodParameterValues);

if I try to call the sayHello method directly

((HelloWorldSchemaModule) module).sayHello(methodParameterValues[0], methodParameterValues[1])

I get

Type mismatch Can't assign com.google.inject.spi.ProviderLookup$1 to io.grpc.examples.helloworld.GreeterGrpc$GreeterBlockingStub

Any help would be appreciated.

@siderakis
Copy link
Member

I switched the version of rejoiner in the gradle examples to 0.4.0-SNAPSHOT which seems to have fixed the issue.

@siderakis
Copy link
Member

In general these examples need to be updated. I'd like to move them to use maven like the rest of the code.

@DianaSuvorova
Copy link
Contributor

@siderakis thanks a bunch. This fixed the issue. The example is working for me now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants