Getting InaccessibleObjectException When Editing Label #702
-
Hi, I have a theia client, java server and an EMF model (My code is based on this example project: https://github.com/eclipse-glsp/glsp-examples/tree/master/project-templates/java-emf-theia). On my label, I have enabled the On the server, I have a class extending When I edit a label, I get this error as soon as I start typing (In fact, I get this error on every letter that I type):
The error gets thrown after the ValidationStatus gets returned. Even after all the exceptions, when I press enter (or even when I just drop focus), after about a second of delay, the apply edit operation gets invoked and the object gets renamed. Any help on what is going on here and how to resolve this error would be greatly appreciated. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
Hi @Ginxss, That is a very curious error since it does not seem to be caused by GLSP directly but within Gson while trying to serialize an empty list that should be sent to the client as part of an action. It might depend on the JDK that you are using as it seems that there is/was a known issue for Gson which is discussed here: google/gson#1875. I'll double check whether this is something we also face in our examples and whether a Gson upgrade will fix that but maybe you can also do a test locally to see if a newer Gson version fixes the issue for you as well. If that does not work we probably need to create a custom type adapter for this specific case. Just FYI, before the 1.0 release we were using Gson 2.8.2 and now we are using Gson 2.8.9. Regarding the edit label validation: Yes, at the moment it is expected that we validate the text on every key stroke as we do not know the validation logic so every character might be important. The base class that is installing this behavior is EditLabelUI and specifically this event registration: |
Beta Was this translation helpful? Give feedback.
Hi @Ginxss,
That is a very curious error since it does not seem to be caused by GLSP directly but within Gson while trying to serialize an empty list that should be sent to the client as part of an action. It might depend on the JDK that you are using as it seems that there is/was a known issue for Gson which is discussed here: google/gson#1875. I'll double check whether this is something we also face in our examples and whether a Gson upgrade will fix that but maybe you can also do a test locally to see if a newer Gson version fixes the issue for you as well. If that does not work we probably need to create a custom type adapter for this specific case. Just FYI, before the 1.0 release we…