XtextSerializationException for cross references to existing objects [message #1810056] |
Tue, 30 July 2019 03:35  |
Eclipse User |
|
|
|
Hi, a customer has designed an Xtext based DSL for a system I now have to maintain. A colleague wrote some code which generates data in that DSL, but also reads in existing files and amends them.
The problem I'm now facing is that when I try to save an object which contains a cross reference to an already existing object from a different resource, I get org.eclipse.xtext.parsetree.reconstr.XtextSerializationException:
Could not serialize cross reference from
newObject.reference to existingObject
at
o.e.x.parsetree.reconstr.impl.AbstractParseTreeConstructor$AssignmentToken.serializeInternal(AbstractParseTreeConstructor.java:255)
I already checked that the referenced object is loaded successfully and also that it is known by the same ResourceProvider I use to save the new object.
What causes the Exception to be thrown is that the Node of the Token that is about to be written is null, so the Node can not be serialized.
Unfortunately I barely know anything about Xtext, so I don't really know if what I wrote even makes much sense. I also don't know how to find out where the Node for the Token should be set, or if the Node being null is a consequential error of something else I'm not aware of.
I'd be really grateful for any pointers on how to find the cause of that Exception.
The application uses Xtext 2.8.0.v201503090534, if that is important. I know it's old, but so is the whole application and we don't get the budget to update all the dependencies.
|
|
|
|
Powered by
FUDForum. Page generated in 0.25967 seconds