Failing to build ES versions 7.7/7.8
thalurur opened this issue · 4 comments
When I build the package for ES versions 7.7/7.8, I am seeing the following issue.
java.lang.IllegalAccessError: Class com.sun.xml.bind.v2.runtime.reflect.Accessor$FieldReflection can not access a member of class vn.hus.nlp.fsm.jaxb.Fsm with modifiers "protected"
at com.sun.xml.bind.v2.runtime.reflect.Accessor$FieldReflection.set(Accessor.java:276) ~[?:?]
at com.sun.xml.bind.v2.runtime.reflect.AdaptedAccessor.set(AdaptedAccessor.java:85) ~[?:?]
at com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor$CompositeTransducedAccessorImpl.parse(TransducedAccessor.java:245) ~[?:?]
at com.sun.xml.bind.v2.runtime.unmarshaller.StructureLoader.startElement(StructureLoader.java:210) ~[?:?]
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:576) ~[?:?]
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:555) ~[?:?]
at com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXConnector.java:168) ~[?:?]
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509) ~[?:?]
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:374) ~[?:?]
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:613) ~[?:?]
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3132) ~[?:?]
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:852) ~[?:?]
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602) ~[?:?]
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112) ~[?:?]
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505) ~[?:?]
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842) ~[?:?]
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771) ~[?:?]
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) ~[?:?]
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213) ~[?:?]
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643) ~[?:?]
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:258) ~[?:?]
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:229) ~[?:?]
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:157) ~[?:1.8.0_231]
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:204) ~[?:1.8.0_231]
at vn.hus.nlp.fsm.io.FSMUnmarshaller.unmarshal(FSMUnmarshaller.java:97) ~[?:?]
at vn.hus.nlp.tokenizer.segmenter.DFALexiconRecognizer.<init>(DFALexiconRecognizer.java:37) ~[?:?]
at vn.hus.nlp.tokenizer.segmenter.DFALexiconRecognizer.getInstance(DFALexiconRecognizer.java:48) ~[?:?]
at vn.hus.nlp.tokenizer.segmenter.Segmenter.getDFALexiconRecognizer(Segmenter.java:212) ~[?:?]
at vn.hus.nlp.tokenizer.segmenter.Segmenter.<init>(Segmenter.java:106) ~[?:?]
at me.duydo.vi.Tokenizer.tokenize(Tokenizer.java:66) ~[?:?]
at org.apache.lucene.analysis.vi.VietnameseTokenizer.tokenize(VietnameseTokenizer.java:57) ~[?:?]
at org.apache.lucene.analysis.vi.VietnameseTokenizer.incrementToken(VietnameseTokenizer.java:66) ~[?:?]
at org.apache.lucene.analysis.LowerCaseFilter.incrementToken(LowerCaseFilter.java:41) ~[lucene-core-8.5.1.jar:8.5.1 edb9fc409398f2c3446883f9f80595c884d245d0 - ivera - 2020-04-08 08:55:42]
at org.apache.lucene.analysis.FilteringTokenFilter.incrementToken(FilteringTokenFilter.java:49) ~[lucene-core-8.5.1.jar:8.5.1 edb9fc409398f2c3446883f9f80595c884d245d0 - ivera - 2020-04-08 08:55:42]
at org.elasticsearch.index.analysis.AnalysisRegistry.checkVersions(AnalysisRegistry.java:650) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.index.analysis.AnalysisRegistry.produceAnalyzer(AnalysisRegistry.java:612) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.index.analysis.AnalysisRegistry.build(AnalysisRegistry.java:531) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.index.analysis.AnalysisRegistry.build(AnalysisRegistry.java:218) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.index.IndexModule.newIndexService(IndexModule.java:428) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.indices.IndicesService.createIndexService(IndicesService.java:650) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.indices.IndicesService.createIndex(IndicesService.java:553) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.indices.IndicesService.createIndex(IndicesService.java:178) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.indices.cluster.IndicesClusterStateService.createIndices(IndicesClusterStateService.java:484) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.indices.cluster.IndicesClusterStateService.applyClusterState(IndicesClusterStateService.java:246) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.cluster.service.ClusterApplierService.lambda$callClusterStateAppliers$5(ClusterApplierService.java:517) ~[elasticsearch-7.8.1.jar:7.8.1]
at java.lang.Iterable.forEach(Iterable.java:75) ~[?:1.8.0_231]
at org.elasticsearch.cluster.service.ClusterApplierService.callClusterStateAppliers(ClusterApplierService.java:514) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.cluster.service.ClusterApplierService.applyChanges(ClusterApplierService.java:485) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.cluster.service.ClusterApplierService.runTask(ClusterApplierService.java:432) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.cluster.service.ClusterApplierService.access$100(ClusterApplierService.java:73) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.cluster.service.ClusterApplierService$UpdateTask.run(ClusterApplierService.java:176) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:636) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:252) ~[elasticsearch-7.8.1.jar:7.8.1]
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:215) ~[elasticsearch-7.8.1.jar:7.8.1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_231]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_231]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_231]
The error is because of this commit - duydo/vn-nlp-libraries@edd770e
Since the Segmenter
object is being intialized in tokenize
method instead of init()
the doPrivileged need to be added inside VietnameseTokenizer's::tokenize
method, looks like there is a commit to do this, but looks like it was merged only to 6.8.2 branch - this probably needs to merged into other branches as well when building with the above change in vn-nl-libraries.
For now I just added this change on top of the master branch commit locally to build and use this successfully for v7.7.0
@lasagar I haven't uploaded it anywhere, but if you follow my recommendation above you can build it yourself. Let me know if you have any questions
support the version after ES-7.9 ? In other words, can compile compatible v7.9 by self?