我试图将ehcache-probe添加到grails项目中。
我尝试将jar添加为described here
我与sl4j依赖项存在冲突:
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/melicloud/deploy/ml-build/ROOT/WEB-INF/lib/slf4j-jdk14-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/melicloud/deploy/ml-build/ROOT/WEB-INF/lib/slf4j-log4j12-1.5.8.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
没有它们会跳出其他错误:
SLF4J: The requested version 1.5.8 by your slf4j binding is not compatible with [1.6]
SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further details.
我还尝试在 BuildConfig.groovy 中添加maven2依赖项以获取没有sl4j的旧版本:
repositories {
...
mavenRepo "http://www.terracotta.org/download/reflector/releases"
...
}
...
dependencies {
...
compile('org.terracotta:ehcache-probe:1.6')
...
}
但依赖关系未得到解决
==== http://www.terracotta.org/download/reflector/releases: tried
http://www.terracotta.org/download/reflector/releases/org/terracotta/ehcache-probe/1.6/ehcache-probe-1.6.pom
-- artifact org.terracotta#ehcache-probe;1.6!ehcache-probe.jar:
http://www.terracotta.org/download/reflector/releases/org/terracotta/ehcache-probe/1.6/ehcache-probe-1.6.jar
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.terracotta#ehcache-probe;1.6: not found
::::::::::::::::::::::::::::::::::::::::::::::
编辑:我也试过了:http://jira.grails.org/browse/GRAILS-6800(在 _Events.groovy 中删除了grails slf4j依赖项并添加了ehcache-probe)但现在我有一个
SEVERE: Error listenerStart
编辑2:我试过这个http://mythinkpond.wordpress.com/2011/07/01/tomcat-6-infamous-severe-error-listenerstart-message-how-to-debug-this-error/,现在我可以看到它是什么了:
java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;Ljava/lang/Throwable;)V
at org.apache.commons.logging.impl.SLF4JLocationAwareLog.info(SLF4JLocationAwareLog.java:159)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
现在我知道我无法使用最新版本的ehcache-probe,有没有想过在哪里下载以前的版本?
你能解决这个问题吗?
提前致谢