0

我在 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>

我在战争清单中有这个:

 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>
4

0 回答 0