你不会是程序猿吧?

elasticsearch安装hanpl使用分词功能报错!~有大神么!~

Elasticsearch | 作者 lx | 发布于2019年04月10日 | 阅读数:2930

[2019-04-10T18:20:50,016][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [Bh2_MZO] fatal error in thread [elasticsearch[Bh2_MZO][analyze][T#1]], exiting
java.lang.ExceptionInInitializerError: null
        at com.hankcs.hanlp.seg.Segment.seg(Segment.java:338) ~[?:?]
        at com.hankcs.lucene4.HanlpSegmenter.next(HanlpSegmenter.java:65) ~[?:?]
        at com.hankcs.lucene4.HanLPTokenizer.incrementToken(HanLPTokenizer.java:46) ~[?:?]
        at org.elasticsearch.action.admin.indices.analyze.TransportAnalyzeAction.simpleAnalyze(TransportAnalyzeAction.java:275) ~[elasticsearch-6.7.0.jar:6.7.0]
        at org.elasticsearch.action.admin.indices.analyze.TransportAnalyzeAction.analyze(TransportAnalyzeAction.java:252) ~[elasticsearch-6.7.0.jar:6.7.0]
        at org.elasticsearch.action.admin.indices.analyze.TransportAnalyzeAction.shardOperation(TransportAnalyzeAction.java:170) ~[elasticsearch-6.7.0.jar:6.7.0]
        at org.elasticsearch.action.admin.indices.analyze.TransportAnalyzeAction.shardOperation(TransportAnalyzeAction.java:81) ~[elasticsearch-6.7.0.jar:6.7.0]
        at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$1.doRun(TransportSingleShardAction.java:115) ~[elasticsearch-6.7.0.jar:6.7.0]
        at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:751) ~[elasticsearch-6.7.0.jar:6.7.0]
        at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) ~[elasticsearch-6.7.0.jar:6.7.0]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_201]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_201]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_201]
Caused by: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "*" "read,write")
        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472) ~[?:1.8.0_201]
        at java.security.AccessController.checkPermission(AccessController.java:884) ~[?:1.8.0_201]
        at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) ~[?:1.8.0_201]
        at java.lang.SecurityManager.checkPropertiesAccess(SecurityManager.java:1262) ~[?:1.8.0_201]
        at java.lang.System.getProperties(System.java:630) ~[?:1.8.0_201]
        at com.hankcs.hanlp.HanLP$Config.<clinit>(HanLP.java:240) ~[?:?]
        ... 13 more
已邀请:

hapjin

赞同来自: lx

插件没有足够的权限,比如:
AccessController.doPrivileged((PrivilegedAction) () -> HanLP.Config.Normalization = true);
本人6.3.2版本的ES,用过这个插件 https://github.com/KennFalcon/ ... hanlp,虽然有一些bug,但还是能用的。
 
 

God_lockin

赞同来自: lx

access denied ("java.util.PropertyPermission" "*" "read,write")
 
你是不是没改项目的 Java 权限文件

要回复问题请先登录注册