robfletcher/betamax — Issue #39: slf4j error on Grails 1.3.7
Author: eliotsykes
Created: 2011-10-12 17:03:48+00:00
State: open

Running a test using betamax on Grails 1.3.7 causes the following error:

```
org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V

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.jetty.util.log.JettyAwareLogger.log(JettyAwareLogger.java:591)
at org.eclipse.jetty.util.log.JettyAwareLogger.debug(JettyAwareLogger.java:193)
at org.eclipse.jetty.util.log.Slf4jLog.debug(Slf4jLog.java:92)
at org.eclipse.jetty.util.log.Log.initialized(Log.java:80)
at org.eclipse.jetty.util.log.Log.getLogger(Log.java:357)
at org.eclipse.jetty.util.log.Log.getLogger(Log.java:347)
at org.eclipse.jetty.util.component.AbstractLifeCycle.(AbstractLifeCycle.java:28)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at betamax.proxy.jetty.ProxyServer.class$(ProxyServer.groovy)
at betamax.proxy.jetty.ProxyServer.$get$$class$betamax$proxy$jetty$ProxyHandler(ProxyServer.groovy)
at betamax.proxy.jetty.ProxyServer.start(ProxyServer.groovy:30)
at betamax.proxy.jetty.ProxyServer$start.call(Unknown Source)
at betamax.Recorder.startProxy(Recorder.groovy:166)
at betamax.Recorder.this$2$startProxy(Recorder.groovy)
at betamax.Recorder$this$2$startProxy.callCurrent(Unknown Source)
at betamax.Recorder.withTape(Recorder.groovy:139)
at betamax.Recorder.this$dist$invoke$2(Recorder.groovy)
at betamax.Recorder$1.methodMissing(Recorder.groovy)
at betamax.Recorder$1.evaluate(Recorder.groovy:152)
at betamax.Recorder$1$evaluate.call(Unknown Source)
```
Rob as you found out, seems to be fixed by changing application.properties from
```
plugins.jetty=1.2-SNAPSHOT
```
to
```
plugins.jetty7=0.3.2
```
and excluding jetty-server in `BuildConfig.groovy`:
```
test("com.github.robfletcher:betamax:1.0") {
excludes "jetty-server"
}
```