You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Florent BENOIT (JIRA)" <ji...@apache.org> on 2010/07/01 16:29:49 UTC

[jira] Created: (FELIX-2459) Wrong error message on a missing package

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
         Environment: It affects Felix 3.0.1 but this version is not listed as released version in this issue tracker (but it has been released !)
            Reporter: Florent BENOIT


  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$ResolverState, Module, Map, Map) line: 415	
	ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, Map) line: 415	
	ResolverImpl.resolve(Resolver$ResolverState, Module) line: 78	
	Felix$FelixResolver.resolve(Module) line: 4005	
	Felix.resolveBundle(BundleImpl) line: 3414	
	Felix.startBundle(BundleImpl, int) line: 1754	
	BundleImpl.start(int) line: 905	


But this issue is ignored at the line 422 by the following code :

                    try
                    {
                        populateCandidates(state, candCap.getModule(),
                            candidateMap, resultCache);
                    }
                    catch (ResolveException ex)  <--- silently catched
                    {
                        // Remove the candidate since we weren't able to
                        // populate its candidates.
                        itCandCap.remove();
                    }

	ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, Map) line: 422	
	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.resolve(Resolver$ResolverState, Module) line: 78	
	Felix$FelixResolver.resolve(Module) line: 4005	
	Felix.resolveBundle(BundleImpl) line: 3414	
	Felix.startBundle(BundleImpl, int) line: 1754	
	BundleImpl.start(int) line: 905	


Then I get an error by Felix but not the original root cause which is a problem for me
I get at these lines :

ex = org.apache.felix.framework.resolver.ResolveException: Unable to resolve 89.0: missing requirement [89.0] package; (&(package=org.apache.catalina.tribes.group.interceptors)(version>=7.0.0))

                            catch (ResolveException ex)
                            {
                                if ((ex.getRequirement() != null)
                                    && (ex.getRequirement() instanceof FragmentRequirement)
                                    && (rootModule !=
                                        ((FragmentRequirement) ex.getRequirement()).getFragment()))
                                {
                                    m_resolverState.detachFragment(
                                        newRootModule,
                                        ((FragmentRequirement) ex.getRequirement()).getFragment());
                                    repeat = true;
                                }
                                else
                                {
                                    throw ex;
                                }
                            }

	Felix$FelixResolver.resolve(Module) line: 4013	
	Felix.resolveBundle(BundleImpl) line: 3414	
	Felix.startBundle(BundleImpl, int) line: 1754	
	BundleImpl.start(int) line: 905	


and this is the error which is reported to me, but this can't help me as the true missing package has been lost.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-2459) Wrong error message on a missing package

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12884326#action_12884326 ] 

Richard S. Hall commented on FELIX-2459:
----------------------------------------

If you can get me some repeatable steps, I will try to look into improving the message, even if I have to download lots of bytes. :-)

Regarding your request to give more info, I understand it would be nice, but it is not likely to be done for a variety of reasons. First, like a compiler error, often early errors make letter errors unmeaningful. Further, being exhaustive is difficult once any single link is broken, because you no know that you need to traverse the missing link and there could be more errors down there. Lastly, even if we could be exhaustive, you might be waiting years for the algorithm to finish telling you all of the potential errors. :-) The goal of the resolver is to hopefully be quick in most cases, which conflicts with providing thorough debugging information.

It does look like we are logging the exceptions though, so in the meantime try setting your framework log level to DEBUG to see if you get your desired exception logged. Otherwise, get me the steps to reproduce and I will try to look at your specific scenario.

> 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
>             Fix For: framework-3.2.0
>
>
>   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$ResolverState, Module, Map, Map) line: 415	
> 	ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, Map) line: 415	
> 	ResolverImpl.resolve(Resolver$ResolverState, Module) line: 78	
> 	Felix$FelixResolver.resolve(Module) line: 4005	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> But this issue is ignored at the line 422 by the following code :
>                     try
>                     {
>                         populateCandidates(state, candCap.getModule(),
>                             candidateMap, resultCache);
>                     }
>                     catch (ResolveException ex)  <--- silently catched
>                     {
>                         // Remove the candidate since we weren't able to
>                         // populate its candidates.
>                         itCandCap.remove();
>                     }
> 	ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, Map) line: 422	
> 	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.resolve(Resolver$ResolverState, Module) line: 78	
> 	Felix$FelixResolver.resolve(Module) line: 4005	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> Then I get an error by Felix but not the original root cause which is a problem for me
> I get at these lines :
> ex = org.apache.felix.framework.resolver.ResolveException: Unable to resolve 89.0: missing requirement [89.0] package; (&(package=org.apache.catalina.tribes.group.interceptors)(version>=7.0.0))
>                             catch (ResolveException ex)
>                             {
>                                 if ((ex.getRequirement() != null)
>                                     && (ex.getRequirement() instanceof FragmentRequirement)
>                                     && (rootModule !=
>                                         ((FragmentRequirement) ex.getRequirement()).getFragment()))
>                                 {
>                                     m_resolverState.detachFragment(
>                                         newRootModule,
>                                         ((FragmentRequirement) ex.getRequirement()).getFragment());
>                                     repeat = true;
>                                 }
>                                 else
>                                 {
>                                     throw ex;
>                                 }
>                             }
> 	Felix$FelixResolver.resolve(Module) line: 4013	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> and this is the error which is reported to me, but this can't help me as the true missing package has been lost.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-2459) Wrong error message on a missing package

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2459?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall updated FELIX-2459:
-----------------------------------

    Fix Version/s: framework-3.2.0
      Environment:     (was: It affects Felix 3.0.1 but this version is not listed as released version in this issue tracker (but it has been released !))

