Skip to main content



      Home
Home » Modeling » TMF (Xtext) » J2SE-1.7 Problem
J2SE-1.7 Problem [message #874982] Mon, 21 May 2012 18:31 Go to next message
Eclipse UserFriend
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 08:38] by Moderator

Re: J2SE-1.7 Problem [message #875442 is a reply to message #874982] Tue, 22 May 2012 15:07 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: J2SE-1.7 Problem [message #875869 is a reply to message #875442] Wed, 23 May 2012 09:31 Go to previous messageGo to next message
Eclipse UserFriend
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 09:32] by Moderator

Re: J2SE-1.7 Problem [message #875899 is a reply to message #875869] Wed, 23 May 2012 10:07 Go to previous messageGo to next message
Eclipse UserFriend
Still the question: does it happen of you open the mwe2 file? Or when
you run it? Or even in the wizard? Regards Christian.
Re: J2SE-1.7 Problem [message #875914 is a reply to message #875899] Wed, 23 May 2012 10:49 Go to previous messageGo to next message
Eclipse UserFriend
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 14:12 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: J2SE-1.7 Problem [message #876016 is a reply to message #876005] Wed, 23 May 2012 14:41 Go to previous message
Eclipse UserFriend
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: Sun Jul 06 05:13:00 EDT 2025

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

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

Back to the top