2014-05-12 49 views
0

我使用Grails 2.3.8Grails的org.slf4j.spi.LocationAwareLogger.log沒有找到

我創建使用

grails create-app testapp 

的默認應用當我運行:

grails runApp 

我得到了以下問題:

| Configuring classpath 
| Error Error executing script RunApp: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.) 
java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V 
    at org.eclipse.aether.internal.impl.Slf4jLoggerFactory$Slf4jLoggerEx.debug(Slf4jLoggerFactory.java:163) 
    at org.eclipse.aether.internal.impl.DefaultLocalRepositoryProvider.newLocalRepositoryManager(DefaultLocalRepositoryProvider.java:142) 
    at org.eclipse.aether.internal.impl.DefaultRepositorySystem.newLocalRepositoryManager(DefaultRepositorySystem.java:421) 
    at grails.util.BuildSettings.doResolve(BuildSettings.groovy:513) 
    at grails.util.BuildSettings.doResolve(BuildSettings.groovy) 
    at grails.util.BuildSettings$_getDefaultBuildDependencies_closure17.doCall(BuildSettings.groovy:774) 
    at grails.util.BuildSettings$_getDefaultBuildDependencies_closure17.doCall(BuildSettings.groovy) 
    at grails.util.BuildSettings.getDefaultBuildDependencies(BuildSettings.groovy:768) 
    at grails.util.BuildSettings.getBuildDependencies(BuildSettings.groovy:673) 
| Error Error executing script RunApp: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V 

我試過跑步:

grails dependency-report 

但我得到同樣的問題。

java -version 

給出:

java version "1.7.0_17" 
Java(TM) SE Runtime Environment (build 1.7.0_17-b02) 
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode) 

回答

0

不知道這是你的問題,但我隱約召回是存在一些問題,Groovy和早期版本的Java 7中的我建議你移動到最近的。我對2.3.8和jdk1.7.0_55沒有任何問題(寫作時最近)。

0

一兩件事,可以在調試這樣的情況下幫助做:

export JAVA_OPTS="-verbose" 

然後,您可以看到哪些SLF4J JAR是由JVM加載,但肯定有undoutably在classpath一些conflicing SLF4J JAR

0

有在SLF4J的實例:

/Library/Java/Extensions/ 

解決這個問題似乎解決了問題。