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

Jetty 10 standalone cannot start on the module-path #3333

Closed
sbordet opened this issue Feb 6, 2019 · 8 comments
Closed

Jetty 10 standalone cannot start on the module-path #3333

sbordet opened this issue Feb 6, 2019 · 8 comments

Comments

@sbordet
Copy link
Contributor

sbordet commented Feb 6, 2019

Since now Jetty 10 has proper module-info.java, when it is started in standalone mode, the only JPMS modules that are in the root are org.eclipse.jetty.xml and those specified by explicit [jpms] sections in *.mod files such as org.objectweb.asm and java.instrument.

With Jetty 9.4 and Automatic-Module-Name, the JPMS modules were automatically added to the module-path because the jars did not have an explicit module-info.java.

@sbordet
Copy link
Contributor Author

sbordet commented Feb 6, 2019

@olamy is there a way to write an integration test that runs Jetty standalone on the module path and verifies that it starts a minimal configuration?

@sbordet
Copy link
Contributor Author

sbordet commented Feb 6, 2019

A possible quick solution would be to add --add-modules=ALL-MODULE-PATH

@olamy
Copy link
Member

olamy commented Feb 7, 2019

How do I have to start Jetty to reproduce that?
From distro?
java -jar start.jar ?

@sbordet
Copy link
Contributor Author

sbordet commented Feb 7, 2019

@olamy yes a distro should start with:

java -jar start.jar --jpms

Have at least one web application deployed, make a request to verify it's working, then shutdown.

Is that possible?
If so, do it in jetty-9.4.x where it should work.
In jetty-10.0.x is broken for sure, until we merge #3168, so you may merge forward your test but @Ignore it.

sbordet added a commit that referenced this issue Feb 7, 2019
Added --add-modules=ALL-MODULE-PATH by default because now Jetty has
proper JPMS modules and when starting in standalone mode only the
org.eclipse.jetty.xml module will be in the module graph - while
before automatic modules where added to the module graph implicitly.

Added --add-reads=ALL-UNNAMED to the websocket module to allow the
websocket implementation to access method handles of application
classes (the websocket endpoints) that live in the web application
classloader (which forms an unnamed module).

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
@sbordet
Copy link
Contributor Author

sbordet commented Feb 7, 2019

@olamy I pushed a fix in #3338. It would still need a test case.

@olamy
Copy link
Member

olamy commented Feb 8, 2019

possible? not exactly as I wish (but I have to finish the way of doing some distro testing...)
Anyway I can do this with the current maven plugin...

sbordet added a commit that referenced this issue Feb 8, 2019
Fixes #3333 - Jetty 10 standalone cannot start on the module-path.
@sbordet
Copy link
Contributor Author

sbordet commented Feb 8, 2019

@olamy we really need to be able to test the distro: minimal startup, http, http2, jpms, websocket, jsp at least to be sure we have not broken anything.

If you can test the Jetty Maven Plugin we should be able to test also the distro, no?

@olamy
Copy link
Member

olamy commented Feb 10, 2019

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

2 participants