当前位置: 首页 > 工具软件 > Jcseg > 使用案例 >

Invalid sub lexicon path /java/JavaSE/jcseg/lexicon for lexicon.path in jcseg.properties 解决方法

云霖
2023-12-01

在部署Solr时,启动Tomccat 遇到如下问题:

<span style="font-size:14px;">log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
java.io.IOException: Invalid sub lexicon path /java/JavaSE/jcseg/lexicon for lexicon.path in jcseg.properties
	at org.lionsoul.jcseg.core.JcsegTaskConfig.resetFromPropertyFile(Unknown Source)
	at org.lionsoul.jcseg.core.JcsegTaskConfig.<init>(Unknown Source)
	at org.lionsoul.jcseg.core.JcsegTaskConfig.<init>(Unknown Source)
	at org.lionsoul.jcseg.solr.JcsegTokenizerFactory.<init>(Unknown Source)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)</span>

1. 找到Tomcat/webapp中的solr.war -> WEB-INF->lib->jcseg-core-1.9.3.jar

2. 用rar打开cseg-core-1.9.3.jar,修改jcseg.properties中

      lexicon.path = {jar.dir}/dic

     说明  {jar.dir}/dic 也可以写成绝对路径:xxx/Tomcat文件夹/webapps/solr/WEB-INF/lib/dic

3..删掉Tomcat/Webapp/solr 文件夹,重新启动Tomcat

 类似资料: