eclipse-emfcloud / ecore-glsp

ecore-glsp
Other
32 stars 25 forks source link

Error when creating any node #115

Closed JonasHelming closed 2 years ago

JonasHelming commented 2 years ago

When creating any node in any example diagram, I get the error below and nothing happens. Strangly, it worked two days ago for me and I did not even rebuild or pull anything:

root INFO GLSPServerBackendContribution: 36673 [OkHttp http://localhost:8081/...] ERROR ModelServerClient - Could not parse JSON com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'Internal': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false') at [Source: (String)"Internal server error"; line: 1, column: 9] at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:2337) at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:720) at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._reportInvalidToken(ReaderBasedJsonParser.java:2903) at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._reportInvalidToken(ReaderBasedJsonParser.java:2881) at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._matchToken(ReaderBasedJsonParser.java:2662) at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._handleOddValue(ReaderBasedJsonParser.java:1933) at com.fasterxml.jackson.core.json.ReaderBasedJsonParser.nextToken(ReaderBasedJsonParser.java:781) at com.fasterxml.jackson.databind.ObjectMapper._readTreeAndClose(ObjectMapper.java:4622) at com.fasterxml.jackson.databind.ObjectMapper.readTree(ObjectMapper.java:3042) at org.eclipse.emfcloud.modelserver.jsonschema.Json.parse(Json.java:34) at org.eclipse.emfcloud.modelserver.client.ModelServerClient.parseJsonField(ModelServerClient.java:718) at org.eclipse.emfcloud.modelserver.client.ModelServerClient.lambda$28(ModelServerClient.java:713) at java.base/java.util.function.Function.lambda$andThen$1(Function.java:88) at java.base/java.util.function.Function.lambda$andThen$1(Function.java:88) at java.base/java.util.function.Function.lambda$andThen$1(Function.java:88) at org.eclipse.emfcloud.modelserver.client.Response.body(Response.java:39) at org.eclipse.emfcloud.ecore.glsp.model.EcoreModelServerAccess.lambda$8(EcoreModelServerAccess.java:751) at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:642) at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506) at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2073) at org.eclipse.emfcloud.modelserver.client.ModelServerClient$2.onResponse(ModelServerClient.java:705) at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829)

root INFO GLSPServerBackendContribution: 36674 [DefaultActionDispatcher 1] ERROR org.eclipse.glsp.server.jsonrpc.DefaultGLSPServer - [ERROR] Could not process message:ActionMessage [action=createNode, clientId=ecorediagram:file:///home/jonas/tmp/ecore-glsp/client/workspace/empty/model/empty.ecore] org.eclipse.glsp.server.protocol.GLSPServerException: Could not execute create operation on eClassifier: NewEClass0 at org.eclipse.emfcloud.ecore.glsp.operationhandler.CreateClassifierNodeOperationHandler.executeOperation(CreateClassifierNodeOperationHandler.java:73) at org.eclipse.emfcloud.ecore.glsp.operationhandler.CreateClassifierNodeOperationHandler.executeOperation(CreateClassifierNodeOperationHandler.java:1) at org.eclipse.emfcloud.ecore.glsp.operationhandler.ModelServerAwareBasicCreateOperationHandler.executeOperation(ModelServerAwareBasicCreateOperationHandler.java:53) at org.eclipse.emfcloud.ecore.glsp.operationhandler.ModelServerAwareBasicCreateOperationHandler.executeOperation(ModelServerAwareBasicCreateOperationHandler.java:1) at org.eclipse.glsp.server.operations.BasicOperationHandler.execute(BasicOperationHandler.java:41) at org.eclipse.emfcloud.ecore.glsp.handler.EcoreOperationActionHandler.executeHandler(EcoreOperationActionHandler.java:40) at org.eclipse.emfcloud.ecore.glsp.handler.EcoreOperationActionHandler.executeAction(EcoreOperationActionHandler.java:32) at org.eclipse.glsp.server.operations.OperationActionHandler.executeAction(OperationActionHandler.java:1) at org.eclipse.glsp.server.actions.BasicActionHandler.execute(BasicActionHandler.java:45) at org.eclipse.glsp.server.internal.action.DefaultActionDispatcher.runAction(DefaultActionDispatcher.java:210) at org.eclipse.glsp.server.internal.action.DefaultActionDispatcher.handleMessage(DefaultActionDispatcher.java:180) at org.eclipse.glsp.server.internal.action.DefaultActionDispatcher.handleNextMessage(DefaultActionDispatcher.java:165) at org.eclipse.glsp.server.internal.action.DefaultActionDispatcher.runThread(DefaultActionDispatcher.java:152) at java.base/java.lang.Thread.run(Thread.java:829)

CamilleLetavernier commented 2 years ago

I think it might be related to thread issues, which have existed for a long time now (I can also reproduce it from time to time; quite frequently). The source issues have been fixed on the ModelServer and ModelServer/GLSP integration a few weeks ago, but the fixes aren't integrated in Ecore GLSP. The problem is that GLSP APIs have been refactored in the meantime, and we can't integrate the stability fixes without updating the entire application.