2017-01-03 50 views
0

我試圖將我的項目移動到Neo4j 3.1.0,但現在我的Maven,Spring Boot應用程序失敗,例外:移動到Neo4j 3.1.0和IllegalArgumentException:LoggerFactory不是Logback LoggerContext,但Logback在類路徑

Caused by: java.lang.IllegalArgumentException: LoggerFactory is not a Logback LoggerContext but Logback is on the classpath. Either remove Logback or the competing implementation (class org.slf4j.impl.Neo4jLoggerFactory loaded from file:/.../.m2/repository/org/neo4j/neo4j-security-enterprise/3.1.0/neo4j-security-enterprise-3.1.0.jar). If you are using WebLogic you will need to add 'org.slf4j' to prefer-application-packages in WEB-INF/weblogic.xml Object of class [org.slf4j.impl.Neo4jLoggerFactory] must be an instance of class ch.qos.logback.classic.LoggerContext 

請問,請問在我的應用程序中應該使用什麼樣的記錄器實現以及如何解決它?

回答

1

下排除解決問題:

<dependency> 
    <groupId>org.neo4j</groupId> 
    <artifactId>neo4j-enterprise</artifactId> 
    <version>${neo4j.version}</version> 
    <exclusions> 
     <exclusion> 
      <groupId>org.neo4j</groupId> 
      <artifactId>neo4j-security-enterprise</artifactId> 
     </exclusion> 
    </exclusions> 
</dependency>