You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Pierre De Rop (JIRA)" <ji...@apache.org> on 2008/09/21 23:13:46 UTC
[jira] Created: (FELIX-730) Can't import highest package version
Can't import highest package version
------------------------------------
Key: FELIX-730
URL: https://issues.apache.org/jira/browse/FELIX-730
Project: Felix
Issue Type: Bug
Components: Framework
Environment: linux
Reporter: Pierre De Rop
Priority: Minor
This issue follows up the thread: http://www.mail-archive.com/users@felix.apache.org/msg02152.html
- I use jdk 1.6, and all the jdk packages are re-exported from the felix.properties file, with version = 1.6.0
- I have a bundle "jaxb.jar" which exports package "javax.xml.bind" with version 2.1.4
(and the jdk also exports that package, but with version = 1.6.0).
- a bundle "SipServletDeployer" simply imports "javax.xml.bind" (but without any versions)
-> the issue is: the bundle "SipServletDeployer" gets wired to the 1.6.0 (jdk) version of javax.xml.bind, instead of version 2.1.4.
(but if I force "version=2.1.4" in "SipServletDeployer", then it is properly wired to the jaxb.jar bundle).
Richard; could you please take a look at the log attached to this issue, because I don't think package "javax.xml.bind" is
already loaded from system bundle (version 1.6.0) at the time "SipServletDeployer" is loaded ...
you can grep "javax.xml.bind" from the log file:
DEBUG: WIRE: 64.0 -> javax.xml.bind.annotation -> 15.0 (bundle 64 is wired to 15 (jaxb.jar) because it imports javax.xml.bind;version=2.1.4
DEBUG: WIRE: 62.0 -> javax.xml.bind -> 15.0 (bundle 62 is wired to 15 (jaxb.jar) because it imports javax.xml.bind;version=2.1.4
DEBUG: WIRE: 30.0 -> javax.xml.bind -> 0 (but bundle 30 (SipServletDeployer) is wired to jdk (system bundle) because it does not import with v=2.1.4 ...
etc ...
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (FELIX-730) Can't import highest package version
Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12635393#action_12635393 ]
Richard S. Hall commented on FELIX-730:
---------------------------------------
Yes, Pierre, you should see the same behavior. The reason is that the resolver favors "resolved" exports when chosing a candidate. The exports from the system bundle are always resolved, so they will always have priority over unresolved ones. To do a test, you could try to resolve your other exporter. If both the system bundle and your other exporter are resolved, then when you resolve the client, it should wire to the higher version of the package.
I did make a change as a result of this bug, but it won't change your scenario. The issue I changed was that the resolver was using "in use" (i.e., if there was a wire to the package) instead of "resolved" as the state to determine whether the export was given higher priority or not. This was a spec compliance bug, since it doesn't matter whether the package is used or not, it only matters if the exporter is resolved.
> Can't import highest package version
> ------------------------------------
>
> Key: FELIX-730
> URL: https://issues.apache.org/jira/browse/FELIX-730
> Project: Felix
> Issue Type: Bug
> Components: Framework
> Environment: linux
> Reporter: Pierre De Rop
> Assignee: Richard S. Hall
> Priority: Minor
> Fix For: felix-1.2.2
>
> Attachments: framework.log
>
>
> This issue follows up the thread: http://www.mail-archive.com/users@felix.apache.org/msg02152.html
> - I use jdk 1.6, and all the jdk packages are re-exported from the felix.properties file, with version = 1.6.0
> - I have a bundle "jaxb.jar" which exports package "javax.xml.bind" with version 2.1.4
> (and the jdk also exports that package, but with version = 1.6.0).
> - a bundle "SipServletDeployer" simply imports "javax.xml.bind" (but without any versions)
> -> the issue is: the bundle "SipServletDeployer" gets wired to the 1.6.0 (jdk) version of javax.xml.bind, instead of version 2.1.4.
> (but if I force "version=2.1.4" in "SipServletDeployer", then it is properly wired to the jaxb.jar bundle).
> Richard; could you please take a look at the log attached to this issue, because I don't think package "javax.xml.bind" is
> already loaded from system bundle (version 1.6.0) at the time "SipServletDeployer" is loaded ...
> you can grep "javax.xml.bind" from the log file:
> DEBUG: WIRE: 64.0 -> javax.xml.bind.annotation -> 15.0 (bundle 64 is wired to 15 (jaxb.jar) because it imports javax.xml.bind;version=2.1.4
> DEBUG: WIRE: 62.0 -> javax.xml.bind -> 15.0 (bundle 62 is wired to 15 (jaxb.jar) because it imports javax.xml.bind;version=2.1.4
> DEBUG: WIRE: 30.0 -> javax.xml.bind -> 0 (but bundle 30 (SipServletDeployer) is wired to jdk (system bundle) because it does not import with v=2.1.4 ...
> etc ...
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (FELIX-730) Can't import highest package version
Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-730?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Richard S. Hall resolved FELIX-730.
-----------------------------------
Resolution: Fixed
Fix Version/s: felix-1.2.2
Assignee: Richard S. Hall
I will mark this bug as "fixed", although it wasn't really a bug per se, since the resolver was doing the correct thing. However, I did realize that there was perhaps some confusion regarding whether the resolver should be keeping track of "in use" vs "resolved" packages. As a result, I modified the resolver to make it clear that we are dealing with "resolved" packages and improved some of the data structure handling that was not previously correct since it was assuming "in use" semantics. I did uncover a bug in the resolver, but I will open a new issue for that.
Peirre, if you are satisfied with this, please close this issue.
> Can't import highest package version
> ------------------------------------
>
> Key: FELIX-730
> URL: https://issues.apache.org/jira/browse/FELIX-730
> Project: Felix
> Issue Type: Bug
> Components: Framework
> Environment: linux
> Reporter: Pierre De Rop
> Assignee: Richard S. Hall
> Priority: Minor
> Fix For: felix-1.2.2
>
> Attachments: framework.log
>
>
> This issue follows up the thread: http://www.mail-archive.com/users@felix.apache.org/msg02152.html
> - I use jdk 1.6, and all the jdk packages are re-exported from the felix.properties file, with version = 1.6.0
> - I have a bundle "jaxb.jar" which exports package "javax.xml.bind" with version 2.1.4
> (and the jdk also exports that package, but with version = 1.6.0).
> - a bundle "SipServletDeployer" simply imports "javax.xml.bind" (but without any versions)
> -> the issue is: the bundle "SipServletDeployer" gets wired to the 1.6.0 (jdk) version of javax.xml.bind, instead of version 2.1.4.
> (but if I force "version=2.1.4" in "SipServletDeployer", then it is properly wired to the jaxb.jar bundle).
> Richard; could you please take a look at the log attached to this issue, because I don't think package "javax.xml.bind" is
> already loaded from system bundle (version 1.6.0) at the time "SipServletDeployer" is loaded ...
> you can grep "javax.xml.bind" from the log file:
> DEBUG: WIRE: 64.0 -> javax.xml.bind.annotation -> 15.0 (bundle 64 is wired to 15 (jaxb.jar) because it imports javax.xml.bind;version=2.1.4
> DEBUG: WIRE: 62.0 -> javax.xml.bind -> 15.0 (bundle 62 is wired to 15 (jaxb.jar) because it imports javax.xml.bind;version=2.1.4
> DEBUG: WIRE: 30.0 -> javax.xml.bind -> 0 (but bundle 30 (SipServletDeployer) is wired to jdk (system bundle) because it does not import with v=2.1.4 ...
> etc ...
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (FELIX-730) Can't import highest package version
Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12633461#action_12633461 ]
Richard S. Hall commented on FELIX-730:
---------------------------------------
I am able to reproduce this issue. It definitely is the case that we are considering the exported packages from system bundle as "in use". I need to investigate the proper definition of "in use" some more, but from my POV, I think we are not defining it correctly. So, that might mean that we will change this behavior. I will report back when I know more.
> Can't import highest package version
> ------------------------------------
>
> Key: FELIX-730
> URL: https://issues.apache.org/jira/browse/FELIX-730
> Project: Felix
> Issue Type: Bug
> Components: Framework
> Environment: linux
> Reporter: Pierre De Rop
> Priority: Minor
> Attachments: framework.log
>
>
> This issue follows up the thread: http://www.mail-archive.com/users@felix.apache.org/msg02152.html
> - I use jdk 1.6, and all the jdk packages are re-exported from the felix.properties file, with version = 1.6.0
> - I have a bundle "jaxb.jar" which exports package "javax.xml.bind" with version 2.1.4
> (and the jdk also exports that package, but with version = 1.6.0).
> - a bundle "SipServletDeployer" simply imports "javax.xml.bind" (but without any versions)
> -> the issue is: the bundle "SipServletDeployer" gets wired to the 1.6.0 (jdk) version of javax.xml.bind, instead of version 2.1.4.
> (but if I force "version=2.1.4" in "SipServletDeployer", then it is properly wired to the jaxb.jar bundle).
> Richard; could you please take a look at the log attached to this issue, because I don't think package "javax.xml.bind" is
> already loaded from system bundle (version 1.6.0) at the time "SipServletDeployer" is loaded ...
> you can grep "javax.xml.bind" from the log file:
> DEBUG: WIRE: 64.0 -> javax.xml.bind.annotation -> 15.0 (bundle 64 is wired to 15 (jaxb.jar) because it imports javax.xml.bind;version=2.1.4
> DEBUG: WIRE: 62.0 -> javax.xml.bind -> 15.0 (bundle 62 is wired to 15 (jaxb.jar) because it imports javax.xml.bind;version=2.1.4
> DEBUG: WIRE: 30.0 -> javax.xml.bind -> 0 (but bundle 30 (SipServletDeployer) is wired to jdk (system bundle) because it does not import with v=2.1.4 ...
> etc ...
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (FELIX-730) Can't import highest package version
Posted by "Pierre De Rop (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-730?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pierre De Rop updated FELIX-730:
--------------------------------
Attachment: framework.log
> Can't import highest package version
> ------------------------------------
>
> Key: FELIX-730
> URL: https://issues.apache.org/jira/browse/FELIX-730
> Project: Felix
> Issue Type: Bug
> Components: Framework
> Environment: linux
> Reporter: Pierre De Rop
> Priority: Minor
> Attachments: framework.log
>
>
> This issue follows up the thread: http://www.mail-archive.com/users@felix.apache.org/msg02152.html
> - I use jdk 1.6, and all the jdk packages are re-exported from the felix.properties file, with version = 1.6.0
> - I have a bundle "jaxb.jar" which exports package "javax.xml.bind" with version 2.1.4
> (and the jdk also exports that package, but with version = 1.6.0).
> - a bundle "SipServletDeployer" simply imports "javax.xml.bind" (but without any versions)
> -> the issue is: the bundle "SipServletDeployer" gets wired to the 1.6.0 (jdk) version of javax.xml.bind, instead of version 2.1.4.
> (but if I force "version=2.1.4" in "SipServletDeployer", then it is properly wired to the jaxb.jar bundle).
> Richard; could you please take a look at the log attached to this issue, because I don't think package "javax.xml.bind" is
> already loaded from system bundle (version 1.6.0) at the time "SipServletDeployer" is loaded ...
> you can grep "javax.xml.bind" from the log file:
> DEBUG: WIRE: 64.0 -> javax.xml.bind.annotation -> 15.0 (bundle 64 is wired to 15 (jaxb.jar) because it imports javax.xml.bind;version=2.1.4
> DEBUG: WIRE: 62.0 -> javax.xml.bind -> 15.0 (bundle 62 is wired to 15 (jaxb.jar) because it imports javax.xml.bind;version=2.1.4
> DEBUG: WIRE: 30.0 -> javax.xml.bind -> 0 (but bundle 30 (SipServletDeployer) is wired to jdk (system bundle) because it does not import with v=2.1.4 ...
> etc ...
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (FELIX-730) Can't import highest package version
Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12633517#action_12633517 ]
Richard S. Hall commented on FELIX-730:
---------------------------------------
After discussing this with Tom Watson, I think Felix might be implementing it correctly after all. The R4.1 spec states at the end of 3.7 that the preference is for "resolved" exporters over unresolved ones. I was originally thinking it was "in use" exporters, which would be ones that actually have a wire to them, but a "resolved" exporter is simply one that has been previously resolved. The system bundle must be resolved, so since the importer matches both, then the resolved state of the system bundle gives it higher priority, version number has a lower precedence. I will still look into this a little more before resolving the issue.
> Can't import highest package version
> ------------------------------------
>
> Key: FELIX-730
> URL: https://issues.apache.org/jira/browse/FELIX-730
> Project: Felix
> Issue Type: Bug
> Components: Framework
> Environment: linux
> Reporter: Pierre De Rop
> Priority: Minor
> Attachments: framework.log
>
>
> This issue follows up the thread: http://www.mail-archive.com/users@felix.apache.org/msg02152.html
> - I use jdk 1.6, and all the jdk packages are re-exported from the felix.properties file, with version = 1.6.0
> - I have a bundle "jaxb.jar" which exports package "javax.xml.bind" with version 2.1.4
> (and the jdk also exports that package, but with version = 1.6.0).
> - a bundle "SipServletDeployer" simply imports "javax.xml.bind" (but without any versions)
> -> the issue is: the bundle "SipServletDeployer" gets wired to the 1.6.0 (jdk) version of javax.xml.bind, instead of version 2.1.4.
> (but if I force "version=2.1.4" in "SipServletDeployer", then it is properly wired to the jaxb.jar bundle).
> Richard; could you please take a look at the log attached to this issue, because I don't think package "javax.xml.bind" is
> already loaded from system bundle (version 1.6.0) at the time "SipServletDeployer" is loaded ...
> you can grep "javax.xml.bind" from the log file:
> DEBUG: WIRE: 64.0 -> javax.xml.bind.annotation -> 15.0 (bundle 64 is wired to 15 (jaxb.jar) because it imports javax.xml.bind;version=2.1.4
> DEBUG: WIRE: 62.0 -> javax.xml.bind -> 15.0 (bundle 62 is wired to 15 (jaxb.jar) because it imports javax.xml.bind;version=2.1.4
> DEBUG: WIRE: 30.0 -> javax.xml.bind -> 0 (but bundle 30 (SipServletDeployer) is wired to jdk (system bundle) because it does not import with v=2.1.4 ...
> etc ...
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (FELIX-730) Can't import highest package version
Posted by "Pierre De Rop (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-730?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pierre De Rop closed FELIX-730.
-------------------------------
Hi Richard;
I have checked the latest trunk and i still have the same behaviour: If I don't provide explicitly the version number, then my bundle is
wired to the system bundle.
I am not sure whether I understand correctly your last message regarding this issue:
Do you assume that, after your last fix, I should be able to be wired to the highest version (without providing it) ?
I just wan't to be sure, because the behaviour has not changed since the previous trunk version (before your fix).
(please close this ticket if every thing is ok ...)
Best Regards
/pierre
> Can't import highest package version
> ------------------------------------
>
> Key: FELIX-730
> URL: https://issues.apache.org/jira/browse/FELIX-730
> Project: Felix
> Issue Type: Bug
> Components: Framework
> Environment: linux
> Reporter: Pierre De Rop
> Assignee: Richard S. Hall
> Priority: Minor
> Fix For: felix-1.2.2
>
> Attachments: framework.log
>
>
> This issue follows up the thread: http://www.mail-archive.com/users@felix.apache.org/msg02152.html
> - I use jdk 1.6, and all the jdk packages are re-exported from the felix.properties file, with version = 1.6.0
> - I have a bundle "jaxb.jar" which exports package "javax.xml.bind" with version 2.1.4
> (and the jdk also exports that package, but with version = 1.6.0).
> - a bundle "SipServletDeployer" simply imports "javax.xml.bind" (but without any versions)
> -> the issue is: the bundle "SipServletDeployer" gets wired to the 1.6.0 (jdk) version of javax.xml.bind, instead of version 2.1.4.
> (but if I force "version=2.1.4" in "SipServletDeployer", then it is properly wired to the jaxb.jar bundle).
> Richard; could you please take a look at the log attached to this issue, because I don't think package "javax.xml.bind" is
> already loaded from system bundle (version 1.6.0) at the time "SipServletDeployer" is loaded ...
> you can grep "javax.xml.bind" from the log file:
> DEBUG: WIRE: 64.0 -> javax.xml.bind.annotation -> 15.0 (bundle 64 is wired to 15 (jaxb.jar) because it imports javax.xml.bind;version=2.1.4
> DEBUG: WIRE: 62.0 -> javax.xml.bind -> 15.0 (bundle 62 is wired to 15 (jaxb.jar) because it imports javax.xml.bind;version=2.1.4
> DEBUG: WIRE: 30.0 -> javax.xml.bind -> 0 (but bundle 30 (SipServletDeployer) is wired to jdk (system bundle) because it does not import with v=2.1.4 ...
> etc ...
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.