I had problems executing rdf_db from inside Bioclipse, but was getting problems similar to this one:
Running JavaScript... org.mozilla.javascript.WrappedException: Wrapped java.lang.RuntimeException: Failed to run method (line: #9) jpl.PrologException: PrologException: error(existence_error(procedure, /(rdf_load, 1)), context(:(system, /('$c_call_prolog', 0)), _0)) JavaScript done.
This was solved by adding the following line to the blipstart.pl file:
:- use_module(library('semweb/rdf_db')).
So the last part of the file now looks like:
... /* blip: main command line interface */ :- use_module(bio(blipkit)). :- use_module(bio(blipkit_ontol)). :- use_module(bio(blipkit_phylo)). :- use_module(bio(blipkit_fasta)). :- use_module(bio(blipkit_sb)). :- use_module(bio(blipkit_web)). :- use_module(library('semweb/rdf_db')).
I got another problem then:
Running JavaScript... org.mozilla.javascript.WrappedException: Wrapped java.lang.RuntimeException: Failed to run method (line: #9) jpl.PrologException: PrologException: error(existence_error(source_sink, '\'/home/samuel/bioclipse-workspace/runningbioclipse/nmrshiftdata.5k.rdf.xml\''), _0) JavaScript done.
But it seems THAT problem was just due to either the path to the rdf file, or the checking of term type in the "isAtom" function in JPLQueryWrapper.java, because it didn't recognize '/' and "'" as valid characters in atom names, so that was solved after fixing the relevant Java function.
Furthermore, one thing I tried, which was actually NOT, the solution, was to add the following path to the LD_PRELOAD statement, in my Eclipse startup script:
/home/samuel/install/swi-prolog/pl57/packages/semweb/rdf_db.so
So, now the script was:
export LD_LIBRARY_PATH="/usr/lib/jvm/java-6-sun-1.6.0.15/jre/lib/i386/client:/usr/lib/jvm/java-6-sun-1.6.0.15/jre/lib/i386" LD_PRELOAD="/usr/local/lib/pl-5.7.15/lib/i686-linux/libjpl.so:/home/samuel/install/swi-prolog/pl57/packages/semweb/rdf_db.so" eclipse &
Bus as said, this was NOT the solution.