> 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
>             Fix For: framework-3.2.0
>
>
>   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$ResolverState, Module, Map, Map) line: 415	
> 	ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, Map) line: 415	
> 	ResolverImpl.resolve(Resolver$ResolverState, Module) line: 78	
> 	Felix$FelixResolver.resolve(Module) line: 4005	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> But this issue is ignored at the line 422 by the following code :
>                     try
>                     {
>                         populateCandidates(state, candCap.getModule(),
>                             candidateMap, resultCache);
>                     }
>                     catch (ResolveException ex)  <--- silently catched
>                     {
>                         // Remove the candidate since we weren't able to
>                         // populate its candidates.
>                         itCandCap.remove();
>                     }
> 	ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, Map) line: 422	
> 	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.resolve(Resolver$ResolverState, Module) line: 78	
> 	Felix$FelixResolver.resolve(Module) line: 4005	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> Then I get an error by Felix but not the original root cause which is a problem for me
> I get at these lines :
> ex = org.apache.felix.framework.resolver.ResolveException: Unable to resolve 89.0: missing requirement [89.0] package; (&(package=org.apache.catalina.tribes.group.interceptors)(version>=7.0.0))
>                             catch (ResolveException ex)
>                             {
>                                 if ((ex.getRequirement() != null)
>                                     && (ex.getRequirement() instanceof FragmentRequirement)
>                                     && (rootModule !=
>                                         ((FragmentRequirement) ex.getRequirement()).getFragment()))
>                                 {
>                                     m_resolverState.detachFragment(
>                                         newRootModule,
>                                         ((FragmentRequirement) ex.getRequirement()).getFragment());
>                                     repeat = true;
>                                 }
>                                 else
>                                 {
>                                     throw ex;
>                                 }
>                             }
> 	Felix$FelixResolver.resolve(Module) line: 4013	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> and this is the error which is reported to me, but this can't help me as the true missing package has been lost.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-2459) Wrong error message on a missing package

Posted by "Karl Pauls (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2459?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Karl Pauls updated FELIX-2459:
------------------------------

    Fix Version/s: framework-3.0.2
                       (was: framework-3.2.0)

> 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.0.2
>
>         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$ResolverState, Module, Map, Map) line: 415	
> 	ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, Map) line: 415	
> 	ResolverImpl.resolve(Resolver$ResolverState, Module) line: 78	
> 	Felix$FelixResolver.resolve(Module) line: 4005	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> But this issue is ignored at the line 422 by the following code :
>                     try
>                     {
>                         populateCandidates(state, candCap.getModule(),
>                             candidateMap, resultCache);
>                     }
>                     catch (ResolveException ex)  <--- silently catched
>                     {
>                         // Remove the candidate since we weren't able to
>                         // populate its candidates.
>                         itCandCap.remove();
>                     }
> 	ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, Map) line: 422	
> 	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.resolve(Resolver$ResolverState, Module) line: 78	
> 	Felix$FelixResolver.resolve(Module) line: 4005	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> Then I get an error by Felix but not the original root cause which is a problem for me
> I get at these lines :
> ex = org.apache.felix.framework.resolver.ResolveException: Unable to resolve 89.0: missing requirement [89.0] package; (&(package=org.apache.catalina.tribes.group.interceptors)(version>=7.0.0))
>                             catch (ResolveException ex)
>                             {
>                                 if ((ex.getRequirement() != null)
>                                     && (ex.getRequirement() instanceof FragmentRequirement)
>                                     && (rootModule !=
>                                         ((FragmentRequirement) ex.getRequirement()).getFragment()))
>                                 {
>                                     m_resolverState.detachFragment(
>                                         newRootModule,
>                                         ((FragmentRequirement) ex.getRequirement()).getFragment());
>                                     repeat = true;
>                                 }
>                                 else
>                                 {
>                                     throw ex;
>                                 }
>                             }
> 	Felix$FelixResolver.resolve(Module) line: 4013	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> and this is the error which is reported to me, but this can't help me as the true missing package has been lost.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (FELIX-2459) Wrong error message on a missing package

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
     [ 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$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.resolve(Resolver$ResolverState, Module) line: 78	
> 	Felix$FelixResolver.resolve(Module) line: 4005	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> But this issue is ignored at the line 422 by the following code :
>                     try
>                     {
>                         populateCandidates(state, candCap.getModule(),
>                             candidateMap, resultCache);
>                     }
>                     catch (ResolveException ex)  <--- silently catched
>                     {
>                         // Remove the candidate since we weren't able to
>                         // populate its candidates.
>                         itCandCap.remove();
>                     }
> 	ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, Map) line: 422	
> 	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.resolve(Resolver$ResolverState, Module) line: 78	
> 	Felix$FelixResolver.resolve(Module) line: 4005	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> Then I get an error by Felix but not the original root cause which is a problem for me
> I get at these lines :
> ex = org.apache.felix.framework.resolver.ResolveException: Unable to resolve 89.0: missing requirement [89.0] package; (&(package=org.apache.catalina.tribes.group.interceptors)(version>=7.0.0))
>                             catch (ResolveException ex)
>                             {
>                                 if ((ex.getRequirement() != null)
>                                     && (ex.getRequirement() instanceof FragmentRequirement)
>                                     && (rootModule !=
>                                         ((FragmentRequirement) ex.getRequirement()).getFragment()))
>                                 {
>                                     m_resolverState.detachFragment(
>                                         newRootModule,
>                                         ((FragmentRequirement) ex.getRequirement()).getFragment());
>                                     repeat = true;
>                                 }
>                                 else
>                                 {
>                                     throw ex;
>                                 }
>                             }
> 	Felix$FelixResolver.resolve(Module) line: 4013	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> and this is the error which is reported to me, but this can't help me as the true missing package has been lost.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (FELIX-2459) Wrong error message on a missing package

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2459?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall resolved FELIX-2459.
------------------------------------

      Assignee: Richard S. Hall
    Resolution: Fixed

