Wildfly org.jboss.nio -> FileNotFoundException: Invalid file path with Windows Java JDK 11.0.15+10
Asked Answered
F

3

11

Since the update to Eclipse Tamurin JDK 11.0.15+10 we notice a problem as soon a HTTP request reaches Wildfly 20.0.1.Final. The same behaviour exsists in Wildfly 26.1.0.Final This only happens with the JDK Windows version, the Linux JDK works fine. As it is an "Invalid file path" error, an OS dependent BUG seems possible.

Until now SAP Machine is the only JDK that does not encounter this failure.

I'm still not sure if this is a JDK or a Wildfly problem...

You can check that when opening the Wildfly Management Interface.

ERROR [io.undertow.request] (External Management Request Threads -- 1) UT005071: Undertow request failed HttpServerExchange{ GET /management}: java.io.IOError: java.io.FileNotFoundException: Invalid file path
    at [email protected]//org.xnio.channels.Channels$4.run(Channels.java:1103)
    at [email protected]//org.xnio.channels.Channels$4.run(Channels.java:1093)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at [email protected]//org.xnio.channels.Channels.<clinit>(Channels.java:1093)
    at [email protected]//io.undertow.io.UndertowOutputStream.write(UndertowOutputStream.java:231)
    at [email protected]//io.undertow.io.BlockingSenderImpl.writeBuffer(BlockingSenderImpl.java:245)
    at [email protected]//io.undertow.io.BlockingSenderImpl.writeBuffer(BlockingSenderImpl.java:238)
    at [email protected]//io.undertow.io.BlockingSenderImpl.send(BlockingSenderImpl.java:75)
    at [email protected]//io.undertow.io.BlockingSenderImpl.send(BlockingSenderImpl.java:107)
    at [email protected]//org.jboss.as.domain.http.server.DomainUtil.writeResponse(DomainUtil.java:89)
    at [email protected]//org.jboss.as.domain.http.server.DomainApiHandler$1.doSendResponse(DomainApiHandler.java:177)
    at [email protected]//org.jboss.as.domain.http.server.ResponseCallback.sendResponse(ResponseCallback.java:32)
    at [email protected]//org.jboss.as.domain.http.server.DomainApiHandler.handleRequest(DomainApiHandler.java:232)
    at [email protected]//io.undertow.server.handlers.encoding.EncodingHandler.handleRequest(EncodingHandler.java:72)
    at [email protected]//org.jboss.as.domain.http.server.DomainApiCheckHandler.handleRequest(DomainApiCheckHandler.java:91)
    at [email protected]//org.jboss.as.domain.http.server.security.ElytronIdentityHandler.lambda$handleRequest$0(ElytronIdentityHandler.java:62)
    at [email protected]//org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:328)
    at [email protected]//org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:285)
    at [email protected]//org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:254)
    at [email protected]//org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:225)
    at [email protected]//org.jboss.as.domain.http.server.security.ElytronIdentityHandler.handleRequest(ElytronIdentityHandler.java:61)
    at [email protected]//io.undertow.server.handlers.BlockingHandler.handleRequest(BlockingHandler.java:56)
    at [email protected]//io.undertow.server.Connectors.executeRootHandler(Connectors.java:370)
    at [email protected]//io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)
    at [email protected]//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
    at [email protected]//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
    at [email protected]//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
    at [email protected]//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1348)
    at java.base/java.lang.Thread.run(Thread.java:829)
    at [email protected]//org.jboss.threads.JBossThread.run(JBossThread.java:485)
Caused by: java.io.FileNotFoundException: Invalid file path
    at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:231)
    at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:126)
    at [email protected]//org.xnio.channels.Channels$4.run(Channels.java:1098)
    ... 29 more
JDK Works with Wildfly
Eclipse Tamurin no
Amazon Coretto no
Azul Zulu no
Bellsoft no
Oracle OpenJDK no
Oracle JDK no
SAP Machine yes
Footwork answered 28/4, 2022 at 8:1 Comment(3)
This is also discussed here, if someone has a Red Hat subscription: access.redhat.com/solutions/6953431Footwork
Related to JDK-8285445 (Cannot open file "NUL:", JDK 11.0.15 on Windows), perhaps? In that case it could maybe be mitigated by setting up a logging file-handler to "NUL" (without the colon). Scheduled to be fixed in 11.0.16.Katharinakatharine
Thanks @Katharinakatharine for finding this. I would accept his as an answer if you post it :)Footwork
M
8

This is an issue in the JDK. You can wait for JDK 11.0.16 or downgrade to a lower version like JDK 11.0.14.

Merell answered 1/6, 2022 at 16:15 Comment(0)
T
4

This is caused by a known JDK bug. You can work around the issue by setting Djdk.io.File.enableADS system property. In Intellij go to Run -> Edit configurations and paste -Djdk.io.File.enableADS=true in VM Options field.

Trapes answered 13/7, 2022 at 22:24 Comment(1)
It works but what does this property do?Captive

© 2022 - 2024 — McMap. All rights reserved.