Hi Jonathan,

Can you please use the Virtuoso trace_on() function to enable additional server side tracing to the virtuoso.log file as detailed at:

        http://docs.openlinksw.com/virtuoso/fn_trace_on.html

Then attempt to run the 2 test cases to produce the error and provide the resultant virtuoso.log where the trace information will be written to.

Note you can use the complementary trace_off() function to immediately turn off tracing when done ...

Best Regards
Hugh Williams
Professional Services
OpenLink Software
Web: http://www.openlinksw.com
Support: http://support.openlinksw.com
Forums: http://boards.openlinksw.com/support



On 28 Jul 2009, at 11:05, Jonathan Dray wrote:

Hi,

We have a problem with the construction of valid insert queries using Jena and virtuoso. We often manipulate a big volume of data which are converted to rdf and inserted into virtuoso.

A virtuoso update request is constructed and the exec method is called.

Now when the insert request is big, there are 2 cases of failure :

  * The number of lines is too important
  * A line size in the insert query is too big

Here is the excerpt from the stack trace containg the returned error message :

Caused by: com.hp.hpl.jena.update.UpdateException: Convert results are FAILED. at virtuoso.jena.driver.VirtuosoUpdateRequest.exec(Unknown Source) at fr.bnf.spar.rdf.jena.query.InsertQuery.execInsert (InsertQuery.java:44)
        ... 54 common frames omitted
Caused by: virtuoso.jdbc3.VirtuosoException: SQ199: Maximum size (32767) of a code vector exceeded by 131745 bytes. Please split the code in smaller units. at virtuoso.jdbc3.VirtuosoResultSet.process_result(Unknown Source)
        at virtuoso.jdbc3.VirtuosoResultSet.<init>(Unknown Source)
        at virtuoso.jdbc3.VirtuosoStatement.sendQuery(Unknown Source)
        at virtuoso.jdbc3.VirtuosoStatement.execute(Unknown Source)
        ... 56 common frames omitted

Here is the code that creates a VirtuosoUpdateRequest from a Jena Model Object with named graph support :

StringBuilder request = new StringBuilder();
request.append(PrefixContants.PREFIXES)
       .append("INSERT INTO GRAPH <")
       .append("namedgraph")
       .append("> {\n");
StmtIterator it = model.listStatements();
while(it.hasNext()) {
    Statement st = it.nextStatement();
    request.append(FmtUtils.stringForTriple(st.asTriple()))
           .append(" . ");
}
request.append("}");
VirtuosoUpdateRequest vur = VirtuosoUpdateFactory.create (request.toString(), virtGraph);
vur.exec()


First, is our construction of insert queries correct / efficient ?
Is this behaviour normal ? and if it is the case, do you provide any tool / librairy to split a query according to these limitations ? How do we preserve transactional behaviour if we still have to split an insert query into multiple queries ?

Thanks.
Regards,

Jonathan Dray
---------------------------------------------------------------------- -------- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj- july_______________________________________________
Virtuoso-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/virtuoso-devel

Reply via email to