You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Jochen (JIRA)" <ji...@apache.org> on 2009/09/19 22:21:16 UTC

[jira] Created: (FELIX-1621) OBR fails to take bundles into account that are already available in the framework

OBR fails to take bundles into account that are already available in the framework
----------------------------------------------------------------------------------

                 Key: FELIX-1621
                 URL: https://issues.apache.org/jira/browse/FELIX-1621
             Project: Felix
          Issue Type: Bug
          Components: Bundle Repository (OBR)
    Affects Versions: felix-2.0.0
         Environment: linux with JDK 1.6 update 16
            Reporter: Jochen


Create a bundle called 'base'. Create another bundle called 'dep'. 'dep' has to depend on 'base'.
Deploy 'base' into felix. Keep 'dep' in a separate directory. Use bindex.jar (from osgi.org) to create the obr.xml.
Create a third bundle with the following code in the activator:

		RepositoryAdmin repositoryAdmin = (RepositoryAdmin) arg0.getService(arg0.getServiceReference(RepositoryAdmin.class.getName()));
		try {
			repositoryAdmin.addRepository((new File(
					"/<pathtorep>/obr.xml")).toURI().toURL());
		} catch (MalformedURLException e) {
			e.printStackTrace();
		} catch (Exception e) {
			e.printStackTrace();
		}
		Resolver resolver = repositoryAdmin.resolver();
		resolver.add(repositoryAdmin.discoverResources("(&(symbolicname=<nameof'dep'>))")[0]);
		if (resolver.resolve()) {
			resolver.deploy(true);
		} else {
			Requirement[] reqs = resolver.getUnsatisfiedRequirements();
			for (int i = 0; i < reqs.length; i++) {
				System.out.println("Unable to resolve: " + reqs[i].getFilter());
			}
		}

When the bundle is started it will give us the message that the 'base' bundle is not available although it is deploied and started in the framework.

This issue is somewhat related to http://issues.apache.org/jira/browse/FELIX-280.

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


[jira] Updated: (FELIX-1621) OBR fails to take bundles into account that are already available in the framework

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

Jochen updated FELIX-1621:
--------------------------

    Attachment: LocalRepositoryImpl.diff

Patch for adding a bundle capability for local resources.

> OBR fails to take bundles into account that are already available in the framework
> ----------------------------------------------------------------------------------
>
>                 Key: FELIX-1621
>                 URL: https://issues.apache.org/jira/browse/FELIX-1621
>             Project: Felix
>          Issue Type: Bug
>          Components: Bundle Repository (OBR)
>    Affects Versions: felix-2.0.0
>         Environment: linux with JDK 1.6 update 16
>            Reporter: Jochen
>         Attachments: LocalRepositoryImpl.diff
>
>
> Create a bundle called 'base'. Create another bundle called 'dep'. 'dep' has to depend on 'base'.
> Deploy 'base' into felix. Keep 'dep' in a separate directory. Use bindex.jar (from osgi.org) to create the obr.xml.
> Create a third bundle with the following code in the activator:
> 		RepositoryAdmin repositoryAdmin = (RepositoryAdmin) arg0.getService(arg0.getServiceReference(RepositoryAdmin.class.getName()));
> 		try {
> 			repositoryAdmin.addRepository((new File(
> 					"/<pathtorep>/obr.xml")).toURI().toURL());
> 		} catch (MalformedURLException e) {
> 			e.printStackTrace();
> 		} catch (Exception e) {
> 			e.printStackTrace();
> 		}
> 		Resolver resolver = repositoryAdmin.resolver();
> 		resolver.add(repositoryAdmin.discoverResources("(&(symbolicname=<nameof'dep'>))")[0]);
> 		if (resolver.resolve()) {
> 			resolver.deploy(true);
> 		} else {
> 			Requirement[] reqs = resolver.getUnsatisfiedRequirements();
> 			for (int i = 0; i < reqs.length; i++) {
> 				System.out.println("Unable to resolve: " + reqs[i].getFilter());
> 			}
> 		}
> When the bundle is started it will give us the message that the 'base' bundle is not available although it is deploied and started in the framework.
> This issue is somewhat related to http://issues.apache.org/jira/browse/FELIX-280.

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


[jira] Resolved: (FELIX-1621) OBR fails to take bundles into account that are already available in the framework

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

Guillaume Nodet resolved FELIX-1621.
------------------------------------

       Resolution: Fixed
    Fix Version/s: bundlerepository-1.6.0
         Assignee: Guillaume Nodet

