我开始玩 GridGain(恭喜开源!)
我正在尝试将它嵌入到另一个应用程序中,因此我需要使用 JCL 日志记录而不是 Log4j。
我的简单代码如下所示(是的,它是 groovy 代码):
def cfg = new GridConfiguration()
cfg.setGridLogger( new GridJclLogger() )
cfg.setLifecycleBeans(new DaemonLifecycleBean())
def grid = GridGain.start(cfg);
但我得到了下面的例外。如果我配置 JCL 日志记录,为什么它会抱怨缺少 Log4j?
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/varia/LevelRangeFilter
at org.gridgain.grid.kernal.GridKernal.createNodeAttributes(GridKernal.java:1187) ~[gridgain-platform-6.0.2.jar:na]
at org.gridgain.grid.kernal.GridKernal.start(GridKernal.java:608) ~[gridgain-platform-6.0.2.jar:na]
at org.gridgain.grid.kernal.GridGainEx$GridNamedInstance.start0(GridGainEx.java:1828) ~[gridgain-platform-6.0.2.jar:na]
... 21 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.varia.LevelRangeFilter
at java.net.URLClassLoader$1.run(URLClassLoader.java:366) ~[na:1.7.0_51]
at java.net.URLClassLoader$1.run(URLClassLoader.java:355) ~[na:1.7.0_51]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.7.0_51]
at java.net.URLClassLoader.findClass(URLClassLoader.java:354) ~[na:1.7.0_51]
at java.lang.ClassLoader.loadClass(ClassLoader.java:425) ~[na:1.7.0_51]