2013-08-19 27 views
1

我有我想解決以下錯誤(問題的看法),什麼可能導致有關JavaServer Faces和JAX-RS的這些錯誤?

  1. 的JavaServer Faces 2.2無法安裝:一個或多個約束沒有得到滿足。
  2. JavaServer Faces 2.2需要Dynamic Web Module 2.5或更高版本。
  3. 無法安裝JAX-RS(REST Web Services)2.0:尚未滿足一個或多個約束條件。
  4. JAX-RS(REST Web Services)2.0需要Dynamic Web Module 3.1或更高版本。
  5. JAX-RS(REST Web Services)2.0需要Java 1.7或更新版本。

我該如何解決這個問題。這裏是web.xml和pom.xml文件。

的web.xml

<!DOCTYPE web-app PUBLIC 
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" 
"http://java.sun.com/dtd/web-app_2_3.dtd" > 
<web-app> 
<display-name>Web Application</display-name> 

    <filter> 
<filter-name>struts2</filter-name> 
<filter-class> 
    org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter 
</filter-class> 
</filter> 

<filter-mapping> 
<filter-name>struts2</filter-name> 
<url-pattern>/*</url-pattern> 
</filter-mapping> 

<context-param> 
<param-name>contextConfigLocation</param-name> 
<param-value>/WEB-INF/classes/SpringBeans.xml</param-value> 
</context-param> 

<listener> 
<listener-class> 
    org.springframework.web.context.ContextLoaderListener 
</listener-class> 
</listener> 
</web-app> 


的pom.xml

<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> 
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/mavenv4_0_0.xsd"> 
<modelVersion>4.0.0</modelVersion> 
<groupId>prep.mucyo.com</groupId> 
<artifactId>subscription</artifactId> 
<packaging>war</packaging> 
<version>0.0.1-SNAPSHOT</version> 
<name>subscription maven webapp</name> 
<url>http://maven.apache.org</url> 

<dependencies> 
<dependency> 
    <groupId>junit</groupId> 
    <artifactId>junit</artifactId> 
    <version>4.10</version> 
</dependency> 
<dependency> 
    <groupId>org.apache.struts</groupId> 
    <artifactId>struts2-spring-plugin</artifactId> 
    <version>2.3.15.1</version> 
</dependency> 
<dependency> 
    <groupId>org.apache.struts</groupId> 
    <artifactId>struts2-core</artifactId> 
    <version>2.3.15.1</version> 
</dependency> 
<dependency> 
    <groupId>org.springframework</groupId> 
    <artifactId>spring</artifactId> 
    <version>2.5.6.SEC03</version> 
</dependency> 
<dependency> 
    <groupId>org.springframework</groupId> 
    <artifactId>spring-web</artifactId> 
    <version>3.2.4.RELEASE</version> 
</dependency> 
<dependency> 
    <groupId>org.hibernate</groupId> 
    <artifactId>hibernate</artifactId> 
    <version>3.2.7.ga</version> 
    <type>pom</type> 
</dependency> 
<dependency> 
    <groupId>dom4j</groupId> 
    <artifactId>dom4j</artifactId> 
    <version>1.6.1</version> 
</dependency> 
<dependency> 
    <groupId>commons-logging</groupId> 
    <artifactId>commons-logging</artifactId> 
    <version>1.1.3</version> 
</dependency> 
<dependency> 
    <groupId>commons-collections</groupId> 
    <artifactId>commons-collections</artifactId> 
    <version>20040616</version> 
</dependency> 
<dependency> 
    <groupId>cglib</groupId> 
    <artifactId>cglib</artifactId> 
    <version>3.0</version> 
</dependency> 
<dependency> 
    <groupId>antlr</groupId> 
    <artifactId>antlr</artifactId> 
    <version>20030911</version> 
</dependency> 

<dependency> 
    <groupId>javax</groupId> 
    <artifactId>javaee-api</artifactId> 
    <version>7.0</version> 
</dependency> 
<dependency> 
    <groupId>javax.transaction</groupId> 
    <artifactId>jta</artifactId> 
    <version>1.1</version> 
</dependency> 
<dependency> 
    <groupId>com.oracle</groupId> 
    <artifactId>ojdbc14</artifactId> 
    <version>14</version> 
<scope>system</scope> 
<systemPath>C:/Eclipse_Juno/workspace/subscription/lib/ojdbc14.jar</systemPath> 
</dependency> 

</dependencies> 
<build> 
    <finalName>subscription</finalName> 
</build> 
</project> 

我已經檢查了項目的屬性,並在項目構面既不JSF也不JAX-RS被選中。

任何幫助和解釋是高度讚賞。

+0

顯示完整的pom.xml。 – acdcjunior

+0

@acdcjunior我添加了完整的pom.xml – LeandreM

+0

你是如何創建你的eclipse項目的?你有用於eclipse(m2e)的Maven插件嗎?它應該自己解決所有這些問題。 – acdcjunior

回答

0

錯誤通過完全卸載JBoss來解決,因爲我不需要它(我使用的是tomcat)。不知何故,它正在檢查項目並導致這些兼容性問題。