JDBC connection to Virtuoso under LOG4JDBC and DBCP

Submitted by admin on Wed, 02/24/2016 - 12:25

I started to use Apache DBCP because I stumbled upon this error when I was running thousands of SQL queries.

virtuoso.jdbc4.VirtuosoException: Connection failed: Cannot assign requested address


For initial settings, please check this previous post here

DBCP (Database Connection Pools) is described here

JDBC connection to Virtuoso under LOG4JDBC

Submitted by admin on Wed, 02/24/2016 - 12:09

In the following I describe two ways to connect. You must have already checked this page for more information.

The JDBC driver is available under the folder


assuming you have already cloned the git repository from here

Exporting CSV data from Virtuoso

Submitted by admin on Mon, 02/08/2016 - 15:39

To export csv

cbw.DBA.csvExport('SELECT * FROM cbw.DBA.mytable', '/Users/asanchez75/Trash/instances.csv');

To import csv
csv_load_file('/Users/asanchez75/Trash/myfile.csv',0, null, 'cbw.DBA.mytable');

You must create the procedure before

create procedure
exmo.DBA.csvExport( IN in_query VARCHAR, IN filename VARCHAR )

declare query varchar;
query := split_and_decode(in_query,0,'%');