使用EAR和WAR的JBoss EAP 6.1部署问题

时间:2013-09-12 04:34:40

标签: java-ee primefaces jboss war ear

我遇到了JBoss部署EAR包和WAR包的问题,​​这里有规格

  • AWS EC2服务上的AMAZON Linux 64位
  • JBoss EAP 6.1
  • java版“1.6.0_24”
  • OpenJDK运行时环境(IcedTea6 1.11.11.90)(amazon-62.1.11.11.90.55.amzn1-x86_64)
  • OpenJDK 64位服务器VM(内置20.0-b12,混合模式)

现在我正在运行一个基本的WAR包,其中包含一个页面和一个primefaces jar我的web.xml,如下所示

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-       instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns      /javaee/web-app_3_0.xsd">
<context-param>
    <param-name>javax.faces.PROJECT_STAGE</param-name>
    <param-value>Development</param-value>
</context-param>
<context-param>
<param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
<param-value>true</param-value>
</context-param>
<servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<session-config>
    <session-timeout>
        30
    </session-timeout>
</session-config>
<welcome-file-list>
    <welcome-file>faces/index.xhtml</welcome-file>
</welcome-file-list>
 </web-app>

我在WAR的宣言中有这个:

 Manifest-Version: 1.0
 Dependencies: javax.faces.api

现在部署时遇到了这个错误:

 ^[[0m^[[0m03:48:44,695 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting     deployment of "Intelinerd-war.war" (runtime-name: "Inteline$
 ^[[0m^[[0m03:48:44,714 INFO  [org.jboss.as.remoting] (MSC service thread 1-1) JBAS017100: Listening on     0.0.0.0:4447
 ^[[0m^[[0m03:48:45,401 INFO  [org.jboss.web] (ServerService Thread Pool -- 50) JBAS018210: Register web context: /Intelinerd-war
 ^[[0m^[[31m03:48:45,517 SEVERE [javax.faces] (ServerService Thread Pool -- 50) Application was not properly  initialized at startup, could not find Factory: javax.faces$
 ^[[0m^[[31m03:48:45,539 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/Intelinerd-war]] (ServerService Thread Pool -- 50) JBWEB000289: Serv$
    at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:1010) [jboss-jsf-api_2.1_spec- 2.1.19.1.Final-redhat-1.jar:2.1.19.1.Final-redhat-1]
    at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:342) [jboss-jsf-api_2.1_spec-2.1.19.1.Final-redhat-1.jar:2.1.19.1.Final-redhat-1]
    at javax.faces.webapp.FacesServlet.init(FacesServlet.java:302) [jboss-jsf-api_2.1_spec-2.1.19.1.Final-redhat-1.jar:2.1.19.1.Final-redhat-1]
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1194) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1100) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3591) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:3798) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
    at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:156) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
    at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:60) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
    at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:93) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.6.0_24]
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.6.0_24]
    at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.6.0_24]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146) [rt.jar:1.6.0_24]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.6.0_24]
    at java.lang.Thread.run(Thread.java:679) [rt.jar:1.6.0_24]
    at org.jboss.threads.JBossThread.run(JBossThread.java:122)

不确定导致这种情况的原因是任何人都有解决方案我已经有一段时间了,并且还没有达成解决方案。

更新:15/09/2013,我添加了一个faces-config.xml并仍然获得相同的输出。

<?xml version='1.0' encoding='UTF-8'?>

 <!-- =========== FULL CONFIGURATION FILE ================================== -->

<faces-config version="2.1"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_1.xsd">


 </faces-config>

0 个答案:

没有答案