9 Replies Latest reply on May 19, 2008 5:36 PM by alwu-Oracle

    Batch loader error - ORA-55328

    630782
      Hi,

      I got the following error when I used the oracle.spatial.rdf.client.BatchLoader to load the data file into the database.

      Loading up to rows = 1431875
      java.sql.BatchUpdateException: ORA-55303: SDO_RDF_TRIPLE_S constructor failed: batch-mode + BNode-non-reuse
      M= ORA-55328: literal value "Pseudoalteromonas atlantica strain T6c" insert attempt failed
      ORA-06512: at "MDSYS.MD", line 1723
      ORA-06512: at "MDSYS.MDERR", line 17
      ORA-06512: at "MDSYS.SDO_RDF_TRIPLE_S", line 333

      at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:602)
      at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1248)
      at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3381)
      at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3462)
      at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.ja
      at oracle.spatial.rdf.client.NTripleConverter.loadNTriple(NTripleConverter.java:601)
      at oracle.spatial.rdf.client.BatchLoader.main(BatchLoader.java:302)

      The triple with that particular literal is:
      <http://purl.uniprot.org/taxonomy/342610> <http://purl.uniprot.org/core/otherName> "Pseudoalteromonas atlantica strain T6c" .

      I can't see any problem with the triple.

      What cause the error and how to fix it? Thanks,

      Weihua
        • 1. Re: Batch loader error - ORA-55328
          Mannamal-Oracle
          Hi Weihua,

          Do you have a support license with Oracle? If so, can you file a service request with the issue?

          Thanks,
          Melli
          • 2. Re: Batch loader error - ORA-55328
            630782
            Sorry, I don't have the support license. I just downloaded the 11g on my machine and played with it. Thanks,

            Weihua
            • 3. Re: Batch loader error - ORA-55328
              Mannamal-Oracle
              Can you apply the patch (available under 'software downloads' at http://www.oracle.com/technology/tech/semantic_technologies/index.html) and re-try?

              You will need to drop the models (and any other RDF objects) and the RDF network before applying the patch. You will be re-trying the load from scratch.

              Melli
              • 4. Re: Batch loader error - ORA-55328
                630782
                Hi Melli,

                Do you mean "Oracle Database 11g Release 1 - Patch Set for 11.1.0.6"? I've already done that. Thanks,

                Weihua
                • 5. Re: Batch loader error - ORA-55328
                  JorgeB-Oracle
                  Hi,

                  Not sure what the problem is but it may have been caused by some event in the database. Can you try it again? when nobody is connected, and check the alert log for errors around the time you try the load. What is the command you are using?

                  You can use also the load with sqlloader which is faster.

                  Here is an example:

                  connect / as sysdba

                  spool install_biopax.txt

                  -- Create User Biopax

                  create user biopax identified by biopax
                  default tablespace rdf_users
                  temporary tablespace temp;

                  grant create session, resource to biopax;

                  connect biopax/biopax

                  -- Create table to hold the references to the triples for the Biopax Model

                  create table biopax_rdf_data (id number, triple sdo_rdf_triple_s);
                  execute sem_apis.create_sem_model('biopax', 'biopax_rdf_data', 'triple');

                  -- Create table to use as staging table to load triples via
                  -- sem_apis.bulk_load_from_staging_table

                  CREATE TABLE stable (
                  RDF$STC_sub varchar2(4000) not null,
                  RDF$STC_pred varchar2(4000) not null,
                  RDF$STC_obj varchar2(4000) not null,
                  RDF$STC_sub_ext varchar2(64),
                  RDF$STC_pred_ext varchar2(64),
                  RDF$STC_obj_ext varchar2(64),
                  RDF$STC_canon_ext varchar2(64)
                  );


                  -- Load the n-triples into staging table with sqlploader

                  host $ORACLE_HOME/bin/sqlldr userid=biopax/biopax
                  control=$ORACLE_HOME/md/demo/network/rdf_demos/bulkload.ctl data=biopax.nt direct=true skip=0
                  load=1000000 discardmax=0 bad=d0.bad discard=d0.rej log=d0.log errors=100000000

                  -- Necessary privileges to use sem_apis.bulk_load_from_staging_table

                  grant insert on biopax_rdf_data to mdsys;
                  grant SELECT, UPDATE(RDF$STC_sub_ext,RDF$STC_pred_ext,RDF$STC_obj_ext,RDF$STC_canon_ext)
                  on stable to MDSYS;

                  -- Load the data into the model from staging table

                  exec sem_apis.bulk_load_from_staging_table('biopax','biopax','stable');

                  -- A couple of queries to test the Biopax ontology

                  select p, o
                  FROM TABLE(SEM_MATCH
                  ('(<http://www.biopax.org/release/biopax-level2.owl#pathway> ?p ?o)',
                  SDO_RDF_Models('biopax'),
                  NULL,
                  NULL,
                  null));


                  select p, o
                  FROM TABLE(SEM_MATCH
                  ('(bi:pathway ?p ?o)',
                  SDO_RDF_Models('biopax'),
                  NULL,
                  SEM_Aliases(SEM_Alias('bi','http://www.biopax.org/release/biopax-level2.owl#')),
                  null));

                  spool off
                  ---------------------------------------
                  I can send you the ntriple file if you are interested in testing this in particular, for the moment you can try it with your own model and ntriple.

                  Some other question for verification:
                  Did you run $ORACLE_HOME/md/admin/catsem11i.sql ?
                  • 6. Re: Batch loader error - ORA-55328
                    630782
                    Thanks for the sample script. I've already used the bulkload.ctl coming with the Demo to do the bulk load. The bulk load works fine without rejecting any triples, and it is much faster than the batch loading. So the bulk loading is definitely the first choice if large set of data needs to be loaded.

                    Weihua
                    • 7. Re: Batch loader error - ORA-55328
                      alwu-Oracle
                      Yes, when you have lots of data to load, you should use bulk loader. It is documented in the user's manual.

                      It remains unclear why that triple cause loading to fail. Have you tried using
                      Oracle Jena Adaptor's addInBatch API?
                      • 8. Re: Batch loader error - ORA-55328
                        639645
                        Hi,

                        I'm trying to connect Oracle 10.2 g und Jena version 2.5.5 using JDBC.

                        Which drivers should I install to access my oracle database tables from java/jena?
                        I have oracle 10g installed on windows with ojdbc14.jar JDBC?

                        Datenbank name: jenaDB
                        User im datenbank: JenaUser
                        Port: 1521
                        Lokale host : i00b0000

                        ;_--------------------------------------------------------------
                        Batch file :

                        java -cp.;
                        lib/antlr-2.7.5.jar;
                        lib/arq.jar;lib/arq-extra.jar;
                        lib/concurrent.jar;
                        lib/iri.jar;lib/icu4j_3_4.jar;
                        lib/jena.jar;lib/jenatest.jar;
                        lib/json.jar;
                        lib/junit.jar;
                        lib/log4j-1.2.12.jar;
                        lib/lucene-core-2.2.0.jar;
                        lib/commons-logging-1.1.1.jar;
                        lib/xercesImpl.jar;lib/xml-apis.jar;
                        lib/wstx-asl-3.0.0.jar;
                        lib/stax-api-1.0.jar;
                        lib/ojdbc14.jar jenaDB.dbcreate -db jdbc:oracle:thin:@i00b0000:1521:jenaDB -dbType oracle -dbUser JenaUser -dbPassword 12300 -model xx

                        ;_--------------------------------------------------------------

                        Error code:     "please say which JDBC driver to use"

                        Thanks a lot for all the help,
                        Bita
                        • 9. Re: Batch loader error - ORA-55328
                          alwu-Oracle
                          You need to patch up your 10gR2 DB as instructed.

                          For JDBC connection, put ojdbc14.jar in your classpath should work.

                          What is the full error stack trace?