大家好,请帮忙,
我什么都试过了。我正在尝试在WildFly Jboss新服务器上部署一个Seam项目。我搞错了。我将ear文件放在WildFly8.2.0Final中,然后创建一个ear.dodeploy文件并等待它自动运行。缺少/不可用依赖项的服务是我需要处理的错误。我得到以下错误:
15:46:12,061 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 1) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "Atlast2.3.ear")]) - failure description: {"JBAS014771: Services with missing/unavailable dependencies" => [
"jboss.naming.context.java.comp.\"Atlast2.3\".jboss-seam.TimerServiceDispatcher.ValidatorFactory is missing [jboss.naming.context.java.comp.\"Atlast2.3\".jboss-seam.TimerServiceDispatcher]",
"jboss.naming.context.java.comp.\"Atlast2.3\".jboss-seam.TimerServiceDispatcher.Validator is missing [jboss.naming.context.java.comp.\"Atlast2.3\".jboss-seam.TimerServiceDispatcher]",
"jboss.naming.context.java.comp.\"Atlast2.3\".jboss-seam.EjbSynchronizations.Validator is missing [jboss.naming.context.java.comp.\"Atlast2.3\".jboss-seam.EjbSynchronizations]",
"jboss.persistenceunit.\"Atlast2.3.ear/Atlast2.3.jar#Atlast2.3\".__FIRST_PHASE__ is missing [jboss.naming.context.java.\"Atlast2.3Datasource\"]",
"jboss.naming.context.java.comp.\"Atlast2.3\".jboss-seam.EjbSynchronizations.InAppClientContainer is missing [jboss.naming.context.java.comp.\"Atlast2.3\".jboss-seam.EjbSynchronizations]",
"jboss.naming.context.java.comp.\"Atlast2.3\".jboss-seam.EjbSynchronizations.InstanceName is missing [jboss.naming.context.java.comp.\"Atlast2.3\".jboss-seam.EjbSynchronizations]",
"jboss.naming.context.java.comp.\"Atlast2.3\".jboss-seam.EjbSynchronizations.ValidatorFactory is missing [jboss.naming.context.java.comp.\"Atlast2.3\".jboss-seam.EjbSynchronizations]",
"jboss.naming.context.java.comp.\"Atlast2.3\".jboss-seam.TimerServiceDispatcher.InstanceName is missing [jboss.naming.context.java.comp.\"Atlast2.3\".jboss-seam.TimerServiceDispatcher]",
"jboss.naming.context.java.comp.\"Atlast2.3\".jboss-seam.TimerServiceDispatcher.InAppClientContainer is missing [jboss.naming.context.java.comp.\"Atlast2.3\".jboss-seam.TimerServiceDispatcher]"
]}
15:46:12,301 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS018559: Deployed "Atlast2.3.ear" (runtime-name : "Atlast2.3.ear")
15:46:12,302 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 1) JBAS014774: Service status report
JBAS014776: Newly corrected services:
service jboss.naming.context.java.module."Atlast2.3"."Atlast2.3.war" (new available)
service jboss.naming.context.java.module."Atlast2.3".jboss-seam (new available)
service jboss.persistenceunit."Atlast2.3.ear/Atlast2.3.jar#Atlast2.3".__FIRST_PHASE__ (new available)发布于 2015-09-10 17:55:27
当将Seam2.3EAR应用程序迁移到WildFly 9时,我能够通过在EAR之后部署Seam来解决类似于上面的WFLYCTL0180: Services with missing/unavailable dependencies错误。这可以在EAR META-INF/application.xml中配置。
<application xmlns="http://java.sun.com/xml/ns/javaee" version="6">
<initialize-in-order>true</initialize-in-order>
<module>
<ejb>myapp-ejb.jar</ejb>
</module>
<module>
<ejb>jboss-seam-2.3.1.Final.jar</ejb>
</module>
...
</application>将initialize-in-order设置为false可能就足够了,但我需要将此选项设置为true,因为这个EAR中有多个EAR。
在我的例子中,java.lang.IllegalStateException是通过安装和激活JSF2.1来解决的,而不是与WildFly捆绑在一起的JSF2.2。我们详细地解释了这里和这里;它归结为以下步骤:
git clone git://github.com/wildfly/wildfly.git
cd wildfly
git checkout 9.0.1.Final
./build.sh
cd jsf/multi-jsf-installer
mvn -Djsf-version=2.1.29 -Pmojarra-2.x clean assembly:single
mv target/install-mojarra-2.1.29.zip target/install-mojarra-2.1.29.cli
[Start WildFly in another console: bin/standalone.sh]
bin/jboss-cli.sh -c "deploy target/install-mojarra-2.1.29.cli"重新启动WildFly并验证新版本是否出现:
bin/jboss-cli.sh -c --commands="/subsystem=jsf/:list-active-jsf-impls"为了确保使用正确的版本,在我的情况下,需要进行以下两项更改:
在耳朵里META-INF/jboss-deployment-structure.xml
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">
<deployment>
<dependencies>
<module name="javax.faces.api" export="true" slot="mojarra-2.1.29" />
<module name="com.sun.jsf-impl" export="true" slot="mojarra-2.1.29" />
<module name="org.jboss.as.jsf-injection" export="true" slot="mojarra-2.1.29" />
...
</dependencies>
</deployment>
</jboss-deployment-structure>在战争中WEB-INF/web.xml
<context-param>
<param-name>org.jboss.jbossfaces.JSF_CONFIG_NAME</param-name>
<param-value>mojarra-2.1.29</param-value>
</context-param>https://stackoverflow.com/questions/29659609
复制相似问题