[ 
https://issues.apache.org/jira/browse/FELIX-3887?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13569414#comment-13569414
 ] 

Richard S. Hall commented on FELIX-3887:
----------------------------------------

I deployed new 4.1.0-SNAPSHOTs for framework, main, and main.distribution.
                
> 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) (7~u3-2.1.1~pre1-1ubuntu2)
> OpenJDK Client VM (build 22.0-b10, mixed mode, sharing)
> DOES NOT affect Java 1.6
>            Reporter: Neil Bartlett
>            Priority: Critical
>
> 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

Reply via email to