Please close this bug if satisfied. 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$ResolverState, Module, Map, Map) line: 415	
> 	ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, Map) line: 415	
> 	ResolverImpl.resolve(Resolver$ResolverState, Module) line: 78	
> 	Felix$FelixResolver.resolve(Module) line: 4005	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> But this issue is ignored at the line 422 by the following code :
>                     try
>                     {
>                         populateCandidates(state, candCap.getModule(),
>                             candidateMap, resultCache);
>                     }
>                     catch (ResolveException ex)  <--- silently catched
>                     {
>                         // Remove the candidate since we weren't able to
>                         // populate its candidates.
>                         itCandCap.remove();
>                     }
> 	ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, Map) line: 422	
> 	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.resolve(Resolver$ResolverState, Module) line: 78	
> 	Felix$FelixResolver.resolve(Module) line: 4005	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> Then I get an error by Felix but not the original root cause which is a problem for me
> I get at these lines :
> ex = org.apache.felix.framework.resolver.ResolveException: Unable to resolve 89.0: missing requirement [89.0] package; (&(package=org.apache.catalina.tribes.group.interceptors)(version>=7.0.0))
>                             catch (ResolveException ex)
>                             {
>                                 if ((ex.getRequirement() != null)
>                                     && (ex.getRequirement() instanceof FragmentRequirement)
>                                     && (rootModule !=
>                                         ((FragmentRequirement) ex.getRequirement()).getFragment()))
>                                 {
>                                     m_resolverState.detachFragment(
>                                         newRootModule,
>                                         ((FragmentRequirement) ex.getRequirement()).getFragment());
>                                     repeat = true;
>                                 }
>                                 else
>                                 {
>                                     throw ex;
>                                 }
>                             }
> 	Felix$FelixResolver.resolve(Module) line: 4013	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> and this is the error which is reported to me, but this can't help me as the true missing package has been lost.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-2459) Wrong error message on a missing package

Posted by "Florent BENOIT (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2459?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Florent BENOIT updated FELIX-2459:
----------------------------------

    Attachment: jonas-web-container-tomcat-6.0-5.2.0-M3-SNAPSHOT-ipojo.jar

Here are the steps to reproduce the problem

Download JOnAS 5.2.0M3 snapshot here : http://maven.ow2.org/maven2-snapshot/org/ow2/jonas/assemblies/profiles/jonas-full/5.2.0-M3-SNAPSHOT/

(zip or tgz)

Check that this JOnAS is starting fine : "use $JONAS_ROOT/bin/jonas start -fg -clean"

Then, add the bundle which has the failure (this bundle has not the "juli" dependency so we should expect a missing package on this component)

Replace the file $JONAS_ROOT/repositories/maven2-internal/org/ow2/jonas/jonas-web-container-tomcat-6.0/5.2.0-M3-SNAPSHOT/jonas-web-container-tomcat-6.0-5.2.0-M3-SNAPSHOT-ipojo.jar by the file that I've attached

Then start JOnAS using "$JONAS_ROOT/bin/jonas start -fg -clean -debug -p xxx -s y"
You can then connect to JOnAS by using a remote debugger on the xxx port

