0

I found in the RDF4J documentation here http://docs.rdf4j.org/custom-sparql-functions/ that it supports creating custom functions with Java.

I attempted to implement this palindrome example and run the example query against GraphDB. I am using the RDF4J java libraries to execute my queries against GraphDB. When executing the query, I get no obvious errors but no results were returned.

Does GraphDB support running custom RDF4J functions? The documentation for RDF4J custom functions states you must place the JAR on your classpath and it will work. What classpath? Can I build it into my project that is executing queries via RDF4J libraries or do I place the custom function JAR on the classpath of GraphDB before I start the server?

medium
  • 4,136
  • 16
  • 55
  • 66

1 Answers1

1

In case the graphdb comes as a platform dependent embedded launcher, e.g. .exe, .deb etc. you'll need an additional step.

Under the installation folder (say GrapDBFree), there is a folder named app. First, place the jar with the custom function within app/lib folder and then, edit the app/GraphDBFree.cfg file by adding the jar to the app.classpath= entry declared there.

Damyan Ognyanov
  • 791
  • 3
  • 7
  • Thanks! Yea I figured it out last night. I didn't see any of that mentioned in the documentation and assumed that it just picked up the jar automatically. I appreciate the help – medium Dec 13 '18 at 14:49