OpenNTF / p2-layout-provider

Java web app that serves as a basic proxy to provide a Maven repository front-end to p2 (Eclipse-style) repositories
Apache License 2.0
7 stars 5 forks source link

Problem with Java 16? #31

Closed reckart closed 3 years ago

reckart commented 3 years ago

When I use the resolver in conjunction with Azul JDK Java 16, no downloads are being made and the build fails saying that the bundles I need from P2 are not obtained.

At the moment I switch to another Java (e.g. Azul JDK Java 15), the downloads work.

In both cases, using plain default Maven - no custom settings.xml.

P2 URL being used in both cases http://download.eclipse.org/releases/2018-12/

jesse-gallagher commented 3 years ago

Hmm, I'll have to check on that. In the mean time, is it consistent over time? I ask because I'm working on an older Tycho-based project using Java 8 at the moment and have been seeing INFO output like this today:

[INFO] Adding repository http://download.eclipse.org/releases/neon
[INFO] Fetching p2.index from http://download.eclipse.org/technology/epp/packages/neon/ (142B)
[INFO] Fetching p2.index from http://download.eclipse.org/releases/neon/201705151400/ (142B)
Mar 18, 2021 12:06:39 PM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (org.apache.http.NoHttpResponseException) caught when processing request to {}->http://download.eclipse.org:80: The target server failed to respond
Mar 18, 2021 12:06:39 PM org.apache.http.impl.execchain.RetryExec execute

It could be that both are suffering from intermittent trouble on Eclipse's side this morning.

reckart commented 3 years ago

Within the time of a 1-2 minutes or so, I have run with Java 15 - download works; Java 16 - cannot resolve dependency - back to Java 15; download continues.

reckart commented 3 years ago

And yes, it is consistent over time. I have spent quite a while now with different approaches to try figuring out why my builds suddenly do not work anymore - or at least not in all situations - and eventually seemed to be able to narrow it down to the Java version. I also had a Java 8 in the mix which worked.

jesse-gallagher commented 3 years ago

Gotcha - I'll look into it.

reckart commented 3 years ago

I also had the suspicion that it could be an SSL issue, but switching the P2 repo from https to http hadn't fixed the problem either.

jesse-gallagher commented 3 years ago

Though I haven't yet had the chance to fix this, I can at least verify that I see the same thing here: my example project will fetch dependencies and compile without issue on Java 15, but fails to resolve+download dependencies on Java 16, and there's no clear error as to why it's not succeeding.

jesse-gallagher commented 3 years ago

The trouble is to do with the XML utility library I'm using - it runs afoul of internal-class-loading restrictions that they tightened in Java 16. I'll swap it out for different XML handling.

jesse-gallagher commented 3 years ago

@reckart I've pushed up a build of 1.3.0-SNAPSHOT that changes the way it handles XML, and it appears to work better on my end. When you have a chance, could you give it a shot?

reckart commented 3 years ago

@jesse-gallagher I have built the develop branch manually and tested it in my build with Java 16: works!

jesse-gallagher commented 3 years ago

Excellent! Glad to hear it.

jesse-gallagher commented 3 years ago

I've deployed a non-snapshot version 1.3.0, which includes this fix.