2
votes

I have the following errors(in problem's view) that I want to fix,

  1. JavaServer Faces 2.2 can not be installed : One or more constraints have not been satisfied.
  2. JavaServer Faces 2.2 requires Dynamic Web Module 2.5 or newer.
  3. JAX-RS (REST Web Services) 2.0 can not be installed : One or more constraints have not been satisfied.
  4. JAX-RS (REST Web Services) 2.0 requires Dynamic Web Module 3.1 or newer.
  5. JAX-RS (REST Web Services) 2.0 requires Java 1.7 or newer.

How do I fix this.Here is web.xml and pom.xml files.

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>

I have checked the project's properties and in Project Facets neither JSF nor JAX-RS is checked.

Any help and explanation is highly appreciated.

1
Show the full pom.xml.acdcjunior
@acdcjunior I added the full pom.xmlLeandreM
How did you create your eclipse project? DO you have the Maven plugin for eclipse (m2e)? It should solve all of these by itself.acdcjunior
@acdcjunior Yes I do Have it embedded I used the external maven because it was causing this error-->Failed to load class "org.slf4j.impl.StaticLoggerBinder". I just tried the intellijj to see if it a wasn't a problem specific for eclipse and it was true. there is no issues building the project in maven Actually the bottom problem was the JBoss plugin I had installed, for some reason it was checking the project and mark an error at the very first line so i could not even know the absolute location of the problem, after unistalling JBoss plugin the error doesn't show up anymore.LeandreM

1 Answers

0
votes

The errors are fixed by completely uninstalling JBoss,since I didn't need it(i'm using tomcat). Somehow it was inspecting the project and cause these compatibility issues.