Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » J2SE-1.7 Problem
J2SE-1.7 Problem [message #874982] Mon, 21 May 2012 22:31 Go to next message
Ștefan Săftescu is currently offline Ștefan SăftescuFriend
Messages: 4
Registered: May 2012
Junior Member
I've just found out about Xtext and I wanted to try it out. However, when I create an example project, I get the following build error (which doesn't seem very informative):

Errors running builder 'Xtext Project Builder' on project 'org.eclipse.xtext.example.fowlerdsl'.
org.eclipse.xtext.naming.QualifiedName.create(Ljava/lang/String;)Lorg/eclipse/xtext/naming/QualifiedName;


Furthermore, I have the following warnings in my project(s):

Build path specifies execution environment J2SE-1.5. There are no JREs installed in the workspace that are strictly compatible with this environment. 	org.eclipse.xtext.example.fowlerdsl

Build path specifies execution environment J2SE-1.5. There are no JREs installed in the workspace that are strictly compatible with this environment. 	org.eclipse.xtext.example.fowlerdsl.ui

Discouraged access: The type IPartialContentAssistParser is not accessible due to restriction on required library /home/stefan/.eclipse/org.eclipse.platform_3.7.0_1543616141/plugins/org.eclipse.xtext.ui.codetemplates.ui_2.3.0.v201205081025.jar	PartialStatemachineContentAssistParser.java	/org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr	line 10

Discouraged access: The type IPartialContentAssistParser is not accessible due to restriction on required library /home/stefan/.eclipse/org.eclipse.platform_3.7.0_1543616141/plugins/org.eclipse.xtext.ui.codetemplates.ui_2.3.0.v201205081025.jar	PartialStatemachineContentAssistParser.java	/org.eclipse.xtext.example.fowlerdsl.ui/src-gen/org/eclipse/xtext/example/fowlerdsl/ui/contentassist/antlr	line 18


I only have OpenJDK7 installed and that seems to be the problem. Could you confirm that is the case and, if so, is there any way I could fix this or should I just install OpenJDK6 or 5?

Edit: Here's a more informative version of the first error, which showed up today:

1    [main] ERROR mf.mwe2.launch.runtime.Mwe2Launcher  - org.eclipse.xtext.naming.QualifiedName.create(Ljava/lang/String;)Lorg/eclipse/xtext/naming/QualifiedName;
java.lang.NoSuchMethodError: org.eclipse.xtext.naming.QualifiedName.create(Ljava/lang/String;)Lorg/eclipse/xtext/naming/QualifiedName;
	at org.eclipse.emf.mwe2.language.scoping.InjectableFeatureLookup.collectFeatures(InjectableFeatureLookup.java:52)
	at org.eclipse.emf.mwe2.language.scoping.InjectableFeatureLookup.collectFeatures(InjectableFeatureLookup.java:41)
	at org.eclipse.emf.mwe2.language.scoping.InjectableFeatureLookup.getInjectableFeatures(InjectableFeatureLookup.java:30)
	at org.eclipse.emf.mwe2.language.scoping.Mwe2ScopeProvider.createComponentFeaturesScope(Mwe2ScopeProvider.java:132)
	at org.eclipse.emf.mwe2.language.scoping.Mwe2ScopeProvider.scope_Assignment_feature(Mwe2ScopeProvider.java:60)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.eclipse.xtext.util.PolymorphicDispatcher.invoke(PolymorphicDispatcher.java:291)
	at org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider.polymorphicFindScopeForReferenceName(AbstractDeclarativeScopeProvider.java:150)
	at org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider.getScope(AbstractDeclarativeScopeProvider.java:98)
	at org.eclipse.xtext.linking.impl.DefaultLinkingService.getScope(DefaultLinkingService.java:59)
	at org.eclipse.xtext.linking.impl.DefaultLinkingService.getLinkedObjects(DefaultLinkingService.java:119)
	at org.eclipse.xtext.linking.lazy.LazyLinkingResource.getEObject(LazyLinkingResource.java:179)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getEObject(ResourceSetImpl.java:223)
	at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java:197)
	at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java:257)
	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eResolveProxy(BasicEObjectImpl.java:1473)
	at org.eclipse.emf.mwe2.language.mwe2.impl.AssignmentImpl.getFeature(AssignmentImpl.java:111)
	at org.eclipse.emf.mwe2.language.mwe2.impl.AssignmentImpl.eGet(AssignmentImpl.java:229)
	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1011)
	at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1003)
	at org.eclipse.emf.ecore.util.EContentsEList$FeatureIteratorImpl.hasNext(EContentsEList.java:403)
	at org.eclipse.emf.ecore.util.EcoreUtil.resolveCrossReferences(EcoreUtil.java:302)
	at org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(EcoreUtil.java:296)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:86)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:62)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:52)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:74)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:35)


