You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Richard S. Hall (JIRA)" <ji...@apache.org> on 2013/02/02 04:50:12 UTC
[jira] [Commented] (FELIX-3887) ClassCastException during
resolution of Require-Bundle: system.bundle
[ https://issues.apache.org/jira/browse/FELIX-3887?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13569412#comment-13569412 ]
Richard S. Hall commented on FELIX-3887:
----------------------------------------
I remember someone else mentioning this bug a little while back and I even remember looking into it, but I cannot find a bug report, nor can I see a commit message that says it addresses this. However, it does appear to work on trunk:
g! lb
START LEVEL 1
ID|State |Level|Name
0|Active | 0|System Bundle (4.1.0.SNAPSHOT)
1|Active | 1|Apache Felix Bundle Repository (1.6.6)
2|Active | 1|Apache Felix Gogo Command (0.12.0)
3|Active | 1|Apache Felix Gogo Runtime (0.10.0)
4|Active | 1|Apache Felix Gogo Shell (0.10.0)
5|Installed | 1|require.system.bundle.test (0.0.0)
g! headers 5
Bundle 5
--------
Bundle-ManifestVersion = 2
Bundle-SymbolicName = require.system.bundle.test
Created-By = 1.6.0_37 (Apple Inc.)
Manifest-Version = 1.0
Require-Bundle = system.bundle
g! start 5
DEBUG: WIRE: [5.0] osgi.wiring.bundle; (osgi.wiring.bundle=system.bundle) -> [0]
g!
So maybe it is fixed. Could you try trunk?
> 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