jfinal访问出错

JFinal-3.8 action report -------- 2019-04-20 11:10:04 --------------------------

Url         : GET /hello

Controller  : bg.bmnsp.controller.Exclecontroller.(Exclecontroller.java:1)

Method      : index

--------------------------------------------------------------------------------

四月 20, 2019 11:10:04 上午 io.undertow.server.Connectors executeRootHandler

ERROR: UT005071: Undertow request failed HttpServerExchange{ GET /hello request {Connection=[keep-alive], Accept=[text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8], Accept-Language=[zh-CN,zh;q=0.9], Accept-Encoding=[gzip, deflate, br], User-Agent=[Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36], Upgrade-Insecure-Requests=[1], Host=[localhost:8082]} response {Expires=[Thu, 01 Jan 1970 00:00:00 GMT], Connection=[keep-alive], Cache-Control=[no-cache], Server=[JFinal], Pragma=[no-cache], Content-Type=[text/plain;charset=UTF-8], Content-Length=[19], Date=[Sat, 20 Apr 2019 03:10:04 GMT]}}

java.io.IOError: java.io.FileNotFoundException: NUL: (系统找不到指定的文件。)

at org.xnio.conduits.Conduits$1.run(Conduits.java:237)

at org.xnio.conduits.Conduits$1.run(Conduits.java:227)

at java.security.AccessController.doPrivileged(Native Method)

at org.xnio.conduits.Conduits.<clinit>(Conduits.java:227)

at io.undertow.conduits.AbstractFixedLengthStreamSinkConduit.writeFinal(AbstractFixedLengthStreamSinkConduit.java:175)

at org.xnio.conduits.ConduitStreamSinkChannel.writeFinal(ConduitStreamSinkChannel.java:104)

at io.undertow.channels.DetachableStreamSinkChannel.writeFinal(DetachableStreamSinkChannel.java:195)

at io.undertow.server.HttpServerExchange$WriteDispatchChannel.writeFinal(HttpServerExchange.java:2082)

at io.undertow.servlet.spec.ServletOutputStreamImpl.writeBufferBlocking(ServletOutputStreamImpl.java:572)

at io.undertow.servlet.spec.ServletOutputStreamImpl.close(ServletOutputStreamImpl.java:609)

at io.undertow.servlet.spec.ServletPrintWriter.close(ServletPrintWriter.java:117)

at io.undertow.servlet.spec.ServletPrintWriterDelegate.close(ServletPrintWriterDelegate.java:81)

at io.undertow.servlet.spec.HttpServletResponseImpl.closeStreamAndWriter(HttpServletResponseImpl.java:480)

at io.undertow.servlet.spec.HttpServletResponseImpl.responseDone(HttpServletResponseImpl.java:575)

at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:351)

at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)

at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)

at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)

at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)

at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)

at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)

at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)

at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)

at io.undertow.server.Connectors.executeRootHandler(Connectors.java:364)

at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

at java.lang.Thread.run(Thread.java:745)

Caused by: java.io.FileNotFoundException: NUL: (系统找不到指定的文件。)

at java.io.FileOutputStream.open0(Native Method)

at java.io.FileOutputStream.open(FileOutputStream.java:270)

at java.io.FileOutputStream.<init>(FileOutputStream.java:213)

at java.io.FileOutputStream.<init>(FileOutputStream.java:101)

at org.xnio.conduits.Conduits$1.run(Conduits.java:232)

... 27 more

还有这个错误

JFinal-3.8 action report -------- 2019-04-20 11:10:04 --------------------------

Url         : GET /hello

Controller  : bg.bmnsp.controller.Exclecontroller.(Exclecontroller.java:1)

Method      : index

--------------------------------------------------------------------------------

四月 20, 2019 11:10:04 上午 io.undertow.server.Connectors executeRootHandler

ERROR: UT005071: Undertow request failed HttpServerExchange{ GET /hello request {Connection=[keep-alive], Accept=[text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8], Accept-Language=[zh-CN,zh;q=0.9], Accept-Encoding=[gzip, deflate, br], User-Agent=[Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36], Upgrade-Insecure-Requests=[1], Host=[localhost:8082]} response {Expires=[Thu, 01 Jan 1970 00:00:00 GMT], Connection=[keep-alive], Cache-Control=[no-cache], Server=[JFinal], Pragma=[no-cache], Content-Type=[text/plain;charset=UTF-8], Content-Length=[19], Date=[Sat, 20 Apr 2019 03:10:04 GMT]}}

java.lang.NoClassDefFoundError: Could not initialize class org.xnio.conduits.Conduits

at io.undertow.conduits.AbstractFixedLengthStreamSinkConduit.writeFinal(AbstractFixedLengthStreamSinkConduit.java:175)

at org.xnio.conduits.ConduitStreamSinkChannel.writeFinal(ConduitStreamSinkChannel.java:104)

at io.undertow.channels.DetachableStreamSinkChannel.writeFinal(DetachableStreamSinkChannel.java:195)

at io.undertow.server.HttpServerExchange$WriteDispatchChannel.writeFinal(HttpServerExchange.java:2082)

at io.undertow.servlet.spec.ServletOutputStreamImpl.writeBufferBlocking(ServletOutputStreamImpl.java:572)

at io.undertow.servlet.spec.ServletOutputStreamImpl.close(ServletOutputStreamImpl.java:609)

at io.undertow.servlet.spec.ServletPrintWriter.close(ServletPrintWriter.java:117)

at io.undertow.servlet.spec.ServletPrintWriterDelegate.close(ServletPrintWriterDelegate.java:81)

at io.undertow.servlet.spec.HttpServletResponseImpl.closeStreamAndWriter(HttpServletResponseImpl.java:480)

at io.undertow.servlet.spec.HttpServletResponseImpl.responseDone(HttpServletResponseImpl.java:575)

at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:351)

at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)

at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)

at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)

at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)

at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)

at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)

at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)

at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)

at io.undertow.server.Connectors.executeRootHandler(Connectors.java:364)

at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

at java.lang.Thread.run(Thread.java:745)

浏览器访问时会不断发起请求,控制台一直报错,什么原因的?求大神解答。。。。

评论区

JFinal

2019-04-20 11:45

参考这个贴子中的回复:
http://www.jfinal.com/feedback/5217

大致原因是:
问题出在xnio包里底层代码执行new FileOutputStream("NUL:").getChannel(); 的时候报错,最后检查发现是我的系统null.sys文件异常导致,重新下载null.sys文件覆盖然后启动windows服务后就好了

JFinal

2019-04-20 11:45

这个问题纯粹是操作系统的原因,与 jfinal 无关

惺忪忪

2019-04-20 12:00

@JFinal 好的,那我去试试!

zhuzhuAAA

2019-04-20 15:47

@JFinal Jfinal里面怎么建立Model.Vo层 有必要吗 还是说有更简单的方法

JFinal

2019-04-21 09:45

@zhuzhuAAA 下载本站首页的 jfinal demo for maven,里头有一个生成器的 demo , 改改输出目录用上就好

生成出来的类,既包括 Model 也包括 Vo 层

zhuzhuAAA

2019-04-22 14:16

热门反馈

扫码入社