Stardog not able to find custom extractor

Hi there,

I'm creating a custom extractor following this example.

However, I got the following error when adding a document via StardocsConnection.

Unknown extractor name: com.some.package.name.CustomExtractor

I have the file META-INF/service/com.complexible.stardog.docs.extraction.RDFExtractor pointing the custom extractor and the following dependency in the pom.xml file

  <dependency>
  	<groupId>com.complexible.stardog.stardocs</groupId>
  	<artifactId>stardog-stardocs-protocols-embedded</artifactId>
  	<version>${stardog.version}</version>
  	<type>pom</type>
  </dependency>

Please let me know what I'm missing.

Thanks!!

Is your com.some.package.name.CustomExtractor available on the classpath of the running Stardog server?

Ah, that is it. The example uses an embedded server. Mine does not.

I put the JAR that contains the custom extractor into the <STARDOG_HOME>/server/pack directory; restart Stardog server and it works now.

Thank you!

FYI: Stardog will, on startup, look for a STARDOG_EXT environment variable, and will bring in any jars it finds there. This proves useful so that in the future if/when you upgrade you don’t have to remember to put external jars inside the new install directory.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.