Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Couldn't resolve reference to JvmIdentifiableElement '=='
Couldn't resolve reference to JvmIdentifiableElement '==' [message #1118458] Fri, 27 September 2013 12:32 Go to next message
Michael Vorburger is currently offline Michael VorburgerFriend
Messages: 103
Registered: July 2009
Senior Member
Hello gurus, I'm hitting a Couldn't resolve reference to JvmIdentifiableElement '=='..

Any tips where exactly this (validation) error is created and how to start debugging this?

FYI We're hitting this while trying to move from Xtext 2.3.1 (all working) to 2.4.2 (currently broken) in https://github.com/vorburger/eLang/commits/v2.2_xtext-v2.4.2 .. the ch.vorburger.el.engine.tests.BasicExpressionGeneratorTest.testNotNull() illustrates this problem (if anybody does try; ignore other test failures related to problems in Interpreter Tests which broke as well following the update, they're less critical).

I've seen a number of posts re. this all saying "missing xbase.lib!", but that doesn't seem to be it (xbase.lib IS on ch.vorburger.el)... must be something more... interesting.

Any help much appreciated.
Re: Couldn't resolve reference to JvmIdentifiableElement '==' [message #1118559 is a reply to message #1118458] Fri, 27 September 2013 14:31 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

this one is the problem (dont know why)

	@Override
	public Class<? extends org.eclipse.xtext.resource.XtextResource> bindXtextResource() {
		// NOT return org.eclipse.xtext.xbase.resource.BatchLinkableResource.class;
		// but let's use the classic older one (which I understand..), to debug more easily:
		return DerivedStateAwareResource.class;
	}


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Couldn't resolve reference to JvmIdentifiableElement '==' [message #1121430 is a reply to message #1118458] Mon, 30 September 2013 16:07 Go to previous messageGo to next message
Michael Vorburger is currently offline Michael VorburgerFriend
Messages: 103
Registered: July 2009
Senior Member
Christian, thank you for visibly having taking the time to look into the (diff) code!

Unfortunately it doesn't seem to be that easy.. even using XbaseResource instead of DerivedStateAwareResource still causes BasicExpressionGeneratorTest to fail. Using the original BatchLinkableResource doesn't cause a validation error anymore, but instead a java.lang.NullPointerException at org.eclipse.xtext.xbase.compiler.AbstractXbaseCompiler.getFavoriteVariableName(AbstractXbaseCompiler.java:426) because ((XAbstractFeatureCall) ex).getFeature() is still an unresolved proxy - the same root cause most likely, just appearing differently.

I guess I'll have to dig more into this... side-by-side step before/after 2.3.1/2.4.2 debugging, what fun.
Re: Couldn't resolve reference to JvmIdentifiableElement '==' [message #1122677 is a reply to message #1121430] Tue, 01 October 2013 20:44 Go to previous message
Michael Vorburger is currently offline Michael VorburgerFriend
Messages: 103
Registered: July 2009
Senior Member
Managed to figure this out; just to wrap this up FTR, in case anybody hits something like this (no response needed, unless some you have some further insight so that I can learn something):

It seemed to have had something to do with org.eclipse.xtext.resource.XtextResource.RESOLVE_ALL=true when loading the (synthetic) resource.. I don't fully understand it, but it's reproducible: If you checkout commit fd5eed335ab51f0e3889815c7b426f1b005cc5f7 of https://github.com/vorburger/eLang, the BasicExpressionGeneratorTest works. If you now go into the ExpressionFactory and in line 109 pass resourceSet.getLoadOptions() instead of null, then testNotNull fails with Couldn't resolve reference to JvmIdentifiableElement '=='.

I've tried to provide a reproducible standalone example test case of this in https://github.com/vorburger/xtext-sandbox/tree/f63a74c328afb3a56ffd45deb07b0d5012c051d1/XbaseOptionResolveAllConfusion, but there what I thought was basically the same does work... so it must be the side effect of something else.

I learnt that I also had to write a *JvmModelInferrer, even though previously was not needed and I had assumed for the UC in Q here that was not needed.

[Updated on: Tue, 01 October 2013 20:44]

Report message to a moderator

Previous Topic:Model to Text error: resolution of uriFragment 'xtextLink ...
Next Topic:Problem with the generation of the artifact
Goto Forum:
  


Current Time: Fri Apr 19 13:23:16 GMT 2024

Powered by FUDForum. Page generated in 0.02647 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top