Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Couldn't find the mandatory library 'org.eclipse.xtext.xbase.lib' 2.4.0 or higher on the project's c(Works on Windows, not on Mac)
Couldn't find the mandatory library 'org.eclipse.xtext.xbase.lib' 2.4.0 or higher on the project's c [message #1118338] Fri, 27 September 2013 10:00 Go to next message
Jos Warmer is currently offline Jos WarmerFriend
Messages: 114
Registered: October 2010
Senior Member
We are using Xtext 2.4.0 under Juno with JDK 1.6. We have been working on Windows for a while, and now tried to inst all an IDE on a Mac. To our surprise we get an error message:
Couldn't find the mandatory library 'org.eclipse.xtext.xbase.lib' 2.4.0 or higher on the project's classpath.
The project is identical to that on Windows, and both use Xtend 2.4.0. The xbase.lib package is imported in the MANIFEST.MF, and exists in the plugin dependencies.

By the way, I checked the code that gives the validation error in XtendJavaValidator.java
@Check
public void checkClassPath(XtendFile xtendFile) {
	TypeReferences typeReferences = getServices().getTypeReferences();
	final JvmGenericType listType = (JvmGenericType) typeReferences.findDeclaredType(List.class, xtendFile);
	if (listType == null || listType.getTypeParameters().isEmpty()) {
		error("Couldn't find a JDK 1.5 or higher on the project's classpath.", xtendFile, XTEND_FILE__PACKAGE,
			IssueCodes.JDK_NOT_ON_CLASSPATH);
	} else if (typeReferences.findDeclaredType(Extension.class, xtendFile) == null) {
		error("Couldn't find the mandatory library 'org.eclipse.xtext.xbase.lib' 2.4.0 or higher on the project's classpath.",
			xtendFile, XTEND_FILE__PACKAGE, IssueCodes.XBASE_LIB_NOT_ON_CLASSPATH);
	}
}

I don't quite understand this code. It looks for a class named Extension, which is not in xbase.lib, and gives an error message when this class cannot be found. I did check this Extension class, and there is such a class on the classpath in the requiredPlugins.

I am wondering why this works on Windows, but not on a Mac. Anyone got this error before?
Re: Couldn't find the mandatory library 'org.eclipse.xtext.xbase.lib' 2.4.0 or higher on the project [message #1118360 is a reply to message #1118338] Fri, 27 September 2013 10:25 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
Hi,

on my machine the Extension class actually is in xbase.lib (2.4.0/2.4.1)


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Couldn't find the mandatory library 'org.eclipse.xtext.xbase.lib' 2.4.0 or higher on the project [message #1118395 is a reply to message #1118360] Fri, 27 September 2013 11:12 Go to previous messageGo to next message
Jos Warmer is currently offline Jos WarmerFriend
Messages: 114
Registered: October 2010
Senior Member
On my machines (both Windows and Mac) the xbase.lib package (inside the org.eclipse.xtext.xbase plugin) only has one class: ArithmeticExtensionGenerator.xtend). Then there is also an org.eclipse.xtext.xbase.lib plugin , but that does not contains an Extension class.
The location for the Extension interface (not a class) is in org.eclipse.xtend in the package org.eclise.ointernal.xtend.xtend.ast.
All versions are 2.4.0.**
Re: Couldn't find the mandatory library 'org.eclipse.xtext.xbase.lib' 2.4.0 or higher on the project [message #1118400 is a reply to message #1118338] Fri, 27 September 2013 11:20 Go to previous messageGo to next message
Dennis Huebner is currently offline Dennis HuebnerFriend
Messages: 257
Registered: July 2009
Senior Member

The code is not just about loading a class from the classpath. The call findDeclaredType delegates to a currently available IJvmTypeProvide. So there might went something wrong. You should check your project settings (builder/compiler setup/ java version/ etc.)
Does the error log says something interesting?
However, I'm using eclipse on my mac and all works fine and like Christian already said Extension.class annotation is in xbase.lib bundle.



+Dennis Huebner

Get professional support from the Xtext committers at www.typefox.io
Re: Couldn't find the mandatory library 'org.eclipse.xtext.xbase.lib' 2.4.0 or higher on the project [message #1118404 is a reply to message #1118395] Fri, 27 September 2013 11:23 Go to previous messageGo to next message
Dennis Huebner is currently offline Dennis HuebnerFriend
Messages: 257
Registered: July 2009
Senior Member

