You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Norman Fomferra (JIRA)" <ji...@apache.org> on 2014/05/16 20:43:16 UTC

[jira] [Updated] (FELIX-4516) Update command fails for non-bundle resource

     [ https://issues.apache.org/jira/browse/FELIX-4516?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Norman Fomferra updated FELIX-4516:
-----------------------------------

    Description: 
I have a deployment package containg two bundles and an image resource. All three resources are listed in the manifest 
in the given order. When trying to install the package, the UpdateCommand.doExecute() thows the following exception:   

{noformat}
org.osgi.service.deploymentadmin.DeploymentException: Resource 'icon.png' is not described in the manifest.
	at org.apache.felix.deploymentadmin.spi.UpdateCommand.doExecute(UpdateCommand.java:69)
	at org.apache.felix.deploymentadmin.spi.Command.execute(Command.java:55)
	at org.apache.felix.deploymentadmin.spi.DeploymentSessionImpl.call(DeploymentSessionImpl.java:77)
	at org.apache.felix.deploymentadmin.DeploymentAdminImpl.installDeploymentPackage(DeploymentAdminImpl.java:214)
	at org.teo.obr.DpCommand.installFromFile(DpCommand.java:153)
{noformat}

The exception is thrown in org/apache/felix/deploymentadmin/spi/UpdateCommand.java(line 69) once the current JAR
entry is not the name of an expected bundle:
 
{code:java}
66  String name = entry.getPath();
67  BundleInfoImpl bundleInfo = (BundleInfoImpl) expectedBundles.remove(name);
68  if (bundleInfo == null) {
69      throw new DeploymentException(DeploymentException.CODE_OTHER_ERROR, "Resource '" + name + "' is not described...
70  }
{code}

The code should check first if the current JAR entry points to any other resource in the manifest before assuming 
it points to a bundle.  

Issue FELIX-518 is closely created, if not the same.

Thanks!
   Norman

  was:
I have a deployment package containg two bundles and an image resource. All three resources are listed in the manifest 
in the given order. When trying to install the package, the UpdateCommand.doExecute() thows the following exception:   

org.osgi.service.deploymentadmin.DeploymentException: Resource 'icon.png' is not described in the manifest.
	at org.apache.felix.deploymentadmin.spi.UpdateCommand.doExecute(UpdateCommand.java:69)
	at org.apache.felix.deploymentadmin.spi.Command.execute(Command.java:55)
	at org.apache.felix.deploymentadmin.spi.DeploymentSessionImpl.call(DeploymentSessionImpl.java:77)
	at org.apache.felix.deploymentadmin.DeploymentAdminImpl.installDeploymentPackage(DeploymentAdminImpl.java:214)
	at org.teo.obr.DpCommand.installFromFile(DpCommand.java:153)

The exception is thrown in org/apache/felix/deploymentadmin/spi/UpdateCommand.java(line 69) once the current JAR
entry is not the name of an expected bundle:
 
66  String name = entry.getPath();
67  BundleInfoImpl bundleInfo = (BundleInfoImpl) expectedBundles.remove(name);
68  if (bundleInfo == null) {
69      throw new DeploymentException(DeploymentException.CODE_OTHER_ERROR, "Resource '" + name + "' is not described...
70  }

The code should check first if the current JAR entry points to any other resource in the manifest before assuming 
it points to a bundle.  

Issue FELIX-518 is closely created, if not the same.

Thanks!
   Norman


> Update command fails for non-bundle resource
> --------------------------------------------
>
>                 Key: FELIX-4516
>                 URL: https://issues.apache.org/jira/browse/FELIX-4516
>             Project: Felix
>          Issue Type: Bug
>          Components: Deployment Admin
>    Affects Versions: deploymentadmin-0.9.6
>            Reporter: Norman Fomferra
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> I have a deployment package containg two bundles and an image resource. All three resources are listed in the manifest 
> in the given order. When trying to install the package, the UpdateCommand.doExecute() thows the following exception:   
> {noformat}
> org.osgi.service.deploymentadmin.DeploymentException: Resource 'icon.png' is not described in the manifest.
> 	at org.apache.felix.deploymentadmin.spi.UpdateCommand.doExecute(UpdateCommand.java:69)
> 	at org.apache.felix.deploymentadmin.spi.Command.execute(Command.java:55)
> 	at org.apache.felix.deploymentadmin.spi.DeploymentSessionImpl.call(DeploymentSessionImpl.java:77)
> 	at org.apache.felix.deploymentadmin.DeploymentAdminImpl.installDeploymentPackage(DeploymentAdminImpl.java:214)
> 	at org.teo.obr.DpCommand.installFromFile(DpCommand.java:153)
> {noformat}
> The exception is thrown in org/apache/felix/deploymentadmin/spi/UpdateCommand.java(line 69) once the current JAR
> entry is not the name of an expected bundle:
>  
> {code:java}
> 66  String name = entry.getPath();
> 67  BundleInfoImpl bundleInfo = (BundleInfoImpl) expectedBundles.remove(name);
> 68  if (bundleInfo == null) {
> 69      throw new DeploymentException(DeploymentException.CODE_OTHER_ERROR, "Resource '" + name + "' is not described...
> 70  }
> {code}
> The code should check first if the current JAR entry points to any other resource in the manifest before assuming 
> it points to a bundle.  
> Issue FELIX-518 is closely created, if not the same.
> Thanks!
>    Norman



--
This message was sent by Atlassian JIRA
(v6.2#6252)