2013-04-18 53 views
0

我正在使用primefaces 3.3和JSF 2.0。下面這個pom的結構,當我產生一場戰爭時,只在tomcat 7.0.39上運行(工作)。我想知道我需要更改在JBoss EAP 5.1中運行的戰爭。Primefaces 3.3,POM,tomcat 7.0.39和Jboss作爲EAP 5.1

錯誤:19:19:53125嚴重[配置]在部署過程中嚴重錯誤: com.sun.faces.config.ConfigurationException:工廠 'javax.faces.context.ExternalContextFactory' 未正確配置。在com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:305)在下方產生

  • ö戰爭不會在JBoss EAP 5.1
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 

<modelVersion>4.0.0</modelVersion> 
<groupId>com.mkyong.core</groupId> 
<artifactId>OtimizacaoProcessoInterno</artifactId> 
<packaging>war</packaging> 
<version>1.0-SNAPSHOT</version> 

<name>OtimizacaoProcessoInterno</name> 
<url>http://maven.apache.org</url> 

<dependencies> 

    <!-- PrimeFaces --> 
    <dependency> 
     <groupId>org.primefaces</groupId> 
     <artifactId>primefaces</artifactId> 
     <version>3.3</version> 
    </dependency> 

    <!-- JSF --> 
    <dependency> 
     <groupId>com.sun.faces</groupId> 
     <artifactId>jsf-api</artifactId> 
     <version>2.1.11</version> 
    </dependency> 
    <dependency> 
     <groupId>com.sun.faces</groupId> 
     <artifactId>jsf-impl</artifactId> 
     <version>2.1.11</version> 
    </dependency> 

    <dependency> 
     <groupId>javax.servlet</groupId> 
     <artifactId>jstl</artifactId> 
     <version>1.2</version> 
    </dependency> 

    <dependency> 
     <groupId>javax.servlet</groupId> 
     <artifactId>servlet-api</artifactId> 
     <version>2.5</version> 
    </dependency> 

    <dependency> 
     <groupId>javax.servlet.jsp</groupId> 
     <artifactId>jsp-api</artifactId> 
     <version>2.1</version> 
    </dependency> 

    <!-- EL --> 
    <dependency> 
     <groupId>org.glassfish.web</groupId> 
     <artifactId>el-impl</artifactId> 
     <version>2.2</version> 
    </dependency> 

</dependencies> 
<build> 
    <plugins> 
     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-eclipse-plugin</artifactId> 
      <configuration> 
       <wtpversion>2.0</wtpversion> 
      </configuration> 
     </plugin> 
    </plugins> 
</build> 

工作

+0

似乎像http://www.mastertheboss.com/jboss-web-server/tomcat-to-jboss-migration是你所需要的。 – dShringi 2013-04-18 04:31:26

+0

你面臨的錯誤是什麼? – 2013-04-18 04:43:58

+0

我需要一個解決方案,僅在POM中進行更改,重點放在Jboss上,因爲它對於Tomcat來說非常合適。錯誤如下所示:2 Answars。 「com.sun.faces.config.ConfigurationException:工廠的'javax.faces.context.ExternalContextFactory'配置不正確」 – Ezequielll 2013-04-18 22:48:00

回答

0

你可以打包你的Maven模塊。因此,你的包裝改爲

<packaging>ear</packaging> 

如果你想定製你的耳朵文件,你可以使用maven-ear-plugin

+0

只有在這種改變的情況下,仍然是錯誤,請注意上面。 – Ezequielll 2013-04-18 22:42:27