Split package Sad
Use org.eclipse.xtext.xbase.lib as req-bundle



+Dennis Huebner

Get professional support from the Xtext committers at www.typefox.io
Re: Couldn't find the mandatory library 'org.eclipse.xtext.xbase.lib' 2.4.0 or higher on the project [message #1118424 is a reply to message #1118404] Fri, 27 September 2013 11:51 Go to previous messageGo to next message
Dennis Huebner is currently offline Dennis HuebnerFriend
Messages: 257
Registered: July 2009
Senior Member

In the current code base the xbse.lib package in org.eclipse.xtext.xbase bundle is not exported, so I wonder how it became loaded by Import-package declaration.
Could you please post the Xtext version qualifier you using?



+Dennis Huebner

Get professional support from the Xtext committers at www.typefox.io
Re: Couldn't find the mandatory library 'org.eclipse.xtext.xbase.lib' 2.4.0 or higher on the project [message #1118430 is a reply to message #1118404] Fri, 27 September 2013 11:56 Go to previous messageGo to next message
Jos Warmer is currently offline Jos WarmerFriend
Messages: 114
Registered: October 2010
Senior Member
There is definitely something weird going on. I do not have the Extension class in the xbase.lib bundle, neither on Windows, nor on the Mac.
Our exact version numbers are 2.4.0.201212100716 on Mac and 201212180716 on Windows. It seems these are too old and we need a newer 2.4.0 version. I checked that the newer version indeed contains the Extension class. On Windows presumably the validator found another class with the correct name and did not give the error message.

At this very moment we are updating our target platform to use the up to date version of xbase (and xtext, xtend). I will let you know whether this solves the problem.

Thanks for your help

Jos
Re: Couldn't find the mandatory library 'org.eclipse.xtext.xbase.lib' 2.4.0 or higher on the project [message #1118444 is a reply to message #1118430] Fri, 27 September 2013 12:16 Go to previous messageGo to next message
Dennis Huebner is currently offline Dennis HuebnerFriend
Messages: 257
Registered: July 2009
Senior Member

Hmm... v2.4.0 is tagged with 337c160a04117d478b54efb6c187eb8768c297ac 2013-03-20 16:24:36
I just wonder how 2.4.0 can own a v201212* qualifier



+Dennis Huebner

Get professional support from the Xtext committers at www.typefox.io
Re: Couldn't find the mandatory library 'org.eclipse.xtext.xbase.lib' 2.4.0 or higher on the project [message #1118501 is a reply to message #1118444] Fri, 27 September 2013 13:22 Go to previous messageGo to next message
Jos Warmer is currently offline Jos WarmerFriend
Messages: 114
Registered: October 2010
Senior Member
I think it is an earlier milestone of 2.4.0
Re: Couldn't find the mandatory library 'org.eclipse.xtext.xbase.lib' 2.4.0 or higher on the project [message #1118508 is a reply to message #1118501] Fri, 27 September 2013 13:26 Go to previous messageGo to next message
Dennis Huebner is currently offline Dennis HuebnerFriend
Messages: 257
Registered: July 2009
Senior Member

That would make sense. I strongly recommend to use the release or even better a service release build.


+Dennis Huebner

Get professional support from the Xtext committers at www.typefox.io
Re: Couldn't find the mandatory library 'org.eclipse.xtext.xbase.lib' 2.4.0 or higher on the project [message #1118512 is a reply to message #1118501] Fri, 27 September 2013 13:34 Go to previous message
Dennis Huebner is currently offline Dennis HuebnerFriend
Messages: 257
Registered: July 2009
Senior Member

Our Releases repository actually also contains Xtext 2.4.1
http://download.eclipse.org/modeling/tmf/xtext/updates/composite/releases/



+Dennis Huebner

Get professional support from the Xtext committers at www.typefox.io
Previous Topic:Xtext in RCP Application
Next Topic:[SOLVED] Error: Multiple markers at this line -Duplicate ...
Goto Forum:
  


Current Time: Fri Mar 29 14:51:37 GMT 2024

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

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

Back to the top