Committing to https://svn.apache.org/repos/asf/felix/trunk ...
	M	bundlerepository/src/main/java/org/apache/felix/bundlerepository/LocalRepositoryImpl.java
Committed r911482


> OBR fails to take bundles into account that are already available in the framework
> ----------------------------------------------------------------------------------
>
>                 Key: FELIX-1621
>                 URL: https://issues.apache.org/jira/browse/FELIX-1621
>             Project: Felix
>          Issue Type: Bug
>          Components: Bundle Repository (OBR)
>    Affects Versions: felix-2.0.0
>         Environment: linux with JDK 1.6 update 16
>            Reporter: Jochen
>            Assignee: Guillaume Nodet
>             Fix For: bundlerepository-1.6.0
>
>         Attachments: LocalRepositoryImpl.diff
>
>
> Create a bundle called 'base'. Create another bundle called 'dep'. 'dep' has to depend on 'base'.
> Deploy 'base' into felix. Keep 'dep' in a separate directory. Use bindex.jar (from osgi.org) to create the obr.xml.
> Create a third bundle with the following code in the activator:
> 		RepositoryAdmin repositoryAdmin = (RepositoryAdmin) arg0.getService(arg0.getServiceReference(RepositoryAdmin.class.getName()));
> 		try {
> 			repositoryAdmin.addRepository((new File(
> 					"/<pathtorep>/obr.xml")).toURI().toURL());
> 		} catch (MalformedURLException e) {
> 			e.printStackTrace();
> 		} catch (Exception e) {
> 			e.printStackTrace();
> 		}
> 		Resolver resolver = repositoryAdmin.resolver();
> 		resolver.add(repositoryAdmin.discoverResources("(&(symbolicname=<nameof'dep'>))")[0]);
> 		if (resolver.resolve()) {
> 			resolver.deploy(true);
> 		} else {
> 			Requirement[] reqs = resolver.getUnsatisfiedRequirements();
> 			for (int i = 0; i < reqs.length; i++) {
> 				System.out.println("Unable to resolve: " + reqs[i].getFilter());
> 			}
> 		}
> When the bundle is started it will give us the message that the 'base' bundle is not available although it is deploied and started in the framework.
> This issue is somewhat related to http://issues.apache.org/jira/browse/FELIX-280.

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


[jira] Closed: (FELIX-1621) OBR fails to take bundles into account that are already available in the framework

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

Carsten Ziegeler closed FELIX-1621.
-----------------------------------


> OBR fails to take bundles into account that are already available in the framework
> ----------------------------------------------------------------------------------
>
>                 Key: FELIX-1621
>                 URL: https://issues.apache.org/jira/browse/FELIX-1621
>             Project: Felix
>          Issue Type: Bug
>          Components: Bundle Repository (OBR)
>    Affects Versions: felix-2.0.0
>         Environment: linux with JDK 1.6 update 16
>            Reporter: Jochen
>            Assignee: Guillaume Nodet
>             Fix For: bundlerepository-1.6.0
>
>         Attachments: LocalRepositoryImpl.diff
>
>
> Create a bundle called 'base'. Create another bundle called 'dep'. 'dep' has to depend on 'base'.
> Deploy 'base' into felix. Keep 'dep' in a separate directory. Use bindex.jar (from osgi.org) to create the obr.xml.
> Create a third bundle with the following code in the activator:
> 		RepositoryAdmin repositoryAdmin = (RepositoryAdmin) arg0.getService(arg0.getServiceReference(RepositoryAdmin.class.getName()));
> 		try {
> 			repositoryAdmin.addRepository((new File(
> 					"/<pathtorep>/obr.xml")).toURI().toURL());
> 		} catch (MalformedURLException e) {
> 			e.printStackTrace();
> 		} catch (Exception e) {
> 			e.printStackTrace();
> 		}
> 		Resolver resolver = repositoryAdmin.resolver();
> 		resolver.add(repositoryAdmin.discoverResources("(&(symbolicname=<nameof'dep'>))")[0]);
> 		if (resolver.resolve()) {
> 			resolver.deploy(true);
> 		} else {
> 			Requirement[] reqs = resolver.getUnsatisfiedRequirements();
> 			for (int i = 0; i < reqs.length; i++) {
> 				System.out.println("Unable to resolve: " + reqs[i].getFilter());
> 			}
> 		}
> When the bundle is started it will give us the message that the 'base' bundle is not available although it is deploied and started in the framework.
> This issue is somewhat related to http://issues.apache.org/jira/browse/FELIX-280.

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