You will have the error :
[86]: Unable to resolve 86.0: missing requirement [86.0] package; (&(package=org.apache.catalina.tribes.group.interceptors)(version>=6.0.0)) - [86.0] package; (&(package=org.apache.catalina.tribes.group.interceptors)(version>=6.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)


While the "expected" message should be that org.apache.juli.logging package is missing


if you need to patch the Felix that is being used, update the following jar file with the new Felix classes: $JONAS_ROOT/lib/bootstrap/felix-launcher.jar



> 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
>             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$ResolverState, Module, Map, Map) line: 415	
> 	ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, Map) line: 415	
> 	ResolverImpl.resolve(Resolver$ResolverState, Module) line: 78	
> 	Felix$FelixResolver.resolve(Module) line: 4005	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> But this issue is ignored at the line 422 by the following code :
>                     try
>                     {
>                         populateCandidates(state, candCap.getModule(),
>                             candidateMap, resultCache);
>                     }
>                     catch (ResolveException ex)  <--- silently catched
>                     {
>                         // Remove the candidate since we weren't able to
>                         // populate its candidates.
>                         itCandCap.remove();
>                     }
> 	ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, Map) line: 422	
> 	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.resolve(Resolver$ResolverState, Module) line: 78	
> 	Felix$FelixResolver.resolve(Module) line: 4005	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> Then I get an error by Felix but not the original root cause which is a problem for me
> I get at these lines :
> ex = org.apache.felix.framework.resolver.ResolveException: Unable to resolve 89.0: missing requirement [89.0] package; (&(package=org.apache.catalina.tribes.group.interceptors)(version>=7.0.0))
>                             catch (ResolveException ex)
>                             {
>                                 if ((ex.getRequirement() != null)
>                                     && (ex.getRequirement() instanceof FragmentRequirement)
>                                     && (rootModule !=
>                                         ((FragmentRequirement) ex.getRequirement()).getFragment()))
>                                 {
>                                     m_resolverState.detachFragment(
>                                         newRootModule,
>                                         ((FragmentRequirement) ex.getRequirement()).getFragment());
>                                     repeat = true;
>                                 }
>                                 else
>                                 {
>                                     throw ex;
>                                 }
>                             }
> 	Felix$FelixResolver.resolve(Module) line: 4013	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> and this is the error which is reported to me, but this can't help me as the true missing package has been lost.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-2459) Wrong error message on a missing package

Posted by "Florent BENOIT (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12884313#action_12884313 ] 

Florent BENOIT commented on FELIX-2459:
---------------------------------------

>Is your bundle reasonably self contained so that you could attach it as an example? 
>Or does it have lots of dependencies that would make it difficult to recreate the situation? 

Well my bundle failure was part of a new development in JOnAS ;-)
I think that I can provide you a JOnAS  bundle with this kind of failure. The only step to reproduce is to download a Nightly snapshot of JOnAS (which is using Felix v3.0.1), replace a correct bundle and performing "jonas start -debug -p xxx -s y" and then you can remotely
So it's easy to reproduce as we only have to start JOnAS by you need to download some megabytes ;-)

> You raise a very valid point and we should look into seeing if there is a way to improve how we report such errors.
> It is difficult when resolving bundle dependencies because the resolver algorithm discovers many errors and it doesn't necessarily 
> have a way of knowing which error is the most important or the "root" error.
> If you could make a reproducible scenario, it would give us a better idea if we were missing something obvious. At a minimum, we could
> log intermediate errors (although I'd worry about logging too much). Regardless, we can try to look into improving the situation.

In my case, the first error thrown was my "root cause" and the other one were some kind of effects of this first failure but maybe the first error is not a correct one for all cases ?
It would be interesting also if I could have a list of missing dependencies instead of only one missing dependency.
When we integrate/develop some bundles with many dependencies (and when the dependencies are not well done), we have situations where we need to avoid or make optional some imports.
But we need to repeat the step for each import that needs to be fixed as Felix report only one failure at each time. Also, I would know which package is requiring my missing package and maybe a list of packages that have a dependencies on this missing package
With this information, I could figure if I should provide or make optional this package. And with a good report from Felix, I could go faster than today.




> 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
>             Fix For: framework-3.2.0
>
>
>   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$ResolverState, Module, Map, Map) line: 415	
> 	ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, Map) line: 415	
> 	ResolverImpl.resolve(Resolver$ResolverState, Module) line: 78	
> 	Felix$FelixResolver.resolve(Module) line: 4005	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> But this issue is ignored at the line 422 by the following code :
>                     try
>                     {
>                         populateCandidates(state, candCap.getModule(),
>                             candidateMap, resultCache);
>                     }
>                     catch (ResolveException ex)  <--- silently catched
>                     {
>                         // Remove the candidate since we weren't able to
>                         // populate its candidates.
>                         itCandCap.remove();
>                     }
> 	ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, Map) line: 422	
> 	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.resolve(Resolver$ResolverState, Module) line: 78	
> 	Felix$FelixResolver.resolve(Module) line: 4005	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> Then I get an error by Felix but not the original root cause which is a problem for me
> I get at these lines :
> ex = org.apache.felix.framework.resolver.ResolveException: Unable to resolve 89.0: missing requirement [89.0] package; (&(package=org.apache.catalina.tribes.group.interceptors)(version>=7.0.0))
>                             catch (ResolveException ex)
>                             {
>                                 if ((ex.getRequirement() != null)
>                                     && (ex.getRequirement() instanceof FragmentRequirement)
>                                     && (rootModule !=
>                                         ((FragmentRequirement) ex.getRequirement()).getFragment()))
>                                 {
>                                     m_resolverState.detachFragment(
>                                         newRootModule,
>                                         ((FragmentRequirement) ex.getRequirement()).getFragment());
>                                     repeat = true;
>                                 }
>                                 else
>                                 {
>                                     throw ex;
>                                 }
>                             }
> 	Felix$FelixResolver.resolve(Module) line: 4013	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> and this is the error which is reported to me, but this can't help me as the true missing package has been lost.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (FELIX-2459) Wrong error message on a missing package

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2459?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall reopened FELIX-2459:
------------------------------------


The implemented fix causes a regression in fragment handling since the thrown exception is used to detach conflicting fragments from the host. By rethrowing the exception, we don't see that the requirement came from a fragment which means we don't detach it in some cases where there is a conflict. We need to think about this some more.

