Announcement Announcement Module
Collapse
No announcement yet.
Error slf4j-api, in Jboss Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error slf4j-api, in Jboss

    I have my pom.xml
    Code:
    <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/xsd/maven-4.0.0.xsd">
      <modelVersion>4.0.0</modelVersion>
      <groupId>com.reglamb.projvehimerc</groupId>
      <artifactId>projvehimerc</artifactId>
      <version>1.0.0-SNAPSHOT</version>
      <packaging>war</packaging>
      
    <properties>
            <spring.version>3.0.5.RELEASE</spring.version>
            <hibernate.version>3.5.6-Final</hibernate.version>
            <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        </properties>
    <repositories>
            <repository>
                <id>JBoss Repo</id>
                <url>http://repository.jboss.com/maven2</url>
                <name>JBoss Repo</name>
            </repository>
            <repository>
                <id>ibiblio mirror</id>
                <url>http://mirrors.ibiblio.org/pub/mirrors/maven2/</url>
            </repository>
            <repository>
                <id>jboss-public-repository-group</id>
                <name>JBoss Public Maven Repository Group</name>
                <url>https://repository.jboss.org/nexus/content/groups/public/</url>
                <layout>default</layout>
                <releases>
                    <enabled>true</enabled>
                    <updatePolicy>never</updatePolicy>
                </releases>
                <snapshots> 
                    <enabled>true</enabled>
                    <updatePolicy>never</updatePolicy>
                </snapshots>
            </repository>
        </repositories>
    
    <build>
    	<plugins>
    		<!-- Error de maven, maven always take the 1.3 version -->
    	    <plugin>  
    	    <groupId>org.apache.maven.plugins</groupId>  
    	    <artifactId>maven-compiler-plugin</artifactId>
    	    <version>2.1</version> 
    	    <configuration>  
    	    <source>1.6</source>  
    	    <target>1.6</target>
    	    </configuration>         
    		</plugin>
    			<plugin>
    			<groupId>org.codehaus.mojo</groupId>
    			<artifactId>jboss-maven-plugin</artifactId>
    			<version>1.5.0</version>
    			</plugin>         
    </plugins>
    </build>
    
    <dependencies>
    <!-- Spring dependencies -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <version>${spring.version}</version>
            
    </dependency>
    
    <!-- Spring MVC -->
    <dependency>
    	<groupId>org.springframework</groupId>
    	<artifactId>spring-webmvc</artifactId>
    	<version>${spring.version}</version>
    </dependency>
    <dependency>
    	<groupId>org.springframework</groupId>
    	<artifactId>spring-web</artifactId>
    	<version>${spring.version}</version>
    </dependency>
    
    <dependency>
         <groupId>jstl</groupId>
         <artifactId>jstl</artifactId>
         <version>1.2</version>
    </dependency>
    
    
    <!-- Hibernate dependencies -->
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-core</artifactId>
            <version>${hibernate.version}</version>
            <exclusions>
                    <exclusion>
                        <groupId>cglib</groupId>
                        <artifactId>cglib</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>net.sf.ehcache</groupId>
                        <artifactId>ehcache</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>asm</groupId>
                        <artifactId>asm</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>asm</groupId>
                        <artifactId>asm-attrs</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>javax.transaction</groupId>
                        <artifactId>jta</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>xml-apis</groupId>
                        <artifactId>xml-apis</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-api</artifactId>
                    </exclusion>
                </exclusions>
      	</dependency>
      	<dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-entitymanager</artifactId>
                <version>${hibernate.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>cglib</groupId>
                        <artifactId>cglib</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>dom4j</groupId>
                        <artifactId>dom4j</artifactId>
                    </exclusion>   
                    <exclusion>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-api</artifactId>
                    </exclusion>   
                </exclusions>
            </dependency>
      	
      <!-- Hibernate annotations.chache -->  	
    	  <dependency>
    	      <groupId>org.hibernate</groupId>
    	      <artifactId>hibernate-annotations</artifactId>
    	      <version>${hibernate.version}</version>
    	      
    	   </dependency> 
    <!-- Hibernate annotation @Entity -->
    	  <dependency>
    	      <groupId>org.hibernate.javax.persistence</groupId>
    	      <artifactId>hibernate-jpa-2.0-api</artifactId>
    	      <version>1.0.0.Final</version>
    	      
    	  </dependency>
      
     <!-- @Dependecy, Spring Transacctions(Spring tx) -->
       <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-tx</artifactId>
                <version>${spring.version}</version>
                
      </dependency>
      
      <!-- Hibernate Template -->
        <dependency>
           <groupId>org.springframework</groupId>
           <artifactId>spring-orm</artifactId>
           <version>${spring.version}</version>
       </dependency>
       <dependency>
           <groupId>org.springframework</groupId>
           <artifactId>spring-context</artifactId>
           <version>${spring.version}</version>
       </dependency>
       <!-- Test Dependency -->
       <dependency>
            	<groupId>junit</groupId>
            	<artifactId>junit</artifactId>
            	<version>4.4</version>
            	<scope>test</scope>
            </dependency>
        <!-- Propertie than ok! for test -->
        <dependency>
    	    <groupId>org.springframework</groupId>
    	    <artifactId>spring-test</artifactId>
    	    <version>2.5</version>
    	</dependency>
    	<dependency>
    	    <groupId>postgresql</groupId>
    	    <artifactId>postgresql</artifactId>
    	    <version>9.0-801.jdbc4</version>
    	</dependency>
    		<!-- Another -->
    		<dependency>
                <groupId>cglib</groupId>
                <artifactId>cglib-nodep</artifactId>
                <version>2.2</version>
            </dependency>
            <dependency>
                <groupId>javax.transaction</groupId>
                <artifactId>jta</artifactId>
                <version>1.1</version>
            </dependency>
    
    </dependencies>
      
    </project>
    Even i exclude the sl4j-api in hibernate-core, and hibernate-entitymanager, I take the error:
    Code:
    java.lang.LinkageError: loader constraint violation: when resolving method "org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;
    I check the maven repositories and I found that the slf4-api-1.5.8.jar don't be exclude, I view in the dependecy hierarchy and this don't have dependency hierarchy.
    I can't exclude slf4j-api-1.5.8.jar !!!, why?.
Working...
X