5 Replies Latest reply on Jul 31, 2009 9:14 PM by alwu-Oracle

    Jena batch load error; ORA-55315: batch load attempt failed:

    655091
      I am trying to load the data from a rdf file into an Oracle database through the Jena adaptor (Oracle 11.1.0.7, Jena Adaptor rel 2).

      The code looks something like this

           //Read model from file
      Model model = ModelFactory.createDefaultModel();
      model.read(new FileReader(fileName),"");
           
           //Initialize Oracle/Jena model
      Oracle oracle = new Oracle(url, userName, passwd);

      GraphOracleSem g = new GraphOracleSem(oracle,modelName, apptable_name,
      modelName +"_RI", // entailment name
      "***_NS", // prefix mapping name
      false, // don't erase
      true, // batchMode
      true, // nologging
      true, // blank node fidelity
      null // attachment
      );
      Model modelDest = new ModelCom(g);

           //Upload     
      ((OracleBulkUpdateHandler) g.getBulkUpdateHandler()).addInBatch(GraphUtil.findAll(model.getGraph()), tableSpaceName);

      I get an SQL error:
      ORA-55315: batch load attempt failed: SQLERRM=ORA-55302: insufficient privileges for batch loadingORA-06512: at "MDSYS.MD", line 1723

      Has anybody seen this/help me??

      The complete log is below:

      Thanks
      Ram
      ---

      [DEBUG] GraphOracleSem - GraphOracleSem: constructor
      [DEBUG] Oracle - getConnection: create new connection
      [DEBUG] Oracle - getConnection: bHasNumTripleID false
      [DEBUG] Oracle - executeQuery: select 1 from v$version where banner like '%11.1.0.6%'
      [DEBUG] GraphOracleSem - GraphOracleSem: not v11.1.0.6
      [DEBUG] GraphOracleSem - GraphOracleSem: ruleIndexName IAM_RI
      [DEBUG] GraphOracleSem - GraphOracleSem: username iam_user
      [DEBUG] GraphOracleSem - isModel: start
      [DEBUG] OraclePrefixMapping - ensureInitialized: start
      [DEBUG] Oracle - executeQuery: SELECT * from IAM1_NS
      [DEBUG] OraclePrefixMapping - ensureInitialized: done
      [DEBUG] GraphOracleSem - retrieveModelId: starts
      [DEBUG] Oracle - executeCall: stmt = create procedure oracle_orardf_grant(i varchar2) as pragma autonomous_transaction; begin execute immediate 'grant select on "MDSYS"."RDFM_' || trim(dbms_assert.qualified_sql_name(i)) || '" to SYS'; end;
      [DEBUG] Oracle - executeCall: stmt = create function oracle_orardf_getplist(name VARCHAR2, suc out int) return varchar2 as val varchar2(32767); mn varchar2(4000); minv number; v number; begin val := ''; suc := 0; begin mn := dbms_assert.qualified_sql_name(trim(upper(name))); execute immediate 'select min(p_value_id) from "MDSYS"."RDF' || mn || '" ' into minv; val := minv; while true loop execute immediate 'select min(p_value_id) from "MDSYS"."RDF' || mn || '" where p_value_id > :1' into v using minv; if (v is null) then exit; end if; minv := v; begin val := val ||','|| v; exception when others then return null; end; end loop; exception when others then return null; end; suc := 1; return nvl(val,'null'); end;
      [DEBUG] Oracle - executeCall: stmt = create function oracle_orardf_res2vid(uri in varchar2, lt in varchar2 default null, lang in varchar2 default null) return number result_cache relies_on (mdsys.rdf_value$) as vid number; oid number; pre varchar2(4000); suf varchar2(512); begin if (substr(uri,1,2)='_:') then SELECT /*+ INDEX(v RDF_VAL_NAMETYLITLNG_IDX) */ VALUE_ID into vid FROM MDSYS.RDF_VALUE$ v WHERE VALUE_TYPE='BN' AND VNAME_PREFIX=uri; elsif (substr(uri,1,1)='"') then sem_apis.lookup_literal(substr(uri,2, length(uri)-2), lt, lang, vid, oid); else pre := sem_apis.value_name_prefix(uri,'UR'); if (pre = uri) then suf := null; else suf := substr(uri, length(pre) + 1); end if; SELECT /*+ INDEX(v RDF_VAL_NAMETYLITLNG_IDX) */ VALUE_ID into vid FROM MDSYS.RDF_VALUE$ v WHERE VALUE_TYPE='UR' AND (VNAME_PREFIX,VNAME_SUFFIX) IN ((pre,suf)); end if; return vid; end;
      [DEBUG] Oracle - executeCall: stmt = create function oracle_orardf_vid2uri(vid number) return varchar2 deterministic result_cache relies_on (mdsys.rdf_value$) as valueuri varchar2(4000); begin execute immediate ' select value_name from mdsys.rdf_value$ where value_id =:1 and VALUE_TYPE=''UR''' into valueuri using vid; return valueuri; exception when no_data_found then return null; end;
      loaded model..
      Start batch uploading
      [DEBUG] TripleSource - TripleSource: takes an iterator
      [DEBUG] OracleBulkUpdateHandler - addInBatch: start
      [DEBUG] GraphOracleSem - commitTransaction: start
      [DEBUG] Oracle - executeQuery: select sys_context('userenv','sid') sid, sys_context('userenv','session_userid') userid from dual
      [DEBUG] OracleBulkUpdateHandler - addInBatch: sid = 11, userid = 100
      [DEBUG] Oracle - executeSQL: stmt = lock table "IAM_RDF_DATA" in exclusive mode nowait
      [DEBUG] OracleBulkUpdateHandler - prepareLoad: tmpTabName = RDF_LINK$_64b
      [WARN] OracleBulkUpdateHandler - addInBatch: [0 ] sqle <java.sql.SQLException: ORA-55315: batch load attempt failed: SQLERRM=ORA-55302: insufficient privileges for batch loadingORA-06512: at "MDSYS.MD", line 1723
      ORA-06512: at "MDSYS.MDERR", line 17
      ORA-06512: at "MDSYS.SDO_RDF_INTERNAL", line 5445
      ORA-06512: at "MDSYS.MD", line 1723
      ORA-06512: at "MDSYS.MDERR", line 17
      ORA-06512: at "MDSYS.SDO_RDF_INTERNAL", line 5564
      ORA-06512: at "MDSYS.RDF_APIS", line 930
      ORA-06512: at line 1
      java.sql.SQLException: ORA-55315: batch load attempt failed: SQLERRM=ORA-55302: insufficient privileges for batch loadingORA-06512: at "MDSYS.MD", line 1723
      ORA-06512: at "MDSYS.MDERR", line 17
      ORA-06512: at "MDSYS.SDO_RDF_INTERNAL", line 5445
      ORA-06512: at "MDSYS.MD", line 1723
      ORA-06512: at "MDSYS.MDERR", line 17
      ORA-06512: at "MDSYS.SDO_RDF_INTERNAL", line 5564
      ORA-06512: at "MDSYS.RDF_APIS", line 930
      ORA-06512: at line 1

      at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
      at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:131)
      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:204)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
      at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1034)
      at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:191)
      at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:950)
      at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1222)
      at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3387)
      at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3488)
      at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:3840)
      at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1086)
      at oracle.spatial.rdf.client.jena.OracleBulkUpdateHandler.prepareLoad(OracleBulkUpdateHandler.java:1066)
      at oracle.spatial.rdf.client.jena.OracleBulkUpdateHandler.addInBatch(OracleBulkUpdateHandler.java:858)
      at oracle.spatial.rdf.client.jena.OracleBulkUpdateHandler.addInBatch(OracleBulkUpdateHandler.java:793)
      at oracle.spatial.rdf.client.jena.OracleBulkUpdateHandler.addInBatch(OracleBulkUpdateHandler.java:416)
      at OracleIF.OracleUploader.main(OracleUploader.java:95)

      java.sql.SQLException: ORA-55315: batch load attempt failed: SQLERRM=ORA-55302: insufficient privileges for batch loadingORA-06512: at "MDSYS.MD", line 1723
      ORA-06512: at "MDSYS.MDERR", line 17
      ORA-06512: at "MDSYS.SDO_RDF_INTERNAL", line 5445
      ORA-06512: at "MDSYS.MD", line 1723
      ORA-06512: at "MDSYS.MDERR", line 17
      ORA-06512: at "MDSYS.SDO_RDF_INTERNAL", line 5564
      ORA-06512: at "MDSYS.RDF_APIS", line 930
      ORA-06512: at line 1

      at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
      at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:131)
      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:204)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
      at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1034)
      at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:191)
      at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:950)
      at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1222)
      at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3387)
      at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3488)
      at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:3840)
      at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1086)
      at oracle.spatial.rdf.client.jena.OracleBulkUpdateHandler.prepareLoad(OracleBulkUpdateHandler.java:1066)
      at oracle.spatial.rdf.client.jena.OracleBulkUpdateHandler.addInBatch(OracleBulkUpdateHandler.java:858)
      at oracle.spatial.rdf.client.jena.OracleBulkUpdateHandler.addInBatch(OracleBulkUpdateHandler.java:793)
      at oracle.spatial.rdf.client.jena.OracleBulkUpdateHandler.addInBatch(OracleBulkUpdateHandler.java:416)
      at OracleIF.OracleUploader.main(OracleUploader.java:95)
      Jul 29, 2009 12:46:54 PM OracleIF.OracleUploader main
      SEVERE: null
      java.sql.SQLException: ORA-55315: batch load attempt failed: SQLERRM=ORA-55302: insufficient privileges for batch loadingORA-06512: at "MDSYS.MD", line 1723
      ORA-06512: at "MDSYS.MDERR", line 17
      ORA-06512: at "MDSYS.SDO_RDF_INTERNAL", line 5445
      ORA-06512: at "MDSYS.MD", line 1723
      ORA-06512: at "MDSYS.MDERR", line 17
      ORA-06512: at "MDSYS.SDO_RDF_INTERNAL", line 5564
      ORA-06512: at "MDSYS.RDF_APIS", line 930
      ORA-06512: at line 1

      at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
      at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:131)
      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:204)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
      at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1034)
      at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:191)
      at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:950)
      at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1222)
      at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3387)
      at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3488)
      at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:3840)
      at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1086)
      at oracle.spatial.rdf.client.jena.OracleBulkUpdateHandler.prepareLoad(OracleBulkUpdateHandler.java:1066)
      at oracle.spatial.rdf.client.jena.OracleBulkUpdateHandler.addInBatch(OracleBulkUpdateHandler.java:858)
      at oracle.spatial.rdf.client.jena.OracleBulkUpdateHandler.addInBatch(OracleBulkUpdateHandler.java:793)
      at oracle.spatial.rdf.client.jena.OracleBulkUpdateHandler.addInBatch(OracleBulkUpdateHandler.java:416)
      at OracleIF.OracleUploader.main(OracleUploader.java:95)