> 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$ResolverState, Module, Map, Map) line: 415	
> 	ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, Map) line: 415	
> 	ResolverImpl.resolve(Resolver$ResolverState, Module) line: 78	
> 	Felix$FelixResolver.resolve(Module) line: 4005	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> But this issue is ignored at the line 422 by the following code :
>                     try
>                     {
>                         populateCandidates(state, candCap.getModule(),
>                             candidateMap, resultCache);
>                     }
>                     catch (ResolveException ex)  <--- silently catched
>                     {
>                         // Remove the candidate since we weren't able to
>                         // populate its candidates.
>                         itCandCap.remove();
>                     }
> 	ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, Map) line: 422	
> 	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.resolve(Resolver$ResolverState, Module) line: 78	
> 	Felix$FelixResolver.resolve(Module) line: 4005	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> Then I get an error by Felix but not the original root cause which is a problem for me
> I get at these lines :
> ex = org.apache.felix.framework.resolver.ResolveException: Unable to resolve 89.0: missing requirement [89.0] package; (&(package=org.apache.catalina.tribes.group.interceptors)(version>=7.0.0))
>                             catch (ResolveException ex)
>                             {
>                                 if ((ex.getRequirement() != null)
>                                     && (ex.getRequirement() instanceof FragmentRequirement)
>                                     && (rootModule !=
>                                         ((FragmentRequirement) ex.getRequirement()).getFragment()))
>                                 {
>                                     m_resolverState.detachFragment(
>                                         newRootModule,
>                                         ((FragmentRequirement) ex.getRequirement()).getFragment());
>                                     repeat = true;
>                                 }
>                                 else
>                                 {
>                                     throw ex;
>                                 }
>                             }
> 	Felix$FelixResolver.resolve(Module) line: 4013	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> and this is the error which is reported to me, but this can't help me as the true missing package has been lost.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (FELIX-2459) Wrong error message on a missing package

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12884326#action_12884326 ] 

Richard S. Hall edited comment on FELIX-2459 at 7/1/10 11:51 AM:
-----------------------------------------------------------------

If you can get me some repeatable steps, I will try to look into improving the message, even if I have to download lots of bytes. :-)

Regarding your request to give more info, I understand it would be nice, but it is not likely to be done for a variety of reasons. First, like a compiler error, often early errors make later errors unmeaningful. Further, being exhaustive is difficult once any single link is broken, because you no know that you need to traverse the missing link and there could be more errors down there. Lastly, even if we could be exhaustive, you might be waiting years for the algorithm to finish telling you all of the potential errors. :-) The goal of the resolver is to hopefully be quick in most cases, which conflicts with providing thorough debugging information.

It does look like we are logging the exceptions though, so in the meantime try setting your framework log level to DEBUG to see if you get your desired exception logged. Otherwise, get me the steps to reproduce and I will try to look at your specific scenario.

      was (Author: rickhall):
    If you can get me some repeatable steps, I will try to look into improving the message, even if I have to download lots of bytes. :-)

Regarding your request to give more info, I understand it would be nice, but it is not likely to be done for a variety of reasons. First, like a compiler error, often early errors make letter errors unmeaningful. Further, being exhaustive is difficult once any single link is broken, because you no know that you need to traverse the missing link and there could be more errors down there. Lastly, even if we could be exhaustive, you might be waiting years for the algorithm to finish telling you all of the potential errors. :-) The goal of the resolver is to hopefully be quick in most cases, which conflicts with providing thorough debugging information.

It does look like we are logging the exceptions though, so in the meantime try setting your framework log level to DEBUG to see if you get your desired exception logged. Otherwise, get me the steps to reproduce and I will try to look at your specific scenario.
  
> 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
>             Fix For: framework-3.2.0
>
>
>   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$ResolverState, Module, Map, Map) line: 415	
> 	ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, Map) line: 415	
> 	ResolverImpl.resolve(Resolver$ResolverState, Module) line: 78	
> 	Felix$FelixResolver.resolve(Module) line: 4005	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> But this issue is ignored at the line 422 by the following code :
>                     try
>                     {
>                         populateCandidates(state, candCap.getModule(),
>                             candidateMap, resultCache);
>                     }
>                     catch (ResolveException ex)  <--- silently catched
>                     {
>                         // Remove the candidate since we weren't able to
>                         // populate its candidates.
>                         itCandCap.remove();
>                     }
> 	ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, Map) line: 422	
> 	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.resolve(Resolver$ResolverState, Module) line: 78	
> 	Felix$FelixResolver.resolve(Module) line: 4005	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> Then I get an error by Felix but not the original root cause which is a problem for me
> I get at these lines :
> ex = org.apache.felix.framework.resolver.ResolveException: Unable to resolve 89.0: missing requirement [89.0] package; (&(package=org.apache.catalina.tribes.group.interceptors)(version>=7.0.0))
>                             catch (ResolveException ex)
>                             {
>                                 if ((ex.getRequirement() != null)
>                                     && (ex.getRequirement() instanceof FragmentRequirement)
>                                     && (rootModule !=
>                                         ((FragmentRequirement) ex.getRequirement()).getFragment()))
>                                 {
>                                     m_resolverState.detachFragment(
>                                         newRootModule,
>                                         ((FragmentRequirement) ex.getRequirement()).getFragment());
>                                     repeat = true;
>                                 }
>                                 else
>                                 {
>                                     throw ex;
>                                 }
>                             }
> 	Felix$FelixResolver.resolve(Module) line: 4013	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> and this is the error which is reported to me, but this can't help me as the true missing package has been lost.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-2459) Wrong error message on a missing package

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12884728#action_12884728 ] 

