[jboss-dev-forums] [JBoss OSGi Development] - Cannot resolve dependency against unstarted bundle

thomas.diesler@jboss.com do-not-reply at jboss.com
Tue Sep 1 11:37:24 EDT 2009


https://jira.jboss.org/jira/browse/JBOSGI-136

The VFSDeploymentClassLoaderPolicyModule creates the dependencies like this


  |    protected void createDependencies()
  |    {
  |       ControllerState classLoaderState = getClassLoaderState();
  |       
  |       List<Requirement> requirements = getRequirements();
  |       if (requirements != null)
  |       {
  |          requirementDependencies = new ArrayList<RequirementDependencyItem>();
  |          for (Requirement requirement : requirements)
  |          {
  |             RequirementDependencyItem item = new RequirementDependencyItem(this, requirement, classLoaderState);
  |             addIDependOn(item);
  |             requirementDependencies.add(item);
  |          }
  |       }
  |    }
  | 

The RequirementDependencyItem always initialized the the dependentState with ControllerState.INSTALLED


  |    public RequirementDependencyItem(Module module, Requirement requirement, ControllerState state)
  |    {
  |       super(module != null ? module.getContextName() : null, null, state, ControllerState.INSTALLED);
  | 

which ultimately leads to RequirementDependencyItem.resolve() not being able to find the dependent ControllerContext


  |    ControllerContext context = controller.getContext(iDependOn, getDependentState());
  | 

So it seems that RequirementDependencyItems can only resolve againt INSTALLED contexts.


View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4252873#4252873

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4252873



More information about the jboss-dev-forums mailing list