gpt4 book ai didi

java - 野蝇中的 headless 异常

转载 作者:行者123 更新时间:2023-12-01 12:11:58 25 4
gpt4 key购买 nike

我正在尝试开发一个应用程序,其中需要向我的主管显示我的日志,在 Wildfly 应用程序服务器上部署时,我遇到了 Headless Exception。

9:26:45,480 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./RealStreamer: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./RealStreamer: Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_25]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_25]
Caused by: java.lang.RuntimeException: java.awt.HeadlessException
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:219)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:87)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.start(UndertowDeploymentService.java:72)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
... 3 more
Caused by: java.awt.HeadlessException
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207) [rt.jar:1.8.0_25]
at java.awt.Window.<init>(Window.java:536) [rt.jar:1.8.0_25]
at java.awt.Frame.<init>(Frame.java:420) [rt.jar:1.8.0_25]
at java.awt.Frame.<init>(Frame.java:385) [rt.jar:1.8.0_25]
at javax.swing.JFrame.<init>(JFrame.java:181) [rt.jar:1.8.0_25]
at com.prodigy4440.sever.ServerJFrame.<init>(ServerJFrame.java:28)
at com.prodigy4440.sever.Hook.contextInitialized(Hook.java:27)
at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:173)
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:190)
... 7 more

最佳答案

您的应用程序似乎需要一些 Xserver 资源:也许您正在生成图像或类似的东西。 https://docs.oracle.com/javase/7/docs/api/java/awt/HeadlessException.html也许你应该在 headless 模式下运行:http://www.oracle.com/technetwork/articles/javase/headless-136834.html或者安装图形服务器(也许只是 libs iirc)。

关于java - 野蝇中的 headless 异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27216968/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com