Ștefan

[Updated on: Tue, 22 May 2012 12:38]

Report message to a moderator

Re: J2SE-1.7 Problem [message #875442 is a reply to message #874982] Tue, 22 May 2012 19:07 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13657
Registered: July 2009
Senior Member
Hi,

you can configure the Java Version in the MANIFEST.MF files of the projects. Feels free to change J2SE-1.5 to JavaSE-1.7.
The Discouraged Access warning says that you are using API that is not public (by meaning of eclipse APIs)
and thus can be changed. as long as this happens in generated classes feel free to ignore the message.

to the exception you get: what do i have to do to reproduce the problem?

~Christian


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: J2SE-1.7 Problem [message #875869 is a reply to message #875442] Wed, 23 May 2012 13:31 Go to previous messageGo to next message
Ștefan Săftescu is currently offline Ștefan SăftescuFriend
Messages: 4
Registered: May 2012
Junior Member
I get that exception on a new project or on any of the example projects, so there's nothing in particular you need to do to reproduce it.

I run Arch Linux with openjdk7.b147 and a standard Java Eclipse with CDT added on as well as Xtext.

When I installed Xtext, I might have skipped the Maven integration package because it had some dependencies I didn't care to resolve. However, I wouldn't expect that to affect the simplest of projects (otherwise it would have been a requirement of Xtext).

Anyway, let me know what you think and what kind of information I could provide you with.

Ștefan

[Updated on: Wed, 23 May 2012 13:32]

Report message to a moderator

Re: J2SE-1.7 Problem [message #875899 is a reply to message #875869] Wed, 23 May 2012 14:07 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13657
Registered: July 2009
Senior Member
Still the question: does it happen of you open the mwe2 file? Or when
you run it? Or even in the wizard? Regards Christian.


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: J2SE-1.7 Problem [message #875914 is a reply to message #875899] Wed, 23 May 2012 14:49 Go to previous messageGo to next message
Ștefan Săftescu is currently offline Ștefan SăftescuFriend
Messages: 4
Registered: May 2012
Junior Member
It happens just after I create the project (after the wizard) or change the build settings (i.e. when it tries to build the project) or when I want to run the mwe2 file (again, probably because it tries to build the project).
Re: J2SE-1.7 Problem [message #876005 is a reply to message #875914] Wed, 23 May 2012 18:12 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13657
Registered: July 2009
Senior Member
Hi,

found the time to give it a try with my Ubuntu. It works nice with both OpenJDK 7 and Oracle Hotspot 7.
Maybe there is something wrong with your installation. did you try one of our distros? http://xtext.itemis.com/xtext/language=en/36553/downloads

~Christian


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: J2SE-1.7 Problem [message #876016 is a reply to message #876005] Wed, 23 May 2012 18:41 Go to previous message
Ștefan Săftescu is currently offline Ștefan SăftescuFriend
Messages: 4
Registered: May 2012
Junior Member
Hi,

I tried one of your distros as well, so I suppose there's something wrong with my Java installation... I was hoping this was a known/common problem.

I will be trying Fedora 17 when it comes out (in ~a week) and let you know if I have any other problems. Meanwhile I'll try to fix my current installation.

Thanks,
Ștefan
Previous Topic:Xtend task tags
Next Topic:Xtend, rich strings and SEPARATOR option
Goto Forum:
  


Current Time: Tue Nov 24 18:58:52 GMT 2020

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

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

Back to the top