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

Missing requirement: org.eclipse.rap.rwt.osgi 3.22.0.20220708-1200 requires 'java.package; javax.servlet [4.0.0,5.0.0)' but it could not be found #106

Closed
peat78 opened this issue Feb 1, 2023 · 3 comments
Labels
invalid This doesn't seem right

Comments

@peat78
Copy link

peat78 commented Feb 1, 2023

I'm referring to this PR => #34

After upgrading from RAP 3.21 to 3.22 our build breaks with the following error:

[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: cifc.rap.e3.feature.feature.group 2.0.1.qualifier
[ERROR]   Missing requirement: org.eclipse.rap.rwt.osgi 3.22.0.20220708-1200 requires 'java.package; javax.servlet [4.0.0,5.0.0)' but it could not be found
[ERROR]   Cannot satisfy dependency: cifc.rap.e3.feature.feature.group 2.0.1.qualifier depends on: org.eclipse.equinox.p2.iu; org.eclipse.rap.rwt.osgi 0.0.0

I found this comment in the PR:

I was able to fix the above error by setting the lower boundary of the javax.servlet import to be at least 4.0.0 in our org.eclipse.rap.rwt.osgi bundle. This seems to pass the higher version import to the compiler, and omits the one that doesn't provide the new methods that require implementations/overrides.

Originally posted by @mknauer in #34 (comment)

I'm building a WAR to run in Jetty with this docker command:

docker run --rm -it -p 8080:8080 -p 8443:8443 -p 8001:8001 -v $PWD/target/deployment/:/var/lib/jetty/webapps/ jetty:9-jre17 -Dlog4j.debug -Dorg.eclipse.jetty.http.LEVEL=ALL 

How can I fix this?

Thanks in advance!

Peat

@mknauer mknauer added the invalid This doesn't seem right label Feb 1, 2023
@mknauer
Copy link
Contributor

mknauer commented Feb 1, 2023

I've never tested these Jetty Docker images myself, but that seems to be a pretty nice idea.
Although...

Eclipse Jetty maintains a good list with their version numbers and the provided/supported API levels: www.eclipse.org/jetty/download.php

You were testing RAP 3.22 which requires a Servlet level 4.0 that is provided by Eclipse Jetty 10, but you are using a Docker image that includes only a Jetty 9 (probably a Jetty 9.4 which provides Servlet 3.1) in your command line.

In my test runs with the RAP demo applications everything started to work after switching to the jetty:10-jre17 Docker image. Eclipse Jetty version 10 is exactly the version that we are using for our own tests, and what we provide as part of our p2 repositories.

(And please keep in mind that Eclipse Jetty 11 with Servlet 5.0 is a change to the JakartaEE namespace, an incompatible switch of the API, and therefore is not expected to work #73.)

@mknauer mknauer closed this as completed Feb 1, 2023
@peat78
Copy link
Author

peat78 commented Feb 1, 2023

thanks for your answer, but the above error message (Missing requirement: org.eclipse.rap.rwt.osgi ...) comes from maven tycho build. So I cannot build my stuff anymore ... I guess I need to include a p2 repo + deps but could not figure out which one. Is there a reference project somewhere to look up?

@mknauer
Copy link
Contributor

mknauer commented Feb 1, 2023

Ah, yes, there is a Tycho build example, in fact it is the one I used for creating the .war files that I used for testing the above Jetty Docker images.

In the releng project org.eclipse.rap.examples.build you'll find instructions on how to run the build itself. It also contains the pom files for the three demo war projects in subdirectories, and I'd suggest you look into org.eclipse.rap.examples.build/rapdemo.

There you'll find the pom.xml, and especially the product definition in org.eclipse.rap.examples.rapdemo.product with all the dependencies, and assembly.xml that explicitly excludes the API bundles when assembling the final war file.

The idea of the Eclipse RAP p2 repositories is that they are self-contained, i.e. https://download.eclipse.org/rt/rap/3.22/R-20220906-0913/ is expected to contain everything you'll need (unless we do miss something by accident).

I hope that helps...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants