Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Strange error "Cannot find compatible feature ... in sealed EClass"
Strange error "Cannot find compatible feature ... in sealed EClass" [message #1061195] Thu, 30 May 2013 13:32 Go to next message
Jesper Eskilson is currently offline Jesper Eskilson
Messages: 131
Registered: July 2009
Senior Member
I have a Xtext grammar which looks like this:

grammar mygrammar with 
	com.iar.toolchain.dsl.ITL

import "http://iar.com/projectmodel" // defined using an xcore model
import "http://www.iar.com/toolchain/dsl/ITL" // from ITL.xtext

Project:
    'project' configuration=[Configuration]
;


projectmodel.xcore defines Project like this:

...
import com.iar.toolchain.dsl.itl.Configuration
...
class Project {
    ...
    refers Configuration configuration    
    ...
}


Xtext complains about the configuration cross reference, and says:

Cannot find compatible feature configuration in sealed EClass Project from imported package http://iar.com/projectmodel: The existing reference 'configuration' has an incompatible type 'Configuration'. The expected type is 'Configuration'.


projectmodel.xcore can correctly resolve Configuration, but when attempting to use it from mygrammar.xtext, there seems to be two different Configuration classes which are incompatible.

Any clues as two what is going on?
Re: Strange error "Cannot find compatible feature ... in sealed EClass" [message #1061214 is a reply to message #1061195] Thu, 30 May 2013 14:41 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26050
Registered: July 2009
Senior Member
Jesper,

Are you using the latest RC2 builds? A number of problems relating to
Xcore usage as your model were recently fixed...


On 30/05/2013 3:32 PM, Jesper Eskilson wrote:
> I have a Xtext grammar which looks like this:
>
>
> grammar mygrammar with com.iar.toolchain.dsl.ITL
>
> import "http://iar.com/projectmodel" // defined using an xcore model
> import "http://www.iar.com/toolchain/dsl/ITL" // from ITL.xtext
>
> Project:
> 'project' configuration=[Configuration]
> ;
>
>
> projectmodel.xcore defines Project like this:
>
>
> ..
> import com.iar.toolchain.dsl.itl.Configuration
> ..
> class Project {
> ...
> refers Configuration configuration ...
> }
>
>
> Xtext complains about the configuration cross reference, and says:
>
>
> Cannot find compatible feature configuration in sealed EClass Project
> from imported package http://iar.com/projectmodel: The existing
> reference 'configuration' has an incompatible type 'Configuration'.
> The expected type is 'Configuration'.
>
>
> projectmodel.xcore can correctly resolve Configuration, but when
> attempting to use it from mygrammar.xtext, there seems to be two
> different Configuration classes which are incompatible.
>
> Any clues as two what is going on?
Re: Strange error "Cannot find compatible feature ... in sealed EClass" [message #1061241 is a reply to message #1061214] Thu, 30 May 2013 17:20 Go to previous messageGo to next message
Jesper Eskilson is currently offline Jesper Eskilson
Messages: 131
Registered: July 2009
Senior Member
I tried installing the bleeding edge builds of both Xtend and Xcore, but now the Xcore editor refuses to start, and shows a whole bunch of these exceptions:

...
Caused by: com.google.inject.internal.util.$ComputationException: com.google.inject.internal.util.$ComputationException: java.lang.NoClassDefFoundError: org/eclipse/xtext/xbase/services/XbaseGrammarAccess$StaticQualifierElements
	at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:553)
	at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:419)
	at com.google.inject.internal.util.$CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
	at com.google.inject.internal.FailableCache.get(FailableCache.java:50)
	at com.google.inject.internal.ConstructorInjectorStore.get(ConstructorInjectorStore.java:49)
	at com.google.inject.internal.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:125)
	at com.google.inject.internal.InjectorImpl.initializeJitBinding(InjectorImpl.java:521)
...
Re: Strange error "Cannot find compatible feature ... in sealed EClass" [message #1061294 is a reply to message #1061241] Fri, 31 May 2013 04:45 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26050
Registered: July 2009
Senior Member
Jesper,

By bleeding edge do you mean the RC2 builds or nightly builds. We saw
this too locally, but it was caused by not having the right version of
Xbase installed; I committed changes to Xcore yesterday to make it work
with the changes to Xbase since the beginning of the week...


On 30/05/2013 7:20 PM, Jesper Eskilson wrote:
> I tried installing the bleeding edge builds of both Xtend and Xcore,
> but now the Xcore editor refuses to start, and shows a whole bunch of
> these exceptions:
>
>
> ..
> Caused by: com.google.inject.internal.util.$ComputationException:
> com.google.inject.internal.util.$ComputationException:
> java.lang.NoClassDefFoundError:
> org/eclipse/xtext/xbase/services/XbaseGrammarAccess$StaticQualifierElements
> at
> com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:553)
> at
> com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:419)
> at
> com.google.inject.internal.util.$CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
> at
> com.google.inject.internal.FailableCache.get(FailableCache.java:50)
> at
> com.google.inject.internal.ConstructorInjectorStore.get(ConstructorInjectorStore.java:49)
> at
> com.google.inject.internal.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:125)
> at
> com.google.inject.internal.InjectorImpl.initializeJitBinding(InjectorImpl.java:521)
> ..
>
Re: Strange error "Cannot find compatible feature ... in sealed EClass" [message #1061311 is a reply to message #1061294] Fri, 31 May 2013 07:34 Go to previous messageGo to next message
Jesper Eskilson is currently offline Jesper Eskilson
Messages: 131
Registered: July 2009
Senior Member
I have Xcore 1.1.0.v20130528-0809 together with Xbase/Xtext/Xtend 2.4.2.201305301254. I installed using

http://download.eclipse.org/modeling/emf/emf/updates/nightly/
http://download.eclipse.org/modeling/tmf/xtext/updates/composite/latest/

Re: Strange error "Cannot find compatible feature ... in sealed EClass" [message #1061317 is a reply to message #1061311] Fri, 31 May 2013 08:01 Go to previous messageGo to next message
Jesper Eskilson is currently offline Jesper Eskilson
Messages: 131
Registered: July 2009
Senior Member
I just upgraded to Xcore 1.1.0.v20130529-2030 and Xbase 2.4.2.v201305310201, with the same result.

Do I need to upgrade my target platform as well? (Sorry for maybe asking obvious questions.)
Re: Strange error "Cannot find compatible feature ... in sealed EClass& [message #1061386 is a reply to message #1061317] Fri, 31 May 2013 12:19 Go to previous message
Sebastian Zarnekow is currently offline Sebastian Zarnekow
Messages: 2831
Registered: July 2009
Senior Member
Am 31.05.13 10:01, schrieb Jesper Eskilson:
> I just upgraded to Xcore 1.1.0.v20130529-2030 and Xbase
> 2.4.2.v201305310201, with the same result.
>
> Do I need to upgrade my target platform as well? (Sorry for maybe asking
> obvious questions.)

Hi Jepser,

I'd assume the Xcore build from 201305129 does not contain the changes
that Ed mentioned. Can you try a more recent build?

Regards,
Sebastian
--
Looking for professional support for Xtext, Xtend or Eclipse Modeling?
Go visit: http://xtext.itemis.com
Previous Topic:Defining an external tool for my IDE plug-in
Next Topic:Plans for handling of TypeScript syntax?
Goto Forum:
  


Current Time: Thu Sep 18 11:49:17 GMT 2014

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

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