Recommended: Sing it, brah! 5 fabulous songs for developers
JW's Top 5
Hi all,
I am using Equinox to run my OSGi bundle. The bundle runs a thread for indefinite time. At certain point of time, I may need to stop the bundle. The problem I face is that, i am not able to stop the bundle!! When I issue the stop command on the OSGi console.. I get the following error:
org.osgi.framework.BundleException: State change in progress for bundle "file:I:\OSGiRuntime\Equinox\custom\ThreadBundle.jar" by t
hread "main".
at org.eclipse.osgi.framework.internal.core.AbstractBundle.beginStateChange(AbstractBundle.java:1144)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.stop(AbstractBundle.java:428)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.stop(AbstractBundle.java:422)
at org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider._stop(FrameworkCommandProvider.java:285)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.execute(FrameworkCommandInterpreter.java:150)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(FrameworkConsole.java:302)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.console(FrameworkConsole.java:287)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.run(FrameworkConsole.java:223)
at java.lang.Thread.run(Unknown Source)
Caused by: org.eclipse.osgi.framework.internal.core.AbstractBundle$BundleStatusException
... 13 more
Anybody know how to solve this?
Thanks in advance,
Abdel Olakara.