|
|
|
Re: org.eclipse.fx.core, guava, javax.activation and e4 resolution [message #1712088 is a reply to message #1712081] |
Wed, 21 October 2015 09:30 |
crothy donald Messages: 31 Registered: September 2013 |
Member |
|
|
Thank you once again for the quick response.
>First of all yes. You should remove all javax.annotation imports to your
>own bundles. Unfortunately some of our libs need to work as well in an
>env where javax.annotation-bundle is available (fx.core is used also
>inside the efxclipse-tooling) so we need to have the import package.
I had removed all javax.annotation imports to my own bundles.
>Does this happen only with the exported application or does the resolve
>error happen as well in the IDE? If it happens in the IDE make sure you
>check the "Clear the configuration area before launching".
Yes, same error, from inside IDE. I had "clear configuration" checked.
>Is the efxclipse updatesite the only one in your root-pom?
No, unfortunatley, i need mars p2 repo and some own artifacts (nexus)
>Would you mind giving the nightly target platform a try to see if this
>would resolve your problem?
Hm, these produce oher unresolved bundles, this time regarding
Line 11: org.osgi.framework.BundleException: Could not resolve module: org.eclipse.fx.core.di.context [58]
Line 45: org.osgi.framework.BundleException: Could not resolve module: org.eclipse.fx.ui.workbench.fx [74]
Line 83: org.osgi.framework.BundleException: Could not resolve module: org.eclipse.fx.ui.workbench.renderers.fx [76]
....
Line 14: org.osgi.service.resolver.ResolutionException: Uses constraint violation. Unable to resolve resource org.eclipse.fx.core.di.context [osgi.identity; osgi.identity="org.eclipse.fx.core.di.context"; type="osgi.bundle"; version:Version="2.2.0.201510210603"] because it is exposed to package 'javax.annotation' from resources javax.annotation [osgi.identity; osgi.identity="javax.annotation"; type="osgi.bundle"; version:Version="1.2.0.v201401042248"] and org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.10.101.v20150820-1432"; singleton:="true"] via two dependency chains.
Line 52: org.osgi.service.resolver.ResolutionException: Uses constraint violation. Unable to resolve resource org.eclipse.fx.ui.workbench.renderers.base [osgi.identity; osgi.identity="org.eclipse.fx.ui.workbench.renderers.base"; type="osgi.bundle"; version:Version="2.2.0.201510210603"] because it is exposed to package 'javax.annotation' from resources javax.annotation [osgi.identity; osgi.identity="javax.annotation"; type="osgi.bundle"; version:Version="1.2.0.v201401042248"] and org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.10.101.v20150820-1432"; singleton:="true"] via two dependency chains.
Line 102: org.osgi.service.resolver.ResolutionException: Uses constraint violation. Unable to resolve resource org.eclipse.fx.ui.workbench.renderers.fx [osgi.identity; osgi.identity="org.eclipse.fx.ui.workbench.renderers.fx"; type="osgi.bundle"; version:Version="2.2.0.201510210603"] because it is exposed to package 'javax.annotation' from resources javax.annotation [osgi.identity; osgi.identity="javax.annotation"; type="osgi.bundle"; version:Version="1.2.0.v201401042248"] and org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.10.101.v20150820-1432"; singleton:="true"] via two dependency chains.
....
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.fx.core.di.context [58]
Unresolved requirement: Require-Bundle: org.eclipse.jdt.annotation; bundle-version="[2.0.0,3.0.0)"; resolution:="optional"
Bundle was not resolved because of a uses contraint violation.
org.osgi.service.resolver.ResolutionException: Uses constraint violation. Unable to resolve resource org.eclipse.fx.core.di.context [osgi.identity; osgi.identity="org.eclipse.fx.core.di.context"; type="osgi.bundle"; version:Version="2.2.0.201510210603"] because it is exposed to package 'javax.annotation' from resources javax.annotation [osgi.identity; osgi.identity="javax.annotation"; type="osgi.bundle"; version:Version="1.2.0.v201401042248"] and org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.10.101.v20150820-1432"; singleton:="true"] via two dependency chains.
Chain 1:
org.eclipse.fx.core.di.context [osgi.identity; osgi.identity="org.eclipse.fx.core.di.context"; type="osgi.bundle"; version:Version="2.2.0.201510210603"]
import: (&(osgi.wiring.package=javax.annotation)(version>=1.1.0))
|
export: osgi.wiring.package: javax.annotation
javax.annotation [osgi.identity; osgi.identity="javax.annotation"; type="osgi.bundle"; version:Version="1.2.0.v201401042248"]
Chain 2:
org.eclipse.fx.core.di.context [osgi.identity; osgi.identity="org.eclipse.fx.core.di.context"; type="osgi.bundle"; version:Version="2.2.0.201510210603"]
import: (&(osgi.wiring.package=com.google.common.base)(version>=15.0.0))
|
export: osgi.wiring.package=com.google.common.base; uses:=javax.annotation
com.google.guava [osgi.identity; osgi.identity="com.google.guava"; type="osgi.bundle"; version:Version="15.0.0.v201403281430"]
import: (osgi.wiring.package=javax.annotation)
|
export: osgi.wiring.package: javax.annotation
org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.10.101.v20150820-1432"; singleton:="true"]
at org.eclipse.osgi.container.Module.start(Module.java:434)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
Sorry, the log is quite long....
|
|
|
Re: org.eclipse.fx.core, guava, javax.activation and e4 resolution [message #1712105 is a reply to message #1712088] |
Wed, 21 October 2015 10:42 |
Thomas Schindl Messages: 6651 Registered: July 2009 |
Senior Member |
|
|
On 21.10.15 11:30, crothy donald wrote:
> Thank you once again for the quick response.
>
>> First of all yes. You should remove all javax.annotation imports to your
>> own bundles. Unfortunately some of our libs need to work as well in an
>> env where javax.annotation-bundle is available (fx.core is used also
>> inside the efxclipse-tooling) so we need to have the import package.
>
> I had removed all javax.annotation imports to my own bundles.
>
>> Does this happen only with the exported application or does the resolve
>> error happen as well in the IDE? If it happens in the IDE make sure you
>> check the "Clear the configuration area before launching".
>
> Yes, same error, from inside IDE. I had "clear configuration" checked.
You really need to get rid of the javax.annotation-*bundle* - the
imports in the end are not important. This is even more curcuial as you
remove the javax.annotation-imports.
>
>> Is the efxclipse updatesite the only one in your root-pom?
> No, unfortunatley, i need mars p2 repo and some own artifacts (nexus)
>
A quick for the problem in your IDE:
------------------------------------
You can go to the content tab and the target-platform dialog and
deselect javax.annotation. Important DO NOT deselect javax.annotation.jre.
The better solution (which I'd go forward for now):
---------------------------------------------------
Is most likely that you don't point towards mars but prepare you own
delta p2 repo who has all the stuff you really need from the mars repo
and you host that in your nexus or as a p2 site somewhere internally (I
do this for the code-editor-target-platform which eg requires jdt stuff).
The best solution:
------------------
The complete Eclipse SDK (and all Eclipse.org projects) get rid of the
shitty javax.annotation and javax.xml (did you know that all our stuff
still uses javax.xml from java 1.4!) require bundles because they are
available as part of the JRE.
The problem of javax.annotation is that the JRE only adopted half of the
annotations there.
The most future proof (if you ask me):
--------------------------------------
* Deprecate useage of @PostConstruct / @PreDestroy in e4
* Provide our own @PostInject / @PreDispose annotation
As we currently don't even fulfill the @PostConstruct API contract defined.
>> Would you mind giving the nightly target platform a try to see if this
>> would resolve your problem?
>
> Hm, these produce oher unresolved bundles, this time regarding
> Line 11: org.osgi.framework.BundleException: Could not resolve
> module: org.eclipse.fx.core.di.context [58]
> Line 45: org.osgi.framework.BundleException: Could not resolve
> module: org.eclipse.fx.ui.workbench.fx [74]
> Line 83: org.osgi.framework.BundleException: Could not resolve
> module: org.eclipse.fx.ui.workbench.renderers.fx [76]
>
[snip]
same problem, you need a target who does not contain
javax.annotation_1.2.0.v201401042248.jar unfortunately PDE adds bundle
much too greedy in your IDE when launching a feature-based product
definition!
Tom
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05869 seconds