[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[equinox-dev] Caused by: org.osgi.framework.BundleException: State change in progress for bundle...by thread "OSGi Console"
|
Hi,
Why do I face the following exception:
jlaskowski@work /cygdrive/c/projs/osgi/spring-osgi-install
$ java -jar c:/apps/eclipse/plugins/org.eclipse.osgi_3.4.0.v20080205.jar
-console
osgi> ss
Framework is launched.
id State Bundle
0 ACTIVE org.eclipse.osgi_3.4.0.v20080205
osgi> install file:c:/projs/osgi/spring-osgi-install/target/spring-osgi-install-1.0.jar
Bundle id is 1
osgi> start 1
2008-04-03 22:26:06 pl.jaceklaskowski.osgi.AktywatorPakunku start
------------------------------------
Charakterystyka zainstalowanego pakunku:
Identyfikator: 2
Identyfikator położenia:
file:c:/projs/osgi/spring-osgi-activationpolicy/target/spring-osgi-activationpolicy-1.0.jar
Nazwa symboliczna: pl.jaceklaskowski.osgi.spring-osgi-activationpolicy
------------------------------------
Startuj¦Ö pakunek pl.jaceklaskowski.osgi.spring-osgi-activationpolicy
2008-04-03 22:26:07 pl.jaceklaskowski.osgi.AktywatorPakunku start
------------------------------------
Charakterystyka zainstalowanego pakunku:
Identyfikator: 2
Identyfikator położenia:
file:c:/projs/osgi/spring-osgi-activationpolicy/target/spring-osgi-activationpolicy-1.0.jar
Nazwa symboliczna: pl.jaceklaskowski.osgi.spring-osgi-activationpolicy
------------------------------------
Startuję pakunek pl.jaceklaskowski.osgi.spring-osgi-activationpolicy
org.osgi.framework.BundleException: Exception in
pl.jaceklaskowski.osgi.AktywatorPakunku.start() of bundle
pl.jaceklaskowski.osgi.spring-osgi-install.
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:1018)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:974)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:265)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:257)
at org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider._start(FrameworkCommandProvider.java:257)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.execute(FrameworkCommandInterpreter.java:150)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(FrameworkConsole.java:298)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.console(FrameworkConsole.java:283)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.run(FrameworkConsole.java:219)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.osgi.framework.BundleException: Exception in
pl.jaceklaskowski.osgi.AktywatorPakunku.start() of bundle
pl.jaceklaskowski.osgi.spring-osgi-activationpolicy.
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:1018)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:974)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:265)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:257)
at pl.jaceklaskowski.osgi.AktywatorPakunku.start(AktywatorPakunku.java:26)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:999)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:993)
... 14 more
Caused by: org.osgi.framework.BundleException:
State change in progress for bundle
"file:c:/projs/osgi/spring-osgi-activationpolicy/target/spring-osgi-activationpolicy-1.0.jar"
by thread "OSGi Console".
at org.eclipse.osgi.framework.internal.core.AbstractBundle.beginStateChange(AbstractBundle.java:1143)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:263)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:257)
at pl.jaceklaskowski.osgi.AktywatorPakunku.start(AktywatorPakunku.java:26)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:999)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:993)
... 22 more
Caused by: org.eclipse.osgi.framework.internal.core.AbstractBundle$BundleStatusException
... 29 more
...
osgi> ss
Framework is launched.
id State Bundle
0 ACTIVE org.eclipse.osgi_3.4.0.v20080205
1 RESOLVED pl.jaceklaskowski.osgi.spring-osgi-install_1.0.0
2 RESOLVED pl.jaceklaskowski.osgi.spring-osgi-activationpolicy_1.0.0
osgi> exit
upon running the following activator:
package pl.jaceklaskowski.osgi;
import java.util.logging.Logger;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
public class AktywatorPakunku implements BundleActivator {
Logger log = Logger.getLogger(AktywatorPakunku.class.getName());
public void start(BundleContext bundleContext) throws Exception {
Bundle bundle = bundleContext.installBundle(
"file:c:/projs/osgi/spring-osgi-activationpolicy/target/spring-osgi-activationpolicy-1.0.jar");
long bundleId = bundle.getBundleId();
String bundleLocation = bundle.getLocation();
String bundleSymbolicName = bundle.getSymbolicName();
System.out.println("------------------------------------");
System.out.println("Charakterystyka zainstalowanego pakunku:");
System.out.println(" Identyfikator: " + bundleId);
System.out.println(" Identyfikator położenia: " + bundleLocation);
System.out.println(" Nazwa symboliczna: " + bundleSymbolicName);
System.out.println("------------------------------------");
System.out.println("Startuję pakunek " + bundleSymbolicName);
bundle.start();
}
public void stop(BundleContext bundleContext) throws Exception {
log.info("stop() wykonano - czyszczę po sobie");
}
}
where spring-osgi-activationpolicy-1.0.jar is a bundle with
Bundle-ActivationPolicy: lazy I meant to test out.
Jacek
--
Jacek Laskowski
http://www.JacekLaskowski.pl