aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Bosschaert <david.bosscha...@gmail.com>
Subject Aries Subsystem component: ClassCastException when attempting to cast a VersionAttribute to a VersionRangeAttribute
Date Thu, 07 Jun 2012 18:20:11 GMT
Hi all,

I was playing a little with the Aries subsystem component. Got a
simple subsystem working, but when I started to create a larger
subsystem I ran into the exception below [1].

The offending code is from
org.apache.aries.subsystem.core.archive.ImportPackageHeader$Clause.getVersionRangeAttribute()
  public VersionRangeAttribute getVersionRangeAttribute() {
    return (VersionRangeAttribute)myParameters.get(Constants.VERSION_ATTRIBUTE);
  }

Anyone know what could be causing this? To reproduce just deploy the
following .esa file (which is the beginning of packaging CXF-DOSGi as
a feature subsystem):
  http://dl.dropbox.com/u/1151396/subsystems/cxf-dosgi-ri-subsystem-distribution-1.4-SNAPSHOT.esa

Thanks,

David

Caused by: java.lang.ClassCastException:
org.apache.aries.subsystem.core.archive.VersionAttribute cannot be
cast to org.apache.aries.subsystem.core.archive.Vers
ionRangeAttribute
	at org.apache.aries.subsystem.core.archive.ImportPackageHeader$Clause.getVersionRangeAttribute(ImportPackageHeader.java:149)
	at org.apache.aries.subsystem.core.archive.ImportPackageRequirement.<init>(ImportPackageRequirement.java:25)
	at org.apache.aries.subsystem.core.archive.ImportPackageHeader$Clause.toRequirement(ImportPackageHeader.java:153)
	at org.apache.aries.subsystem.core.archive.ImportPackageHeader.toRequirements(ImportPackageHeader.java:216)
	at org.apache.aries.subsystem.core.internal.BundleResource.<init>(BundleResource.java:73)
	at org.apache.aries.subsystem.core.internal.BundleResource.newInstance(BundleResource.java:43)
	at org.apache.aries.subsystem.core.internal.RawSubsystemResource.computeResources(RawSubsystemResource.java:299)
	at org.apache.aries.subsystem.core.internal.RawSubsystemResource.<init>(RawSubsystemResource.java:107)
	at org.apache.aries.subsystem.core.internal.SubsystemResource.<init>(SubsystemResource.java:45)
	at org.apache.aries.subsystem.core.internal.InstallAction.run(InstallAction.java:43)
	... 60 more

Mime
View raw message