Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Kura » Upgrade to kura user workspace 2.1 - The import org.eclipse.kura cannot be resolved((solved))
icon5.gif  Upgrade to kura user workspace 2.1 - The import org.eclipse.kura cannot be resolved [message #1757909] Tue, 21 March 2017 16:28 Go to next message
Ignacio Rey is currently offline Ignacio ReyFriend
Messages: 6
Registered: April 2016
Junior Member
Hi, I'm trying to upgrade my code to run on kura 2.1 (from kura 1.4).

I downloaded the developer's workspace from the downloads page (https://www.eclipse.org/kura/downloads.php). First thing I noticed is that the org.eclipse.kura.api eclipse project is not there anymore - it's become a plugin in target-definition/ instead. That's fine, maven can still find it and it compiles everything correctly. However, eclipse (the IDE) cannot, so it reports a thousand compilation errors that shouldn't be there. Most of these errors appear under the following line in my source files:

import org.eclipse.kura.configuration.ConfigurableComponent;

That's where the IDE points out the error in the title: "The import org.eclipse.kura cannot be resolved". Even if maven compiles, not being able to do so in the IDE is a problem because many features become useless (e.g. refactoring, unit testing, etc).

I suspect there should be something I have to change in the project settings, but I don't know what. I did open kura-equinox_3.8.1.target and clicked on "set as target platform" but it didn't fix it. Maven update my project also made no difference.

Suspicious fact: If I open the kura-equinox_3.8.1.target file in the IDE and switch to the content tab, the org.eclipse.kura.api plugin does not show up in the list. Is that normal? It is there as a .jar file and it is listed in the two .xml files that describe the maven repositories inside target-definition.

[Updated on: Wed, 22 March 2017 17:04]

Report message to a moderator

Re: Upgrade to kura user workspace 2.1 - The import org.eclipse.kura cannot be resolved [message #1758003 is a reply to message #1757909] Wed, 22 March 2017 17:03 Go to previous messageGo to next message
Ignacio Rey is currently offline Ignacio ReyFriend
Messages: 6
Registered: April 2016
Junior Member
I finally understood the cause of this problem. Posting this so that googlers can find it in the future.

I had placed the /target-definition project in a subfolder of the eclipse workspace. The kura-equinox_3.8.1.target file contains references to the repositories in this form:

${workspace_loc}/target-definition/equinox_3.8.1/repository/plugins

Since /target-definition was not a direct subfolder of ${workspace_loc}, this was pointing to nowhere and the jar could not be found. (I still don't understand why maven worked and other jars were found, though).

If the kura devs accept a suggestion, I would recommend editing this file and using ${project_loc} instead of ${workspace_loc}/target-definition/. It could prevent other users from falling into the same issue.

Cheers.
Re: Upgrade to kura user workspace 2.1 - The import org.eclipse.kura cannot be resolved [message #1758132 is a reply to message #1758003] Thu, 23 March 2017 18:55 Go to previous messageGo to next message
David Woodard is currently offline David WoodardFriend
Messages: 420
Registered: July 2014
Senior Member
Hello,

Would you mind creating an Issue in Github [1]?

[1] https://github.com/eclipse/kura/issues

Thanks,
--Dave
Re: Upgrade to kura user workspace 2.1 - The import org.eclipse.kura cannot be resolved [message #1758184 is a reply to message #1758132] Fri, 24 March 2017 12:08 Go to previous message
Ignacio Rey is currently offline Ignacio ReyFriend
Messages: 6
Registered: April 2016
Junior Member
Done. #1263
Previous Topic:How to provide bluetooth Gatt services and characteristics
Next Topic:Eclipse Kura Vs Smarthome
Goto Forum:
  


Current Time: Tue Sep 24 11:43:25 GMT 2024

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

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

Back to the top