Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » How to stop already running OSGi frameworks from IDE
How to stop already running OSGi frameworks from IDE [message #873617] Fri, 18 May 2012 17:07 Go to next message
Libor Jelinek is currently offline Libor Jelinek
Messages: 143
Registered: January 2012
Location: Prague, Czech Rep.
Senior Member

Hello all,
when I run two or more times my app using OSGi Framework run configuration, I also lost a change to interact with and stop already running frameworks.

For example if I'm using HttpService in bundle running in already active framework, second try give me a error

!ENTRY org.eclipse.equinox.http 4 0 2012-05-18 18:44:45.727
!MESSAGE Port 8080 is use
!STACK 0
java.net.BindException: Address already in use

But I don't have any change to stop first framework. However Eclipse IDE knows about it and reporting it on Run toolbar button tooltip:

index.php/fa/9770/0/

But how do I stop (or open console to close) this already running framework? So far I'm shutting down whole Eclipse to kill this running Equinox.

Thanks a lot!
Re: How to stop already running OSGi frameworks from IDE [message #874548 is a reply to message #873617] Mon, 21 May 2012 06:17 Go to previous messageGo to next message
Gunnar Wagenknecht is currently offline Gunnar Wagenknecht
Messages: 451
Registered: July 2009
Location: Germany ✈ Vancouver
Senior Member

Am 18.05.2012 19:07, schrieb Libor Jelínek:
> But how do I stop (or open console to close) this already running framework?

If you started with the "-console" option then open the "Console" view
and select the console of the running application and enter "close" in
the view as command. You may also use the "terminate" button in that
view but that's a hard termination which does not trigger a proper shutdown.

The other option is to switch to the "Debug" perspective and select the
running application in the "Debug" view. This will give you a "terminat"
button as well. Again, the terminate does not trigger a proper shutdown.

-Gunnar

--
Gunnar Wagenknecht
gunnar@xxxxxxxx
http://wagenknecht.org/
Re: How to stop already running OSGi frameworks from IDE [message #883077 is a reply to message #873617] Thu, 07 June 2012 19:59 Go to previous messageGo to next message
craig mc is currently offline craig mc
Messages: 1
Registered: June 2012
Junior Member
I ran across the same issue and it took me a while to figure it out.
It appears that the first OSGi plugin project you create will also create an OSGi Framework Run Configuration which defaults to the same name as the project. And in my case it (or I) had set that first bundle to auto-start in the run config settings.

So even though you are clicking run from another plugin project, it is still running the same run configuration and auto-starting other bundles.

So you need to right click on your project, go to Run As and choose Run Configurations. The find the OSGi run confi and see which bundles are set to auto-start..
And in my case I renamed the Run Config to something generic to remove the confusion.

Re: How to stop already running OSGi frameworks from IDE [message #883284 is a reply to message #883077] Fri, 08 June 2012 07:52 Go to previous message
Libor Jelinek is currently offline Libor Jelinek
Messages: 143
Registered: January 2012
Location: Prague, Czech Rep.
Senior Member

Hi Crag,
it doesn't sound to me like the same issue which I had... In my case it
was all about my Eclipse IDE UI user education because I didn't know
that Console view has a toolbar combobox to switch among running
processes. Or that I can see them from Debug perspective.

Libor

On 06/07/2012 09:59 PM, craig mc wrote:
> I ran across the same issue and it took me a while to figure it out. It
> appears that the first OSGi plugin project you create will also create
> an OSGi Framework Run Configuration which defaults to the same name as
> the project. And in my case it (or I) had set that first bundle to
> auto-start in the run config settings.
> So even though you are clicking run from another plugin project, it is
> still running the same run configuration and auto-starting other bundles.
> So you need to right click on your project, go to Run As and choose Run
> Configurations. The find the OSGi run confi and see which bundles are
> set to auto-start.. And in my case I renamed the Run Config to something
> generic to remove the confusion.
>
>
Previous Topic:org.osgi.framework.BundleException
Next Topic:NoClassDefFoundError starting org.eclipse.equinox.registry
Goto Forum:
  


Current Time: Wed Oct 01 16:19:30 GMT 2014

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

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