Richard S. Hall commented on FELIX-2459:
----------------------------------------

I modified the resolver to rethrow the deeper exception, rather than consume it. This appears to work correctly in your case. However, it won't work in all cases, since it only catches the exception for the first candidate, but that may not be the expected/desired candidate when there are multiple candidates. If the desired candidate comes later and also fails to resolve, you won't get that exception.

One possibility would be to create an exception message that appends all of the errors for all candidates together, but you'd almost need to do this all the way up the recursion stack, since at each level there could be multiple candidates all of which could fail to resolve. This would be a really hard to read exception message. For now, I guess we'll stick with rethrowing the exception of the first candidate under the assumption that this is the common case.

If you want to test this, i deployed snapshots, otherwise you can build from trunk.

> 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
>             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$ResolverState, Module, Map, Map) line: 415	
> 	ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, Map) line: 415	
> 	ResolverImpl.resolve(Resolver$ResolverState, Module) line: 78	
> 	Felix$FelixResolver.resolve(Module) line: 4005	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> But this issue is ignored at the line 422 by the following code :
>                     try
>                     {
>                         populateCandidates(state, candCap.getModule(),
>                             candidateMap, resultCache);
>                     }
>                     catch (ResolveException ex)  <--- silently catched
>                     {
>                         // Remove the candidate since we weren't able to
>                         // populate its candidates.
>                         itCandCap.remove();
>                     }
> 	ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, Map) line: 422	
> 	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.resolve(Resolver$ResolverState, Module) line: 78	
> 	Felix$FelixResolver.resolve(Module) line: 4005	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> Then I get an error by Felix but not the original root cause which is a problem for me
> I get at these lines :
> ex = org.apache.felix.framework.resolver.ResolveException: Unable to resolve 89.0: missing requirement [89.0] package; (&(package=org.apache.catalina.tribes.group.interceptors)(version>=7.0.0))
>                             catch (ResolveException ex)
>                             {
>                                 if ((ex.getRequirement() != null)
>                                     && (ex.getRequirement() instanceof FragmentRequirement)
>                                     && (rootModule !=
>                                         ((FragmentRequirement) ex.getRequirement()).getFragment()))
>                                 {
>                                     m_resolverState.detachFragment(
>                                         newRootModule,
>                                         ((FragmentRequirement) ex.getRequirement()).getFragment());
>                                     repeat = true;
>                                 }
>                                 else
>                                 {
>                                     throw ex;
>                                 }
>                             }
> 	Felix$FelixResolver.resolve(Module) line: 4013	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> and this is the error which is reported to me, but this can't help me as the true missing package has been lost.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (FELIX-2459) Wrong error message on a missing package

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12884326#action_12884326 ] 

Richard S. Hall edited comment on FELIX-2459 at 7/1/10 11:53 AM:
-----------------------------------------------------------------

If you can get me some repeatable steps, I will try to look into improving the message, even if I have to download lots of bytes. :-)

Regarding your request to give more info, I understand it would be nice, but it is not likely to be done for a variety of reasons. First, like a compiler error, often early errors make later errors unmeaningful. Further, being exhaustive is difficult once any single link is broken, because you don't know that you need to traverse the missing link and there could be more errors down there. Lastly, even if we could be exhaustive, you might be waiting years for the algorithm to finish telling you all of the potential errors. :-) The goal of the resolver is to hopefully be quick in most cases, which conflicts with providing thorough debugging information.

It does look like we are logging the exceptions though, so in the meantime try setting your framework log level to DEBUG to see if you get your desired exception logged. Otherwise, get me the steps to reproduce and I will try to look at your specific scenario.

      was (Author: rickhall):
    If you can get me some repeatable steps, I will try to look into improving the message, even if I have to download lots of bytes. :-)

Regarding your request to give more info, I understand it would be nice, but it is not likely to be done for a variety of reasons. First, like a compiler error, often early errors make later errors unmeaningful. Further, being exhaustive is difficult once any single link is broken, because you no know that you need to traverse the missing link and there could be more errors down there. Lastly, even if we could be exhaustive, you might be waiting years for the algorithm to finish telling you all of the potential errors. :-) The goal of the resolver is to hopefully be quick in most cases, which conflicts with providing thorough debugging information.

It does look like we are logging the exceptions though, so in the meantime try setting your framework log level to DEBUG to see if you get your desired exception logged. Otherwise, get me the steps to reproduce and I will try to look at your specific scenario.
  
