0

我正在尝试将 ehcache-probe 添加到 grails 项目中。

我尝试按照此处所述添加罐子

我与 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,有没有想过在哪里下载以前的版本?

你能给出解决这个问题的任何指示吗?

提前致谢

4

0 回答 0