On 3/17/15 04:34 , Anders Engström wrote:
Hi!

I'm deploying bundles at runtime in a Felix container and was expecting
the container to generate a FrameworkEvent (of type ERROR) if a call to
`Bundle#start()` fails with an exception.

In my case the call to `start` triggers a `BundleException` because of
an unresolved dependency:

Caused by: org.apache.felix.log.LogException: org.osgi.framework.BundleException: Unresolved constraint in bundle se.hrmsoftware.bundles.modules.coins [43]: Unable to resolve 43.0: missing requirement [43.0] osgi.wiring.package; (&(osgi.wiring.package=org.apache.commons.codec.digest)(version>=1.5.0)(!(version>=2.0.0))) at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4097) ~[org.apache.felix.framework-4.6.1.jar:na] at org.apache.felix.framework.Felix.startBundle(Felix.java:2114) ~[org.apache.felix.framework-4.6.1.jar:na] at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:977) ~[org.apache.felix.framework-4.6.1.jar:na] at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:964) ~[org.apache.felix.framework-4.6.1.jar:na] at se.hrmsoftware.bundles.bootstrap.pack.internal.esa.BundlesUnit$1.apply(BundlesUnit.java:56) ~[na:na]
            ... 12 common frames omitted

I notice that there are calls to `fireFrameworkEvent` in
`org.apache.felix.framework.Felix` that seems to be signaling unexpected
errors - but not when a Bundle fails to start.

Is this by design - or should a failure to start a bundle trigger a
FrameworkEvent.ERROR?

I don't believe the specification indicates that a framework event is fired in this case, does it?

-> richard


Some context: I'm writing an integration test that verifies that a set
of bundles can be cleanly deployed into our container. My assumption was
that I could check if there are any failure by listening to Framework
events and fail the test if there are any ERRORS.

Best regards //Anders

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org

Reply via email to