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

JstlTest failure with JDK 9 #1817

Closed
sbordet opened this issue Sep 13, 2017 · 3 comments
Closed

JstlTest failure with JDK 9 #1817

sbordet opened this issue Sep 13, 2017 · 3 comments
Assignees

Comments

@sbordet
Copy link
Contributor

sbordet commented Sep 13, 2017

@janbartel, can you please review JstlTest when using JDK 9 to run the tests ? It fails with:

org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application

I have currently "disabled" the test for JDK 9 only using JUnit's Assume. Feel free to remove it when the test works with JDK 9 as well

@sbordet sbordet added the jdk9 label Sep 13, 2017
sbordet added a commit that referenced this issue Sep 13, 2017
Disabled test for JDK 9.
@janbartel
Copy link
Contributor

The test will need to remain disabled in jetty-9.

The problem is that with jdk-9, the system classloader is not a URLClassLoader and thus cannot be interrogated for its urls. This is a technique that our o.e.j.webapp.WebInfConfiguration class uses to find the urls of jars on the server's classpath, and apply user-defined patterns that control the ordering/inclusions of jars to scan for tags, resources, web-fragment.xmls and annotations.

This works fine with jdk-9 for the jetty-maven plugin because maven's ClassRealm classloader is a URLClassLoader. The distribution also works fine with jdk-9 because start.jar creates its own URLClassloader to be the parent of the webapp.

However it will fail on probably almost every embedded environment.

This will need some thought to fix, and probably help from jdk-9 apis, so won't be possible to fix in jetty-9.

@gregw
Copy link
Contributor

gregw commented Sep 14, 2017

I'm guessing it will also fail if start.jar runs in exec mode, as it will not have the URLClassloader.

So with java9, we cannot scan any jars that are on the system classpath? Hmmm we may need to reconsider our basic class loading and start mechanism more than we'd thought :(

@janbartel
Copy link
Contributor

Re-established the JstTest after fixing issue #1933

janbartel added a commit that referenced this issue Nov 22, 2017
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