Wildfly:应用程序已部署但未部署 运行
Wildfly : application deployed but not running
我正在尝试将 .ear 应用程序部署到 Wildfly 10.1 final。 .ear 有 2 个嵌套的 .war 文件。 .war 文件中没有 "jboss-web.xml" 文件。
这是 application.xml 文件:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC
"-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
"http://java.sun.com/dtd/application_1_3.dtd">
<application>
<display-name>myApp-ear</display-name>
<description>myApp</description>
<module>
<web>
<web-uri>myApp-rest</web-uri>
<context-root>/myApp-rest</context-root>
</web>
</module>
<module>
<web>
<web-uri>myApp-webapp</web-uri>
<context-root>/myApp-webapp</context-root>
</web>
</module>
</application>
部署后,我有以下日志:
INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0004: Found myApp.ear in deployment directory. To trigger deployment create a file called myApp.ear.dodeploy
INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0027: Starting deployment of "myApp.ear" (runtime-name: "myApp.ear")
WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0059: Class Path entry lib/snakeyaml-1.13.jar in /C:/Dev/Wildfly/wildfly-10.1.0.Final/standalone/deployments/myApp.ear/liquibase-core-3.3.0.jar does not point to a valid jar for a Class-Path reference.
(...)
INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0207: Starting subdeployment (runtime-name: "myApp-rest")
INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0207: Starting subdeployment (runtime-name: "myApp-webapp")
INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) WFLYSRV0010: Deployed "myApp.ear" (runtime-name : "myApp.ear")
仅此而已,日志中没有 "register" 之类的东西。
因此,每当我尝试访问 "localhost:8080/myApp-webapp" 时,都会出现 404 错误。
该应用程序之前部署在 Weblogic 11 上(具有相同的配置)并且运行良好。
有线索吗?
根据以下日志消息,您的 EAR 内容似乎缺少适当的文件扩展名
INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0207: Starting subdeployment (runtime-name: "myApp-rest")
INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0207: Starting subdeployment (runtime-name: "myApp-webapp")
INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) WFLYSRV0010: Deployed "myApp.ear" (runtime-name : "myApp.ear")
特别注意 myApp-rest
和 myApp-webapp
。即使这是一个展开的部署,它们都应该有一个 .war
扩展名。 (请注意,如果 myApp-rest
只是一个 EJB 模块,它可能有一个 .jar
扩展名。)
我正在尝试将 .ear 应用程序部署到 Wildfly 10.1 final。 .ear 有 2 个嵌套的 .war 文件。 .war 文件中没有 "jboss-web.xml" 文件。
这是 application.xml 文件:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC
"-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
"http://java.sun.com/dtd/application_1_3.dtd">
<application>
<display-name>myApp-ear</display-name>
<description>myApp</description>
<module>
<web>
<web-uri>myApp-rest</web-uri>
<context-root>/myApp-rest</context-root>
</web>
</module>
<module>
<web>
<web-uri>myApp-webapp</web-uri>
<context-root>/myApp-webapp</context-root>
</web>
</module>
</application>
部署后,我有以下日志:
INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0004: Found myApp.ear in deployment directory. To trigger deployment create a file called myApp.ear.dodeploy
INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0027: Starting deployment of "myApp.ear" (runtime-name: "myApp.ear")
WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0059: Class Path entry lib/snakeyaml-1.13.jar in /C:/Dev/Wildfly/wildfly-10.1.0.Final/standalone/deployments/myApp.ear/liquibase-core-3.3.0.jar does not point to a valid jar for a Class-Path reference.
(...)
INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0207: Starting subdeployment (runtime-name: "myApp-rest")
INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0207: Starting subdeployment (runtime-name: "myApp-webapp")
INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) WFLYSRV0010: Deployed "myApp.ear" (runtime-name : "myApp.ear")
仅此而已,日志中没有 "register" 之类的东西。 因此,每当我尝试访问 "localhost:8080/myApp-webapp" 时,都会出现 404 错误。
该应用程序之前部署在 Weblogic 11 上(具有相同的配置)并且运行良好。
有线索吗?
根据以下日志消息,您的 EAR 内容似乎缺少适当的文件扩展名
INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0207: Starting subdeployment (runtime-name: "myApp-rest")
INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0207: Starting subdeployment (runtime-name: "myApp-webapp")
INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) WFLYSRV0010: Deployed "myApp.ear" (runtime-name : "myApp.ear")
特别注意 myApp-rest
和 myApp-webapp
。即使这是一个展开的部署,它们都应该有一个 .war
扩展名。 (请注意,如果 myApp-rest
只是一个 EJB 模块,它可能有一个 .jar
扩展名。)