首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

使用JCS时出现config.OptionConverter - Could not instantiate class []的异常原因

2013-04-02 
使用JCS时出现config.OptionConverter - Could not instantiate class []的错误原因原因有可能在cache.ccf

使用JCS时出现config.OptionConverter - Could not instantiate class []的错误原因

原因有可能在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即可

热点排行