Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build RCP application after update to 6.3.0 #154

Closed
selundqma opened this issue Aug 9, 2022 · 7 comments
Closed

Cannot build RCP application after update to 6.3.0 #154

selundqma opened this issue Aug 9, 2022 · 7 comments
Milestone

Comments

@selundqma
Copy link

Hi! Thank you for all your important work! I have been using your plugins for many years and they have been GREAT :). Now I contact you to hopefully get an hint why my Eclipse RCP application (building with Maven and Tycho 2.7.4) build does not succeed after going from 6.2.8 to 6.3.0 of the woodstox-core plugin. That is the ONLY change I did.

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:2.7.4:validate-classpath (default-validate-classpath) on project com.selundqma.cs.ma.client.bordet: Execution default-validate-classpath of goal org.eclipse.tycho:tycho-compiler-plugin:2.7.4:validate-classpath failed: org.osgi.framework.BundleException: Bundle com.selundqma.cs.ma.client.bordet cannot be resolved:com.selundqma.cs.ma.client.bordet [181]
[ERROR] Unresolved requirement: Require-Bundle: com.sun.xml.ws.jaxws-rt
[ERROR] -> Bundle-SymbolicName: com.sun.xml.ws.jaxws-rt; bundle-version="4.0.0"
[ERROR] com.sun.xml.ws.jaxws-rt [149]
[ERROR] Unresolved requirement: Import-Package: com.sun.xml.ws.assembler.metro.jaxws; resolution:="optional"
[ERROR] Unresolved requirement: Import-Package: com.ctc.wstx.stax; version="[6.2.0,7.0.0)"
[ERROR] -> Export-Package: com.ctc.wstx.stax; bundle-symbolic-name="com.fasterxml.woodstox.woodstox-core"; bundle-version="6.3.0"; version="6.3.0"
[ERROR] com.fasterxml.woodstox.woodstox-core [106]
[ERROR] Unresolved requirement: Import-Package: com.sun.msv.grammar; version="[2013.6.0,2014.0.0)"; resolution:="optional"
[ERROR] Unresolved requirement: Import-Package: com.sun.msv.grammar.trex; version="[2013.6.0,2014.0.0)"; resolution:="optional"
[ERROR] Unresolved requirement: Import-Package: com.sun.msv.grammar.xmlschema; version="[2013.6.0,2014.0.0)"; resolution:="optional"
[ERROR] Unresolved requirement: Import-Package: com.sun.msv.reader; version="[2013.6.0,2014.0.0)"; resolution:="optional"
[ERROR] Unresolved requirement: Import-Package: com.sun.msv.reader.trex.ng; version="[2013.6.0,2014.0.0)"; resolution:="optional"
[ERROR] Unresolved requirement: Import-Package: com.sun.msv.reader.util; version="[2013.6.0,2014.0.0)"; resolution:="optional"
[ERROR] Unresolved requirement: Import-Package: com.sun.msv.reader.xmlschema; version="[2013.6.0,2014.0.0)"; resolution:="optional"
[ERROR] Unresolved requirement: Import-Package: com.sun.msv.util; version="[2013.6.0,2014.0.0)"; resolution:="optional"
[ERROR] Unresolved requirement: Import-Package: com.sun.msv.verifier; version="[2013.6.0,2014.0.0)"; resolution:="optional"
[ERROR] Unresolved requirement: Import-Package: com.sun.msv.verifier.regexp; version="[2013.6.0,2014.0.0)"; resolution:="optional"
[ERROR] Unresolved requirement: Import-Package: com.sun.msv.verifier.regexp.xmlschema; version="[2013.6.0,2014.0.0)"; resolution:="optional"
[ERROR] Unresolved requirement: Import-Package: org.relaxng.datatype; resolution:="optional"
[ERROR] Unresolved requirement: Require-Capability: osgi.extender; filter:="(&(osgi.extender=osgi.serviceloader.registrar)(version>=1.0.0)(!(version>=2.0.0)))"
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

@cowtowncoder
Copy link
Member

Hmmh. Unfortunately I do not know much about OSGi so I don't immediately know what might be causing this, or how to resolve the issue.

Looking at release notes I suspect that this is related to one or both of:

So maybe looking through those could help.

@cowtowncoder
Copy link
Member

@chrisr3 I wonder if you might know what is going in here?

@chrisr3
Copy link
Contributor

chrisr3 commented Aug 10, 2022

@chrisr3 I wonder if you might know what is going in here?

OSGi is saying that it would like you also to install something to provide the osgi.serviceloader.registrar capability. In other words, Apache Aries SPI-Fly:

org.apache.aries.spifly:org.apache.aries.spifly.dynamic.framework.extension:1.3.5

Just adding this bundle into the application should fix everything.

As an aside, we should also be able to make this requirement "optional" - I'll create a PR to do that too.

Edit: See #155.

@selundqma
Copy link
Author

selundqma commented Aug 10, 2022

Now we are talking! It works by adding the suggested POM dependency:

org.apache.aries.spifly:org.apache.aries.spifly.dynamic.framework.extension:1.3.5

Thank you very much! I hope you can add this dependency to your project so that all people get it automatically. Or, document that it is needed for some OSGI builds :).

AND! A big big thank you for investigating the issue so quickly! Sending some love to you from Sweden!

@chrisr3
Copy link
Contributor

chrisr3 commented Aug 10, 2022

Thank you very much! I hope you can add this dependency to your project so that all people get it automatically. Or, document that it is needed for some OSGI builds :).

SPI-Fly is only needed by OSGi frameworks, and even then only to make the META-INF/services/* files accessible to ServiceLoader. So adding it as a dependency to woodstox-core may be "overkill" 😉. I am suggesting making the requirement "optional" instead so that people who want to use ServiceLoader still can, but everyone else can continue as usual.

And to be clear: no-one using woodstox-core:6.3.0 outside of an OSGi framework will have this issue.

@selundqma
Copy link
Author

Thanks for the clarification! I agree, making the requirement "optional" will help a lot and will do the work! Thanks again for everything :).

@cowtowncoder
Copy link
Member

Ok, I think that with merging of #155 this may be closed. I hope to get Woodstox 6.3.1 patch out soon which should work around the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants