aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Wojtuniak (JIRA)" <>
Subject [jira] Commented: (ARIES-178) PackageMBean.listPackages() raises an exception for certain bundles in Felix 2.0.3
Date Wed, 17 Feb 2010 21:17:28 GMT


Adam Wojtuniak commented on ARIES-178:

Hi Roland

All the values in CompositeData need to be uinque so it's no harm to override equals and hashcode
in PackageData.
Iam going to apply your patch in a couple minutes. I checked docs of PackageAdmin but there
is nothing mentioned about
uniqeness of ExportedPackages. So probably there is no bug in Felix but you can check that
on Felix mailing list.

Thanks for the patch.

> PackageMBean.listPackages() raises an exception for certain bundles in Felix 2.0.3
> ----------------------------------------------------------------------------------
>                 Key: ARIES-178
>                 URL:
>             Project: Aries
>          Issue Type: Bug
>          Components: JMX
>    Affects Versions: Incubation
>            Reporter: Roland Huss
>         Attachments: patch.txt
> Using PackageStateMBean.listPackages() gives the following exception on Felix 2.0.3 for
certain bundles (here: spring-ws-core-1.5.9.jar)
> Caused by: Argument value's index,
calculated according to this TabularData instance's tabularType, already refers to a value
in this table.
>         at
>         at
>         at
>         at org.apache.aries.jmx.codec.PackageData.tableFrom(
>         at org.apache.aries.jmx.framework.PackageState.listPackages(
>         ...
> The original reason for this is that Felix returns multiple identical ExportedPackage
when calling
> ExportedPackage[]  PackageAdmin.getExportedPackages(bundle)
> (in this example,; version=1.5.9 is given
> I don't know whether this is allowed by the Spec (or is in fact a bug in Felix), but
Aries could be smarter here anyway.
> Since each ExportedPackage is wrapped in a PackageData for JMX-Export and then added
to a Set<PackageData> all
> what is needed to add appropriate equals() and hashCode() to PackageData to make the
set contain only PackageData
> with a unique index (NAME, VERSION, EXPORTING_BUNDLE) for the TabularData to build up
for the JMX return value.
> Please find attachted a patch to add equals() and hashCode() to PackageData.
> My question though is, whether this an allowed behaviour of Felix to return same ExportedPackage
objects multiple times 
> in getExportedPackages() (so that in case I could rise an issue for Felix as well). 

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

View raw message