[jira] Closed: (FELIX-2459) Wrong error message on a missing package
[ https://issues.apache.org/jira/browse/FELIX-2459?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Richard S. Hall closed FELIX-2459. -- Resolution: Fixed I am closing this again, since I was able to simplify the resulting exception message to some degree by avoiding recursing for a module that imports from itself when populating candidates. > Wrong error message on a missing package > > > Key: FELIX-2459 > URL: https://issues.apache.org/jira/browse/FELIX-2459 > Project: Felix > Issue Type: Bug > Components: Framework >Affects Versions: framework-3.0.1 >Reporter: Florent BENOIT >Assignee: Richard S. Hall > Fix For: framework-3.2.0 > > Attachments: > jonas-web-container-tomcat-6.0-5.2.0-M3-SNAPSHOT-ipojo.jar > > > Hi, > Here is the case : > I have one bundle with a missing import, I need to fix the bundle but Felix > 3.0.1 is not helping me with the errors that are thrown. (the missing package > required to start my bundle is "org.apache.juli.logging") and this missing > package is not reported as a missing package in 3.0.1 while it was reported > with Felix 2.0.5 > When testing this bundle with Felix 3.0.1, I get the following message : > org.osgi.framework.BundleException: Unresolved constraint in bundle xxx [89]: > Unable to resolve 89.0: missing requirement [89.0] package; > (&(package=org.apache.catalina.tribes.group.interceptors)(version>=7.0.0)) - > [89.0] package; > (&(package=org.apache.catalina.tribes.group.interceptors)(version>=7.0.0)) > at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3421) > at org.apache.felix.framework.Felix.startBundle(Felix.java:1754) > at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:905) > This package (org.apache.catalina.tribes.group.interceptors) is present in my > bundle archive. > It tells me that a requirement is not available but I don't know which > package is missing which is a big problem as it's quite difficult to fix an > issue when there is a missing information > By switching back to Felix v2.0.5, I have the following error : > org.osgi.framework.BundleException: Unresolved constraint in bundle xxx [89]: > package; (package=org.apache.juli.logging) > at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3299) > at org.apache.felix.framework.Felix.startBundle(Felix.java:1657) > at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:905) > And now, we can see that the missing package is printed > By adding some breakpoint in Felix 3.0.1, I can see that the original error > is raised in ResolverImpl class but then this error is ignored > Here is the code that is raising my expecting missing package : > if ((candidates.size() == 0) && !req.isOptional()) > { > ResolveException ex = > new ResolveException("Unable to resolve " + module > + ": missing requirement " + req, module, req); > resultCache.put(module, ex); > m_logger.log(Logger.LOG_DEBUG, "No viable candidates", ex); > throw ex; > } > The exception which is built here is : > org.apache.felix.framework.resolver.ResolveException: Unable to resolve 89.0: > missing requirement [89.0] package; (package=org.apache.juli.logging) > ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, > Map) line: 437 > ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, > Map) line: 415 > ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, > Map) line: 415 > ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, > Map) line: 415 > ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, > Map) line: 415 > ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, > Map) line: 415 > ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, > Map) line: 415 > ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, > Map) line: 415 > ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, > Map) line: 415 > ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, > Map) line: 415 > ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, > Map) line: 415 > ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, > Map) line: 415 > ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, > Map) line: 415 > ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, > Map) line: 415 > ResolverImpl.populateCandidates(Resolver$ResolverSt
[jira] Closed: (FELIX-2459) Wrong error message on a missing package
[ https://issues.apache.org/jira/browse/FELIX-2459?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Florent BENOIT closed FELIX-2459. - Working for me, thanks ! > Wrong error message on a missing package > > > Key: FELIX-2459 > URL: https://issues.apache.org/jira/browse/FELIX-2459 > Project: Felix > Issue Type: Bug > Components: Framework >Affects Versions: framework-3.0.1 >Reporter: Florent BENOIT >Assignee: Richard S. Hall > Fix For: framework-3.2.0 > > Attachments: > jonas-web-container-tomcat-6.0-5.2.0-M3-SNAPSHOT-ipojo.jar > > > Hi, > Here is the case : > I have one bundle with a missing import, I need to fix the bundle but Felix > 3.0.1 is not helping me with the errors that are thrown. (the missing package > required to start my bundle is "org.apache.juli.logging") and this missing > package is not reported as a missing package in 3.0.1 while it was reported > with Felix 2.0.5 > When testing this bundle with Felix 3.0.1, I get the following message : > org.osgi.framework.BundleException: Unresolved constraint in bundle xxx [89]: > Unable to resolve 89.0: missing requirement [89.0] package; > (&(package=org.apache.catalina.tribes.group.interceptors)(version>=7.0.0)) - > [89.0] package; > (&(package=org.apache.catalina.tribes.group.interceptors)(version>=7.0.0)) > at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3421) > at org.apache.felix.framework.Felix.startBundle(Felix.java:1754) > at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:905) > This package (org.apache.catalina.tribes.group.interceptors) is present in my > bundle archive. > It tells me that a requirement is not available but I don't know which > package is missing which is a big problem as it's quite difficult to fix an > issue when there is a missing information > By switching back to Felix v2.0.5, I have the following error : > org.osgi.framework.BundleException: Unresolved constraint in bundle xxx [89]: > package; (package=org.apache.juli.logging) > at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3299) > at org.apache.felix.framework.Felix.startBundle(Felix.java:1657) > at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:905) > And now, we can see that the missing package is printed > By adding some breakpoint in Felix 3.0.1, I can see that the original error > is raised in ResolverImpl class but then this error is ignored > Here is the code that is raising my expecting missing package : > if ((candidates.size() == 0) && !req.isOptional()) > { > ResolveException ex = > new ResolveException("Unable to resolve " + module > + ": missing requirement " + req, module, req); > resultCache.put(module, ex); > m_logger.log(Logger.LOG_DEBUG, "No viable candidates", ex); > throw ex; > } > The exception which is built here is : > org.apache.felix.framework.resolver.ResolveException: Unable to resolve 89.0: > missing requirement [89.0] package; (package=org.apache.juli.logging) > ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, > Map) line: 437 > ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, > Map) line: 415 > ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, > Map) line: 415 > ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, > Map) line: 415 > ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, > Map) line: 415 > ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, > Map) line: 415 > ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, > Map) line: 415 > ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, > Map) line: 415 > ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, > Map) line: 415 > ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, > Map) line: 415 > ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, > Map) line: 415 > ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, > Map) line: 415 > ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, > Map) line: 415 > ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, > Map) line: 415 > ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, > Map) line: 415 > ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, > Map) line: 415 > ResolverImpl.populateCandidates(Resolver$