Hi Chenhe,

DSpace 4.0 uses Lucene 4.4.0. The ChineseAnalyser packaged in this version
does not have a method with the signature of init(Version), so this
error occurs.

According to the api document of ChineseAnalyser, this class is deprecated
and using "org.apache.lucene.analysis.standard.StandardAnalyzer", which has
the same functionality, is recommended instead.

How about trying this class as the value of "search.analyzer" property?

Regards,
Keiji Suzuki



2014-02-27 12:14 GMT+09:00 badboy <[email protected]>:
> we install  DSpace4.0 on RHEL6.5, and set  the dspace.cfg  like this:
> search.analyzer = org.apache.lucene.analysis.cn.ChineseAnalyzer
>
> we meet the error when run #ant fresh_install
>  FATAL org.dspace.search.DSIndexer @ anonymou
> s:no_context:no_search_analyzer:search.analyzer=org.apache.lucene.analysis.cn.Ch
> ineseAnalyzer
>
> just as the same as https://jira.duraspace.org/browse/DS-1170
>
>> in dspace.conf, if set
>> search.analyzer = org.apache.lucene.analysis.cn.ChineseAnalyzer
>>
>> if will fail with #ant fresh-install .....
>>
>> [java] 2012-05-09 17:02:18,195 ERROR org.dspace.search.DSIndexer @ Unable
>> t
>> o create index directory: c:\dspace180/search
>>      [java] 2012-05-09 17:02:18,203 FATAL org.dspace.search.DSIndexer @
>> anonymou
>>
>> s:no_context:no_search_analyzer:search.analyzer=org.apache.lucene.analysis.cn.Ch
>> ineseAnalyzer
>>      [java] java.lang.NoSuchMethodException:
>> org.apache.lucene.analysis.cn.Chine
>> seAnalyzer.<init>(org.apache.lucene.util.Version)
>>      [java] at java.lang.Class.getConstructor0(Class.java:2706)
>>      [java] at java.lang.Class.getDeclaredConstructor(Class.java:1985)
>>      [java] at org.dspace.search.DSIndexer.getAnalyzer(DSIndexer.java:635)
>>      [java] at org.dspace.search.DSIndexer.openIndex(DSIndexer.java:914)
>>      [java] at org.dspace.search.DSIndexer.<clinit>(DSIndexer.java:225)
>>      [java] java.lang.ExceptionInInitializerError
>>      [java] Caused by: java.lang.IllegalStateException:
>> java.lang.NoSuchMethodEx
>> ception:
>> org.apache.lucene.analysis.cn.ChineseAnalyzer.<init>(org.apache.lucene.
>> util.Version)
>>      [java] at org.dspace.search.DSIndexer.getAnalyzer(DSIndexer.java:644)
>>      [java] at org.dspace.search.DSIndexer.openIndex(DSIndexer.java:914)
>>      [java] at org.dspace.search.DSIndexer.<clinit>(DSIndexer.java:225)
>>      [java] Could not find the main class: org.dspace.search.DSIndexer.
>> Program
>>  will exit.
>>      [java] Exception in thread "main"
>>
>> If I don't set .ChineseAnalyzer before install, ant build successful, and
>> then I edit the dspace.conf
>> set it to use ChineseAnalyzer, same error message will got when use
>> #dspace index-init
>
>
> --
> How to do this?
>
> Thanks  in advance!
> Regarts.
> Chenhe
>
>
>
> ------------------------------------------------------------------------------
> Flow-based real-time traffic analytics software. Cisco certified tool.
> Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
> Customize your own dashboards, set traffic alerts and generate reports.
> Network behavioral analysis & security monitoring. All-in-one tool.
> http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
> _______________________________________________
> DSpace-tech mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
> List Etiquette:
> https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette



-- 
鈴木敬二@江別市

------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to