Closed jgneff closed 2 years ago
See the Launchpad question "Build can't resolve www.w3.org (NXDOMAIN)" for more background information.
Curious what implications there might be for this at runtime in some environments too?
I wondered why you were hitting this problem - first time I've looked at strictly-netbeans - interesting!
Feel free to open a PR with this change against delivery
. No guarantees it'll get in at this stage, though, unless it or something else gets prioritised to force another rc.
Curious what implications there might be for this at runtime in some environments too?
I would be grateful to have a comment from Josh Juneau (@juneau001) or José Contreras (@pepness) on this issue or my follow-up pull request. It's just a one-line change, but there is more than one version of the xml.xsd
file available from the W3C. The current local copy in the build appears to work for all versions of J2EE 1.4, JavaEE 5-8, and Jakarta 9, but perhaps we should replace it with the latest version.
See the section "Versioning policy for this schema document" at the very bottom of the page at Schema document for namespace http://www.w3.org/XML/1998/namespace.
I wondered why you were hitting this problem - first time I've looked at strictly-netbeans - interesting!
Yes, I was very surprised to get it working at all! I think even the Gradle issue can be fixed. But I hit this issue just from building on the Launchpad build farm, which anyone might want to do even for other packaging formats.
No guarantees it'll get in at this stage, though, unless it or something else gets prioritised to force another rc.
I have a workaround for now (-Dcluster.config=basic
). When I build that way, I get "Available Plugins (38)" in the Plugins dialog. It seems those are the same module plugins that were built and included directly when I built with -Dcluster.config=release
. It's just that now I'm getting them from the plugins portal. Is that right?
Thanks for making this PR. I was also wondering why you may have hit this issue, but being in a restricted environment, I've had issues with Maven POMs in the past as well...not particularly caused by this issue however.
The only issue I foresee is keeping up with the latest xml.xsd, but since it does not change very frequently we should be okay to move forward with this PR and document the change.
Thanks @jgneff we appreciate your time and assistance!
Apache NetBeans version
Apache NetBeans 16 release candidate
What happened
The new file
jakartaee_9.xsd
in NetBeans 16 causes a direct DNS lookup during the build. No DNS lookups occurred in the builds for NetBeans 13, 14, or 15. The DNS request causes the build to fail when running behind a strict firewall that allows outbound traffic only through an HTTP or HTTPS proxy server.The failure occurs while building the
nb.cluster.enterprise
modules. The build fails with the following messages:The full stack trace is shown below:
java.net.UnknownHostException: www.w3.org
``` java.net.UnknownHostException: www.w3.org at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:229) at java.base/java.net.Socket.connect(Socket.java:609) at java.base/java.net.Socket.connect(Socket.java:558) at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:182) at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:508) at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:603) at java.base/sun.net.www.http.HttpClient.How to reproduce
Build NetBeans 16 or later on a machine that blocks DNS traffic on port 53.
Did this work correctly in an earlier version?
Apache NetBeans 15
Operating System
Kernel version: Linux lcy02-amd64-048 5.4.0-128-generic #144-Ubuntu SMP Tue Sep 20 11:00:04 UTC 2022 x86_64
JDK
Java version: 11.0.16
Apache NetBeans packaging
Own source build
Anything else
There's a one-line fix:
That change causes the file
jakartaee_9.xsd
to import its schema locally like the previous versions:in the following files:
Are you willing to submit a pull request?
Yes
Code of Conduct
Yes