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 2009/06/02 20:39:07 UTC
[jira] Assigned: (FELIX-1197) Bundle Fragments not resolved
correctly
[ https://issues.apache.org/jira/browse/FELIX-1197?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Richard S. Hall reassigned FELIX-1197:
--------------------------------------
Assignee: Richard S. Hall
> Bundle Fragments not resolved correctly
> ---------------------------------------
>
> Key: FELIX-1197
> URL: https://issues.apache.org/jira/browse/FELIX-1197
> Project: Felix
> Issue Type: Bug
> Components: Framework
> Affects Versions: felix-1.8.0
> Reporter: Sergio Mestre
> Assignee: Richard S. Hall
>
> Hi all,
> I have the following behaviour, if I try to attach more than one bundle fragment to the same bundle host.
> java.lang.ClassCastException: org.apache.felix.framework.searchpolicy.ModuleImpl cannot be cast to [Ljava.lang.Object;
> at org.apache.felix.framework.FelixResolverState.checkForConflicts(FelixResolverState.java:220)
> ERROR: Error starting file:bundle/org.apache.felix.shell.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle 31: Unable to merge fragments)
> at org.apache.felix.framework.FelixResolverState.mergeFragments(FelixResolverState.java:139)
> at org.apache.felix.framework.Felix$FelixResolver.resolve(Felix.java:3708)
> at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3091)
> at org.apache.felix.framework.Felix.startBundle(Felix.java:1439)
> at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:984)
> at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:263)
> at java.lang.Thread.run(Thread.java:619)
> The bundle fragments have been tested separately and they work as they should.
> ( e.g. Frag A => Host A => O.K.
> Frag B => Host A => O.K.
> )
> If I try to resolve both bundle fragments than i get the exception above. I took a look at the source and it seems to me that there is a bug in the FelixResolverState class. Inside the method checkForConflicts(IModule host, List fragmentList) there is a map definition Map ipMerged = new HashMap(); where the key is a String and the Value a Object[] .
> Later on in a for loop the same map is used to store keys from type String and values from type ModuleImpl. This causes a the above classcast exception in the line 220.
> Do I have any mistakes in my bundle fragment headers or is this realy a bug ?
> Best regards
> Sergio
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.