Virtual import jdbc connection fails

Hi Stardog Team,

we had the following issue:

Try to load data from a jdbc postgres db remotly and pushing it remotely to a stardog instance, the message is:
Unable to load class: org.postgresql.Driver from ClassLoader:sun.misc.Launcher$AppClassLoader@1e80bfe8;

The failing code snippet:
/opt/stardog/bin/stardog-admin --server virtual import -p ********* -u ***** -g $CTGRAPH ctDB /data/stardog/ /data/mappings/mapping.ttl

the /data/stardog/ file looks like this:

we copied the postgresql-42.2.5.jar driver to:

and modyfied the CLASSPATH pointing to these paths.

Need the odbc driver also be prepared on the stardog machine itself or is the virtual import job executes on the client container?

We used version 6.1.1 for client and server, the former 5.3.6 version ends just with with "connection refused"



Hi Christian,

"Unable to load class: org.postgresql.Driver" means that Stardog is unable to find the JDBC jar on its classpath.

Try setting an environment variable called $STARDOG_EXT to a directory somewhere, and put the jar in there. Then restart your server and hopefully it will pick that directory up.

I'd also suggest that you revert the changes that you made to the class path. What you did should have worked but it would have required you to restart the server. @Stephen 's suggestion would be the preferred way to do it.

If I understand correctly what you're asking, the jar needs to be installed on the server and not on any client machines. The database connection and mapping takes place on the server not the client.

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