> 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
>             Fix For: framework-3.2.0
>
>
>   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$ResolverState, Module, Map, Map) line: 415	
> 	ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, Map) line: 415	
> 	ResolverImpl.resolve(Resolver$ResolverState, Module) line: 78	
> 	Felix$FelixResolver.resolve(Module) line: 4005	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> But this issue is ignored at the line 422 by the following code :
>                     try
>                     {
>                         populateCandidates(state, candCap.getModule(),
>                             candidateMap, resultCache);
>                     }
>                     catch (ResolveException ex)  <--- silently catched
>                     {
>                         // Remove the candidate since we weren't able to
>                         // populate its candidates.
>                         itCandCap.remove();
>                     }
> 	ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, Map) line: 422	
> 	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.resolve(Resolver$ResolverState, Module) line: 78	
> 	Felix$FelixResolver.resolve(Module) line: 4005	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> Then I get an error by Felix but not the original root cause which is a problem for me
> I get at these lines :
> ex = org.apache.felix.framework.resolver.ResolveException: Unable to resolve 89.0: missing requirement [89.0] package; (&(package=org.apache.catalina.tribes.group.interceptors)(version>=7.0.0))
>                             catch (ResolveException ex)
>                             {
>                                 if ((ex.getRequirement() != null)
>                                     && (ex.getRequirement() instanceof FragmentRequirement)
>                                     && (rootModule !=
>                                         ((FragmentRequirement) ex.getRequirement()).getFragment()))
>                                 {
>                                     m_resolverState.detachFragment(
>                                         newRootModule,
>                                         ((FragmentRequirement) ex.getRequirement()).getFragment());
>                                     repeat = true;
>                                 }
>                                 else
>                                 {
>                                     throw ex;
>                                 }
>                             }
> 	Felix$FelixResolver.resolve(Module) line: 4013	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> and this is the error which is reported to me, but this can't help me as the true missing package has been lost.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-2459) Wrong error message on a missing package

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12888848#action_12888848 ] 

Richard S. Hall commented on FELIX-2459:
----------------------------------------

I've modified the solution to perform exception "chaining" in the exception message...this is not necessarily an awesome solution since it makes the exception harder to read, but it does appear to work. I will keep this open for a little longer while I try to think of a way to make it better, if possible.

> 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$ResolverState, Module, Map, Map) line: 415	
> 	ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, Map) line: 415	
> 	ResolverImpl.resolve(Resolver$ResolverState, Module) line: 78	
> 	Felix$FelixResolver.resolve(Module) line: 4005	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> But this issue is ignored at the line 422 by the following code :
>                     try
>                     {
>                         populateCandidates(state, candCap.getModule(),
>                             candidateMap, resultCache);
>                     }
>                     catch (ResolveException ex)  <--- silently catched
>                     {
>                         // Remove the candidate since we weren't able to
>                         // populate its candidates.
>                         itCandCap.remove();
>                     }
> 	ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, Map) line: 422	
> 	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.resolve(Resolver$ResolverState, Module) line: 78	
> 	Felix$FelixResolver.resolve(Module) line: 4005	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> Then I get an error by Felix but not the original root cause which is a problem for me
> I get at these lines :
> ex = org.apache.felix.framework.resolver.ResolveException: Unable to resolve 89.0: missing requirement [89.0] package; (&(package=org.apache.catalina.tribes.group.interceptors)(version>=7.0.0))
>                             catch (ResolveException ex)
>                             {
>                                 if ((ex.getRequirement() != null)
>                                     && (ex.getRequirement() instanceof FragmentRequirement)
>                                     && (rootModule !=
>                                         ((FragmentRequirement) ex.getRequirement()).getFragment()))
>                                 {
>                                     m_resolverState.detachFragment(
>                                         newRootModule,
>                                         ((FragmentRequirement) ex.getRequirement()).getFragment());
>                                     repeat = true;
>                                 }
>                                 else
>                                 {
>                                     throw ex;
>                                 }
>                             }
> 	Felix$FelixResolver.resolve(Module) line: 4013	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> and this is the error which is reported to me, but this can't help me as the true missing package has been lost.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-2459) Wrong error message on a missing package

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12884304#action_12884304 ] 

Richard S. Hall commented on FELIX-2459:
----------------------------------------

Thanks for the very detailed explanation.

Is your bundle reasonably self contained so that you could attach it as an example? Or does it have lots of dependencies that would make it difficult to recreate the situation?

You raise a very valid point and we should look into seeing if there is a way to improve how we report such errors. It is difficult when resolving bundle dependencies because the resolver algorithm discovers many errors and it doesn't necessarily have a way of knowing which error is the most important or the "root" error.

If you could make a reproducible scenario, it would give us a better idea if we were missing something obvious. At a minimum, we could log intermediate errors (although I'd worry about logging too much). Regardless, we can try to look into improving the situation.

> 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
>             Fix For: framework-3.2.0
>
>
>   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$ResolverState, Module, Map, Map) line: 415	
> 	ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, Map) line: 415	
> 	ResolverImpl.resolve(Resolver$ResolverState, Module) line: 78	
> 	Felix$FelixResolver.resolve(Module) line: 4005	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> But this issue is ignored at the line 422 by the following code :
>                     try
>                     {
>                         populateCandidates(state, candCap.getModule(),
>                             candidateMap, resultCache);
>                     }
>                     catch (ResolveException ex)  <--- silently catched
>                     {
>                         // Remove the candidate since we weren't able to
>                         // populate its candidates.
>                         itCandCap.remove();
>                     }
> 	ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, Map) line: 422	
> 	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.resolve(Resolver$ResolverState, Module) line: 78	
> 	Felix$FelixResolver.resolve(Module) line: 4005	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> Then I get an error by Felix but not the original root cause which is a problem for me
> I get at these lines :
> ex = org.apache.felix.framework.resolver.ResolveException: Unable to resolve 89.0: missing requirement [89.0] package; (&(package=org.apache.catalina.tribes.group.interceptors)(version>=7.0.0))
>                             catch (ResolveException ex)
>                             {
>                                 if ((ex.getRequirement() != null)
>                                     && (ex.getRequirement() instanceof FragmentRequirement)
>                                     && (rootModule !=
>                                         ((FragmentRequirement) ex.getRequirement()).getFragment()))
>                                 {
>                                     m_resolverState.detachFragment(
>                                         newRootModule,
>                                         ((FragmentRequirement) ex.getRequirement()).getFragment());
>                                     repeat = true;
>                                 }
>                                 else
>                                 {
>                                     throw ex;
>                                 }
>                             }
> 	Felix$FelixResolver.resolve(Module) line: 4013	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> and this is the error which is reported to me, but this can't help me as the true missing package has been lost.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (FELIX-2459) Wrong error message on a missing package

