Open k-rtik opened 4 years ago
This error occurs even without dev mode. For example:
mvn clean package liberty:run
mvn package
(or skip this step if your IDE auto-compiles the Java file after step 4)FYI, @andymc12.
Confirmed with @AustinSeto that this problem still exists in Liberty 20.0.0.11 (I had hoped that the SmallRye GraphQL upgrades might have resolved this issue).
I recently tested this with the GM Candidate build for Liberty 20.0.0.12 - the build 2020-11-11_0736 - after hearing some changes were made.
I seem to get the same error. I started an application (the application in https://github.com/OpenLiberty/draft-guide-graphql-intro/tree/redesign-2) in dev mode, and modified it by adding a System.out.println()
call which should not break the application. However, when I made a request through GraphiQL I still got the following error. This error appeared even after I reverted my change.
{
"errors": [
{
"message": "Server Error",
"locations": [
{
"line": 2,
"column": 12
}
],
"path": [
"system",
"username"
],
"extensions": {
"exception": "java.lang.IllegalArgumentException",
"classification": "DataFetchingException",
"code": "illegal-argument"
}
},
{
"message": "Server Error",
"locations": [
{
"line": 2,
"column": 21
}
],
"path": [
"system",
"note"
],
"extensions": {
"exception": "java.lang.IllegalArgumentException",
"classification": "DataFetchingException",
"code": "illegal-argument"
}
}
],
"data": null
}
@AustinSeto, is what you reported reproducible without dev mode?
@andymc12, not sure if we have an outlook for resolving this issue? This is blocking our work on the MP GraphQL guide.
Cc @gkwan-ibm
@yeekangc Just tested with LMP 3.3.3 to see if any changes in it affected this issue. The issue still occurs in dev mode. I started the app in dev mode, it worked fine, then I added a print statement and dev mode recompiled and then I got the same error as previously.
I try the same with mvn liberty:run
. I start the app, see it works fine. I close it, then make my change, then restart it using mvn liberty:run
and I do not encounter the error.
The error is not reproducible without dev mode.
@ericglau, any thoughts on the latest that Austin reported?
I still see the error when using the steps in my previous comment with Liberty 20.0.0.12 and liberty:run
(note, do not stop the server after making a change to a Java file. Just compile while Liberty is running, as per that comment).
Logs are attached: logs.zip
Note that the exception in the FFDC log occurred only on first startup. Also there are warnings with W Could not load service class com.ibm.ws.io.smallrye.graphql.component.GraphQLExtension
both on startup and after updating the app.
Currently writing a draft of the MP GraphQL guide that does not require dev mode as a work around, but we would prefer to publish a version of the guide that does use dev mode.
@andymc12 are there any updates regarding this issue?
Another case not work
[INFO] [WARNING ] Class [io.openliberty.guides.graphql.models.SystemInfo] in not indexed in Jandex. Can not scan Object Type, defaulting to String Scalar
If graphql service not run by loose app (i.e., the common jar packaged into the war), it works fine and no warning.
Describe the bug When I update a service class annotated with
@GraphQLApi
, all queries/mutations (including ones that are unaffected by the change and work before making the update in dev mode) return the following:Even changes like updating a log message cause this error.
The error only happens when a query is ran before updating the server, then running a query after updating the server.
No stack trace present in
$WLP_OUTPUT_DIR/messages.log
/server console output.Steps to Reproduce
Case 1.
Case 2.
Expected behavior
Case 1.
Case 2.
Diagnostic information: