gpt4 book ai didi

java - 如何在jboss 7中部署用java 1.8编译的war

转载 作者:行者123 更新时间:2023-11-30 03:23:13 26 4
gpt4 key购买 nike

我已将之前的 java 1.7 中的 Web 应用程序升级到了 java 1.8。然而,当我尝试在 jboss 7 中部署它的 war 时,我收到以下异常。

[jbossweb-7.0.13.Final.jar:]    at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.13.Final.jar:]    at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_17]    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_17]    at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17]18:49:41,659 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/nlp_Server]] (MSC service thread 1-8) Skipped installing application listeners due to previous error(s)18:49:41,659 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-8) Error listenerStart18:49:41,659 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-8) Context [/nlp_Server] startup failed due to previous errors18:49:41,675 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC00001: Failed to start service jboss.web.deployment.default-host./nlp_Server: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./nlp_Server: JBAS018040: Failed to start context    at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:95)    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_17]    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_17]    at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17]18:49:41,675 INFO  [org.jboss.as] (MSC service thread 1-4) JBAS015951: Admin console listening on http://127.0.0.1:999018:49:41,675 ERROR [org.jboss.as] (MSC service thread 1-4) JBAS015875: JBoss AS 7.1.1.Final "Brontes" started (with errors) in 4540ms - Started 213 of 294 services (2 services failed or missing dependencies, 78 services are passive or on-demand)18:49:41,909 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "nlp_Server.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.web.deployment.default-host./nlp_Server" => "org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./nlp_Server: JBAS018040: Failed to start context"}}18:49:41,924 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015871: Deploy of deployment "MemberManagement.war" was rolled back with no failure message18:49:41,971 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015877: Stopped deployment MemberManagement.war in 48ms18:49:42,018 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015877: Stopped deployment nlp_Server.war in 128ms18:49:42,018 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status reportJBAS014777:   Services which failed to start:      service jboss.web.deployment.default-host./nlp_Server: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./nlp_Server: JBAS018040: Failed to start context18:49:42,018 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS014654: Composite operation was rolled back18:49:42,018 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.web.deployment.default-host./nlp_Server" => "org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./nlp_Server: JBAS018040: Failed to start context"}}}}18:49:44,732 INFO  [org.jboss.as.osgi] (MSC service thread 1-8) JBAS011942: Stopping OSGi Framework

同样的 war 正在 tomcat 中成功部署。

最佳答案

您的 Jboss 似乎在 JDK 7 上运行。

来自您的日志:

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_17]

但是您使用 JDK 8 编译源代码,因此 JDK7 无法运行 JDK 8 编译的代码。

编译源代码时请添加源和目标。

例如javac -源 1.7 -目标 1.7

关于java - 如何在jboss 7中部署用java 1.8编译的war,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30833421/

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