This discussion is archived
4 Replies Latest reply: Feb 16, 2012 1:18 PM by 900576 RSS

Bulk Complete Error

900576 Newbie
Currently Being Moderated
Hello,

I am currently having an issue with the Complete Bulk stored proc call that I am executing through the Jena Adapter. The problem is when the stored proc attempts to load an invalid date, here is the exception:

ERROR[2012-02-03 23:02:40,115] - [[STUCK] ExecuteThread: '0' ] - [OracleJenaModelProvider] - Could not complete bulk update due to SQL Exception.
java.sql.SQLException: ORA-13199: During LBV: [03-FEB-12 11.14.56.611349000 PM -05:00]
ORA-13199: Element Parse Error: Invalid date/time value [debug info: GCVN-timestamp: 0000-00-00T00:00:00] (value: "0000-00-00T00:00:00"^^<http://www.w3.org/
2001/XMLSchema#dateTime>) [
ORA-06512: at "MDSYS.MD", line 1723
ORA-06512: at "MDSYS.MDERR", line 17
ORA-06512: at "MDSYS.SDO_RDF", line 29
ORA-06512: at "MDSYS.SDO_RDF_INTERNAL", line 1233
ORA-06512: at line 1
ORA-06512: at "MDSYS.SDO_RDF_INTERNAL", line 2465

]
ORA-06512: at "MDSYS.MD", line 1723
ORA-06512: at "MDSYS.MDERR", line 17
ORA-06512: at "MDSYS.SDO_RDF_INTERNAL", line 2616
ORA-06512: at "MDSYS.SDO_RDF_INTERNAL", line 6091
ORA-06512: at "MDSYS.SDO_RDF", line 707
ORA-06512: at "MDSYS.RDF_APIS", line 893
ORA-06512: at line 1


We pass the date through the XSDDatatype.XSDdateTime.unparse(value) method to return the Node that we insert into the staging table. This does not throw any exception or error stating that the string created is "Invalid".


We are running with the 11.2.0.3 version of Oracle DB and the latest Jena Adapter.

Thanks
-MichaelB
  • 1. Re: Bulk Complete Error
    alwu Pro
    Currently Being Moderated
    Hi,

    Could you please cut & paste here the code snippet you used to run the data loading? Did you use the StatusListener?

    Thanks,

    Zhe
  • 2. Re: Bulk Complete Error
    900576 Newbie
    Currently Being Moderated
    This is more or less the code that we are using to load the data into the Staging table.

    public void performBulkUpload(Model model) throws Exception {
    GraphOracleSem graph = getModel().getGraph();
    OracleBulkUpdateHandler handler = graph.getBulkUpdateHandler();
    handler.prepareBulk(model, "SEM_DATA", null, null, null);
    }

    This is how we complete bulk:

    public void completeBulk(String completeBulkFlags) throws Exception {
    GraphOracleSem graph = null;
    try {
    graph = getModel().getGraph();
    try {
    graph.dropApplicationTableIndex();
    } catch (SQLException e) {}
    graph.getBulkUpdateHandler().completeBulk(completeBulkFlags, null);
    graph.rebuildApplicationTableIndex();
    finally {
    if (graph != null)
    graph.close();
    }
    }


    We are not using a StatusListener. I looked at that and assumed since the triple was inserted into the staging table the StatusListener would not help in this situation.

    Does the StatusListener pick up that this date is considered invalid?


    Thanks
    -MichaelB
  • 3. Re: Bulk Complete Error
    alwu Pro
    Currently Being Moderated
    Hi MichaelB,

    Actually using StatusListener makes a difference.

    Here is what I did. I constructed a N-TRIPLE file based on the error message you posted.

    <urn:s> <urn:p> "0000-00-00T00:00:00"^^<http://www.w3.org/2001/XMLSchema#dateTime> .

    I used a prepareBulk call with a StatusListener. The debug trace showed that

    hit illegal statement with object "0000-00-00T00:00:00"^^http://www.w3.org/2001/XMLSchema#dateTime

    Later, completeBulk went through without a problem. No triples were loaded because the only triple we have is illegal.

    Thanks,

    Zhe
  • 4. Re: Bulk Complete Error
    900576 Newbie
    Currently Being Moderated
    It appears to be catching the 'Invalid Triple' and logging it correctly.

    And I am returning '0' which tells the BulkUpdateHandler to skip that triple, and not add it to the staging table.

    Thanks!
    -MichaelB

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points