Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Issue with loading bundles from project directories with embedded equinox.
Issue with loading bundles from project directories with embedded equinox. [message #997760] Tue, 08 January 2013 17:25 Go to next message
Michael Yara is currently offline Michael YaraFriend
Messages: 27
Registered: July 2009
Junior Member
Hello,

We have normal Java application that runs embedded Jetty and several instances of Equinox via the servlet bridge.

In order to streamline development I have set up a development mode in our application that causes our bundles to be loaded from the bundle project directories in our workspace so we do not have to export the bundles each time we make a change.

The issue I have run into is that when these bundles are loaded from the directory they throw ClassNotFoundExceptions for all the classes in the bundles. I have resolved this by adding the bundle's "bin" directory to the bundle's manifest classpath. This causes the bundles to load properly and our application to work, however all the linking in Eclipse is somewhat broken. For instance if I hit F3 on a class name to get to its definition it will open the class in the editor but it is not editable due to the fact that the .class is opened not the .java file. Attaching the source does work but still leaves the class un-editable.

My main question is how does eclipse accomplish running bundles out of the project directory without the need for bin to be on the bundle classpath? When I added bin to the bundle classpath is when I start to have issues with the linking in Eclipse. If I can get around the need for the "bin" directory in my classpath I should not have the linking issues.

It seems as if I am missing some sort of configuration option that eclipse uses but I cannot seem to determine what that is.

If anyone can shed some light on this issue it would be greatly appreciated.

Thank You,
Mike


[Updated on: Tue, 08 January 2013 17:45]

Report message to a moderator

Re: Issue with loading bundles from project directories with embedded equinox. [message #1003869 is a reply to message #997760] Tue, 22 January 2013 06:59 Go to previous messageGo to next message
Eban Escott is currently offline Eban EscottFriend
Messages: 61
Registered: July 2009
Member
Hi Mike,

I think you want to use a target definition and a run configuration. The target definition allows you to set the target platform and then when the run configuration is launched it will use the target platform that you have specified. Have a look at http://wiki.eclipse.org/PDE/Target_Definitions.

Using this I am able to launch my OSGi framework without having to export.

Hope this helps,
Eban
Re: Issue with loading bundles from project directories with embedded equinox. [message #1050229 is a reply to message #1003869] Fri, 26 April 2013 22:28 Go to previous message
Michael Yara is currently offline Michael YaraFriend
Messages: 27
Registered: July 2009
Junior Member
I found the answer to my issue.

I had to include the following in my config.ini files.

osgi.dev = bin
Previous Topic:Equinox Servlet Bridge JSP Change Detection
Next Topic:Multiple hosts for a single Fragment
Goto Forum:
  


Current Time: Thu Dec 18 11:29:26 GMT 2014

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

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