Posted by "Florent BENOIT (JIRA)" <ji...@apache.org>.
     [ 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$ResolverState, Module, Map, Map) line: 415	
> 	ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, Map) line: 415	
> 	ResolverImpl.resolve(Resolver$ResolverState, Module) line: 78	
> 	Felix$FelixResolver.resolve(Module) line: 4005	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> But this issue is ignored at the line 422 by the following code :
>                     try
>                     {
>                         populateCandidates(state, candCap.getModule(),
>                             candidateMap, resultCache);
>                     }
>                     catch (ResolveException ex)  <--- silently catched
>                     {
>                         // Remove the candidate since we weren't able to
>                         // populate its candidates.
>                         itCandCap.remove();
>                     }
> 	ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, Map) line: 422	
> 	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.resolve(Resolver$ResolverState, Module) line: 78	
> 	Felix$FelixResolver.resolve(Module) line: 4005	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> Then I get an error by Felix but not the original root cause which is a problem for me
> I get at these lines :
> ex = org.apache.felix.framework.resolver.ResolveException: Unable to resolve 89.0: missing requirement [89.0] package; (&(package=org.apache.catalina.tribes.group.interceptors)(version>=7.0.0))
>                             catch (ResolveException ex)
>                             {
>                                 if ((ex.getRequirement() != null)
>                                     && (ex.getRequirement() instanceof FragmentRequirement)
>                                     && (rootModule !=
>                                         ((FragmentRequirement) ex.getRequirement()).getFragment()))
>                                 {
>                                     m_resolverState.detachFragment(
>                                         newRootModule,
>                                         ((FragmentRequirement) ex.getRequirement()).getFragment());
>                                     repeat = true;
>                                 }
>                                 else
>                                 {
>                                     throw ex;
>                                 }
>                             }
> 	Felix$FelixResolver.resolve(Module) line: 4013	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> and this is the error which is reported to me, but this can't help me as the true missing package has been lost.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-2459) Wrong error message on a missing package

Posted by "Florent BENOIT (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12885262#action_12885262 ] 

Florent BENOIT commented on FELIX-2459:
---------------------------------------

I've tested with the snapshot revision.
I had 2 test bundles and the missing package was correctly thrown in my cases (with the 3.0.1 version, it sends me very strange package few times)

All candidate errors could be interesting but maybe this could be an option of the framework or it can be obtained with a debug log level.

I close the issue as it is working as expected.


> 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$ResolverState, Module, Map, Map) line: 415	
> 	ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, Map) line: 415	
> 	ResolverImpl.resolve(Resolver$ResolverState, Module) line: 78	
> 	Felix$FelixResolver.resolve(Module) line: 4005	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> But this issue is ignored at the line 422 by the following code :
>                     try
>                     {
>                         populateCandidates(state, candCap.getModule(),
>                             candidateMap, resultCache);
>                     }
>                     catch (ResolveException ex)  <--- silently catched
>                     {
>                         // Remove the candidate since we weren't able to
>                         // populate its candidates.
>                         itCandCap.remove();
>                     }
> 	ResolverImpl.populateCandidates(Resolver$ResolverState, Module, Map, Map) line: 422	
> 	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.resolve(Resolver$ResolverState, Module) line: 78	
> 	Felix$FelixResolver.resolve(Module) line: 4005	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> Then I get an error by Felix but not the original root cause which is a problem for me
> I get at these lines :
> ex = org.apache.felix.framework.resolver.ResolveException: Unable to resolve 89.0: missing requirement [89.0] package; (&(package=org.apache.catalina.tribes.group.interceptors)(version>=7.0.0))
>                             catch (ResolveException ex)
>                             {
>                                 if ((ex.getRequirement() != null)
>                                     && (ex.getRequirement() instanceof FragmentRequirement)
>                                     && (rootModule !=
>                                         ((FragmentRequirement) ex.getRequirement()).getFragment()))
>                                 {
>                                     m_resolverState.detachFragment(
>                                         newRootModule,
>                                         ((FragmentRequirement) ex.getRequirement()).getFragment());
>                                     repeat = true;
>                                 }
>                                 else
>                                 {
>                                     throw ex;
>                                 }
>                             }
> 	Felix$FelixResolver.resolve(Module) line: 4013	
> 	Felix.resolveBundle(BundleImpl) line: 3414	
> 	Felix.startBundle(BundleImpl, int) line: 1754	
> 	BundleImpl.start(int) line: 905	
> and this is the error which is reported to me, but this can't help me as the true missing package has been lost.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.