BITES CoreNLP Error

Hi,

I'm trying to get Stardog v7.9.1 working with GitHub - stardog-union/bites-corenlp: CoreNLP extractors for Stardog as per your documentation here Extending BITES | Stardog Documentation Latest

I get this error when I post a PDF document via stardog doc put --rdf-extractors CoreNLPMentionRDFExtractor bites test.pdf -vvv

WARN  2022-05-30 04:55:45,296 [stardog-user-5] com.complexible.stardog.protocols.http.server.StardogUndertowErrorHandler:accept(68): Unexpected exception was handled by the server
java.lang.NoSuchMethodError: 'java.util.Set com.complexible.stardog.docs.nlp.impl.BasicMentionExtractor.extract(java.io.Reader)'
        at com.complexible.stardog.docs.corenlp.CoreNLPMentionRDFExtractor.extractFromText(CoreNLPMentionRDFExtractor.java:66) ~[bites-corenlp-1.2.1-all.jar:?]
        at com.complexible.stardog.docs.extraction.tika.TextProvidingRDFExtractor.extract(TextProvidingRDFExtractor.java:46) ~[stardog-bites-core-7.9.1.jar:?]
        at com.complexible.stardog.docs.extraction.tika.TextProvidingRDFExtractor.extract(TextProvidingRDFExtractor.java:28) ~[stardog-bites-core-7.9.1.jar:?]
        at com.complexible.stardog.docs.db.ConnectableBitesConnectionImpl.lambda$extract$3(ConnectableBitesConnectionImpl.java:171) ~[stardog-bites-core-7.9.1.jar:?]
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) ~[?:?]
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) ~[?:?]
        at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) ~[?:?]
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) ~[?:?]
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) ~[?:?]
        at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) ~[?:?]
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
        at java.util.stream.ReferencePipeline.reduce(ReferencePipeline.java:553) ~[?:?]
        at com.complexible.stardog.docs.db.ConnectableBitesConnectionImpl.addRDFContent(ConnectableBitesConnectionImpl.java:114) ~[stardog-bites-core-7.9.1.jar:?]
        at com.complexible.stardog.docs.db.ConnectableBitesConnectionImpl.putDocument(ConnectableBitesConnectionImpl.java:227) ~[stardog-bites-core-7.9.1.jar:?]
        at com.complexible.stardog.docs.db.ConnectableBitesConnectionImpl.putDocument(ConnectableBitesConnectionImpl.java:213) ~[stardog-bites-core-7.9.1.jar:?]
        at com.complexible.stardog.docs.protocols.http.server.BitesHttpService.modifyDocument(BitesHttpService.java:279) ~[stardog-bites-protocols-http-server-7.9.1.jar:?]
        at com.stardog.http.server.undertow.jaxrs.ExtractRoutes.lambda$handleIt$5(ExtractRoutes.java:192) ~[stardog-protocols-http-server-7.9.1.jar:?]
        at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) [shiro-core-1.8.0.jar:1.8.0]

and no triples are generated from the document.

It looks like it was last built against Stardog 7.3.0 and the current version is 7.9.1 so there could have been a change that requires a rebuild. Should be minor.

Indeed there is. Give this a try. No guarantees but it builds, passes all tests and should get you going until something more official is released. Best I can do in 24hrs on a holiday weekend :wink:

(you'll need to rename it from *.zip to *.jar I needed to do that so that I could upload it)

bites-corenlp-1.2.1-hotfox.zip (9.2 KB)