The propper fix might be to enable the error event in
// #4 If this bundle's state is not RESOLVED, an attempt is made to resolve this bundle.
// If the Framework cannot resolve this bundle, a BundleException is thrown.
if (ensureResolved(false) == false)
throw new BundleException("Cannot resolve bundle: " + this);
Not sure what the TCK expects in terms of events
Hmmm maybe the case I was looking at the ensureResolved(false) should have been a ensureResolved(true) instead. It's called from HostBundle.startInternal() (since the refactoring this code has moved elsewhere now). Maybe the startInternal() should call ensureResolved(true) instead? Any thoughts here?
The problem I was facing here is that with any deployment (e.g. through the deployments folder) that has unresolved dependencies it was impossible to find out why (unless you fire uyp a debugger). In all of these cases ensureResolved was always called with 'false'.