You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But when I try to add this element into my model the server part throws the following exception:
WARNUNG: Failed to send notification message.
java.lang.NullPointerException
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDerivedStructuralFeatureID(BasicEObjectImpl.java:1536)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eIsSet(BasicEObjectImpl.java:1277)
at org.eclipse.glsp.graph.gson.GModelElementTypeAdapter.isSet(GModelElementTypeAdapter.java:185)
at org.eclipse.glsp.graph.gson.GModelElementTypeAdapter.writeProperties(GModelElementTypeAdapter.java:171)
at org.eclipse.glsp.graph.gson.GModelElementTypeAdapter.write(GModelElementTypeAdapter.java:111)
at org.eclipse.glsp.graph.gson.GModelElementTypeAdapter.write(GModelElementTypeAdapter.java:44)
at org.eclipse.lsp4j.jsonrpc.json.adapters.CollectionTypeAdapter.write(CollectionTypeAdapter.java:139)
at org.eclipse.lsp4j.jsonrpc.json.adapters.CollectionTypeAdapter.write(CollectionTypeAdapter.java:40)
at com.google.gson.Gson.toJson(Gson.java:669)
at org.eclipse.glsp.graph.gson.PropertyBasedTypeAdapter.writeProperty(PropertyBasedTypeAdapter.java:221)
at org.eclipse.glsp.graph.gson.GModelElementTypeAdapter.writeProperties(GModelElementTypeAdapter.java:174)
at org.eclipse.glsp.graph.gson.GModelElementTypeAdapter.writeProperties(GModelElementTypeAdapter.java:180)
at org.eclipse.glsp.graph.gson.GModelElementTypeAdapter.write(GModelElementTypeAdapter.java:111)
at org.eclipse.glsp.graph.gson.GModelElementTypeAdapter.write(GModelElementTypeAdapter.java:44)
at com.google.gson.Gson.toJson(Gson.java:669)
at org.eclipse.glsp.graph.gson.PropertyBasedTypeAdapter.writeProperty(PropertyBasedTypeAdapter.java:221)
at org.eclipse.glsp.graph.gson.PropertyBasedTypeAdapter.writeProperties(PropertyBasedTypeAdapter.java:202)
at org.eclipse.glsp.graph.gson.PropertyBasedTypeAdapter.write(PropertyBasedTypeAdapter.java:185)
at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:69)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.write(ReflectiveTypeAdapterFactory.java:125)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.write(ReflectiveTypeAdapterFactory.java:243)
at com.google.gson.Gson.toJson(Gson.java:669)
at org.eclipse.lsp4j.jsonrpc.json.adapters.MessageTypeAdapter.write(MessageTypeAdapter.java:434)
at org.eclipse.lsp4j.jsonrpc.json.adapters.MessageTypeAdapter.write(MessageTypeAdapter.java:55)
at com.google.gson.Gson.toJson(Gson.java:669)
at com.google.gson.Gson.toJson(Gson.java:648)
at org.eclipse.lsp4j.jsonrpc.json.MessageJsonHandler.serialize(MessageJsonHandler.java:145)
at org.eclipse.lsp4j.jsonrpc.json.MessageJsonHandler.serialize(MessageJsonHandler.java:140)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageConsumer.consume(StreamMessageConsumer.java:59)
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.notify(RemoteEndpoint.java:126)
at org.eclipse.lsp4j.jsonrpc.services.EndpointProxy.invoke(EndpointProxy.java:88)
at com.sun.proxy.$Proxy25.process(Unknown Source)
at org.eclipse.glsp.server.actions.ClientActionHandler.send(ClientActionHandler.java:58)
at org.eclipse.glsp.server.actions.ClientActionHandler.execute(ClientActionHandler.java:52)
at org.eclipse.glsp.server.internal.actions.DefaultActionDispatcher.runAction(DefaultActionDispatcher.java:191)
at org.eclipse.glsp.server.internal.actions.DefaultActionDispatcher.handleAction(DefaultActionDispatcher.java:170)
at org.eclipse.glsp.server.internal.actions.DefaultActionDispatcher.dispatch(DefaultActionDispatcher.java:100)
at org.eclipse.glsp.server.actions.ActionDispatcher.lambda$dispatchAll$0(ActionDispatcher.java:47)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
at org.eclipse.glsp.server.actions.ActionDispatcher.dispatchAll(ActionDispatcher.java:47)
at org.eclipse.glsp.server.internal.actions.DefaultActionDispatcher.runAction(DefaultActionDispatcher.java:194)
at org.eclipse.glsp.server.internal.actions.DefaultActionDispatcher.handleAction(DefaultActionDispatcher.java:170)
at org.eclipse.glsp.server.internal.actions.DefaultActionDispatcher.handleNextAction(DefaultActionDispatcher.java:157)
at org.eclipse.glsp.server.internal.actions.DefaultActionDispatcher.runThread(DefaultActionDispatcher.java:144)
at java.base/java.lang.Thread.run(Thread.java:829)
I am not sure but maybe this exception may be raised from com.google.gson.Gson
After a lot of research I found out, that the name of my ecore:EReference 'default' is the problem. If I rename the reference to something like 'defaultflow' everything works again fine.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a Strange NullPointerException in my project caused by a ecore element definition with the name 'default'
The generation of my ecore model classes is all fine and also my GLSP Server part with the AbstractGNodeBuilder has no problem.
But when I try to add this element into my model the server part throws the following exception:
I am not sure but maybe this exception may be raised from com.google.gson.Gson
After a lot of research I found out, that the name of my ecore:EReference 'default' is the problem. If I rename the reference to something like 'defaultflow' everything works again fine.
Beta Was this translation helpful? Give feedback.
All reactions