menu

Elide

Elide is a java library built to make it easy to expose JPA beans as either a JSON API or a GraphQL webservice

Channels
Team

Strange error occurred in Elide 5 but does not happen in Elide 4

July 6, 2020 at 5:29pm

Strange error occurred in Elide 5 but does not happen in Elide 4

July 6, 2020 at 5:29pm
I have Report entity which has one-to-one relationship shared primary key (aka MapsId) with Change entity.
When creating a Report instance, I also create a Change inside the Report life cycle hook with operation CREATE. That implementation works with Elide 4 but not with Elide 5.
Below is the stack-trace. I am using Elide 5.0.0 - pr13.
Could you please advise?
07-07-2020 00:05:57.107 [task-8] DEBUG com.abc.hook.report.CreationHook.execute - report errata created with id 1
0:0:0:0:0:0:0:1 - 0908592998 [07/Jul/2020:00:05:57 +0700] "POST /api/v1/report HTTP/1.1" 201 1554
07-07-2020 00:05:57.303 [task-1] ERROR com.yahoo.elide.Elide.handleRequest - Error or exception uncaught by Elide
java.lang.UnsupportedOperationException: class com.yahoo.elide.parsers.state.CollectionTerminalState
at com.yahoo.elide.parsers.state.BaseState.handlePatch(BaseState.java:141)
at com.yahoo.elide.parsers.state.StateContext.handlePatch(StateContext.java:115)
at com.yahoo.elide.parsers.PatchVisitor.visitQuery(PatchVisitor.java:33)
at com.yahoo.elide.parsers.PatchVisitor.visitQuery(PatchVisitor.java:20)
at com.yahoo.elide.generated.parsers.CoreParser$QueryContext.accept(CoreParser.java:568)
at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:46)
at com.yahoo.elide.generated.parsers.CoreBaseVisitor.visitStart(CoreBaseVisitor.java:20)
at com.yahoo.elide.parsers.BaseVisitor.visitStart(BaseVisitor.java:49)
at com.yahoo.elide.parsers.BaseVisitor.visitStart(BaseVisitor.java:35)
at com.yahoo.elide.generated.parsers.CoreParser$StartContext.accept(CoreParser.java:117)
at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
at com.yahoo.elide.Elide.visit(Elide.java:264)
at com.yahoo.elide.Elide.lambda$patch$4(Elide.java:233)
at com.yahoo.elide.Elide.handleRequest(Elide.java:288)
at com.yahoo.elide.Elide.patch(Elide.java:237)
at com.yahoo.elide.spring.controllers.JsonApiController$3.call(JsonApiController.java:109)
at com.yahoo.elide.spring.controllers.JsonApiController$3.call(JsonApiController.java:105)
at org.springframework.web.context.request.async.WebAsyncManager.lambda$startCallableProcessing$4(WebAsyncManager.java:337)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

July 7, 2020 at 1:25am
That looks like a bug of some kind, but I think I'll need a bit more context to investigate. Can you file an issue with the API request and the models you used?
  • reply
  • like
Just re-produced and filed an issue for this: https://github.com/yahoo/elide/issues/1420
  • reply
  • like
Because this issue `1420 occurs, hence follow-up request to Elide throws above error.
  • reply
  • like