felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard S. Hall (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (FELIX-3887) ClassCastException during resolution of Require-Bundle: system.bundle
Date Mon, 04 Feb 2013 22:24:13 GMT

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

Richard S. Hall closed FELIX-3887.

    Resolution: Fixed
      Assignee: Richard S. Hall

I will assign this to 4.2.0 since it is fixed in trunk, even though I can't seem to find the
exact fix.
> ClassCastException during resolution of Require-Bundle: system.bundle
> ---------------------------------------------------------------------
>                 Key: FELIX-3887
>                 URL: https://issues.apache.org/jira/browse/FELIX-3887
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: framework-4.0.3
>         Environment: java version "1.7.0_03" OpenJDK Runtime Environment (IcedTea7 2.1.1pre)
> OpenJDK Client VM (build 22.0-b10, mixed mode, sharing)
> DOES NOT affect Java 1.6
>            Reporter: Neil Bartlett
>            Assignee: Richard S. Hall
>            Priority: Critical
>             Fix For: framework-4.2.0
> During resolution the following exception is seen:
> java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to java.lang.Comparable
> java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to java.lang.Comparable
>         at org.apache.felix.framework.resolver.CandidateComparator.compare(CandidateComparato
> r.java:50)
>         at org.apache.felix.framework.resolver.CandidateComparator.compare(CandidateComparato
> r.java:28)
>         at java.util.TreeMap.compare(TreeMap.java:1188)
>         at java.util.TreeMap.put(TreeMap.java:531)
>         at java.util.TreeSet.add(TreeSet.java:255)
>         at org.apache.felix.framework.StatefulResolver$ResolverStateImpl.getCandidates(Statef
> ulResolver.java:1309)
>         at org.apache.felix.framework.resolver.Candidates.populateRevision(Candidates.java:27
> 5)
>         at org.apache.felix.framework.resolver.Candidates.populate(Candidates.java:158)
>         at org.apache.felix.framework.resolver.ResolverImpl.resolve(ResolverImpl.java:89)
>         at org.apache.felix.framework.StatefulResolver.resolve(StatefulResolver.java:168)
>         at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3819)
>         at org.apache.felix.framework.Felix.startBundle(Felix.java:1868)
>         at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:944)
>         at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:931)
> This occurs when resolving a bundle that has "Require-Bundle: system.bundle". By debugging
the framework, I see that the osgi.wiring.bundle attribute of the osgi.wiring.bundle capability
of the System Bundle has a value which is a String array: "[org.apache.felix.framework, system.bundle]".
The cast on line 50 of CandidateComparable is therefore invalid in this one particular case.
> On Java 1.6 this line of code is never reached; I'm not yet sure why.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message