原因有可能在cache.ccf中,说起来这还是JCS官方文档的罪过。

在官方给出的cache.ccf中为了显示好看进行了如下显示:

 

jcs.default.cacheattributes=
    org.apache.jcs.engine.CompositeCacheAttributes

但问题是正式的配置文件并不支持这种格式,配置间是用换行符分隔的!因此上面jcs.default.cacheattributes的值其实为空,这也是“Could not instantiate class []”中括号内的类名为空的原因。

 


到这里,解决办法您肯定已经想到了,写成:jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes即可