14 Replies Latest reply on Jan 3, 2008 3:10 PM by alwu-Oracle

    Batch loading with sdordf.jar.

    610533
      Hi Guys
      I have just tried a batch load with sdordf.jar.
      In my first attempt there was a mistake in the n3 file.
      After correcting the file and re running I now get the error.


      Connecting to jdbc:oracle:thin:...........
      Append mode
      Copy existing data out
      Just load triples into one column
      Temporary table already exists!
      java.sql.SQLException: ORA-00955: name is already used by an existing object
      ORA-06512: at "MDSYS.SDO_RDF_INTERNAL", line 3326
      ORA-06512: at "MDSYS.SDO_RDF_INTERNAL", line 3362
      ORA-06512: at "MDSYS.RDF_APIS", line 786
      ORA-06512: at line 1

      Can anyone tell me what the name of this temporary table is, so that I can get rid of it.

      Cheers

      Phil
        • 1. Re: Batch loading with sdordf.jar.
          560844
          Thanks for the response on my other post, I eventually gave up and decided the quickest path to a solution (and this is admittedly a bit dramatic, but guaranteed to work) was to blow away the database software (uninstall oracle entirely) and apply the patch on a fresh install and a new database.

          I did double-check my command history to make sure that I did all the steps in Section 2 of the Jena Adaptor Patch readme, so I'm not sure what caused the problem or what the real solution might be.
          • 2. Re: Batch loading with sdordf.jar.
            Mannamal-Oracle
            Phil,

            Could you try the following:

            connect as mdsys
            exec sdo_rdf.cleanup_batch_load(<name_of_table_containing_triple_column>)

            If you are using Oracle11g, may I ask why you are not using the bulk loader? That will be faster. (see section 1.7 in the Oracle 11g Semantic Technologies documentation).

            Matt,

            Do I understand from your note that you re-installed Oracle to try and resolve this issue? Were you able to use the batch loader after that? Again, we recommend using the bulk loader.

            Melli
            • 3. Re: Batch loading with sdordf.jar.
              560844
              He he... :-)

              Yes, I re-installed Oracle, the only thing I'm using this database for is development work, and I didn't know the correct solution to the problem, so rather than try a bunch of things that might not work, I tried the only thing that I knew would absolutely work and I was back to having working system in a few hours.

              So it was a rather drastic solution to the problem, but it did in fact work. I'll have a look at the bulk loader, its just that at this point I'm only working with an ontology a few thousands triples large and with only a few dozen instances, so the batch loader is pretty convenient for me to use.
              • 4. Re: Batch loading with sdordf.jar.
                610533
                Hi Melli

                I've installed the jena patch now.
                Thanks for the pointer.
                I'm have not yet looked at the bulk loader as the the demo files do not seem to have installed with my windows version.
                And the instructuions seem to refer to the files a lot.

                Do you know where I can get the demo files from?

                Cheers

                Phil
                • 5. Re: Batch loading with sdordf.jar.
                  Mannamal-Oracle
                  Hi Phil,

                  As mentioned in the documentation its location is at $ORACLE_HOME/md/demo/network/rdf_demos/

                  If its not there then that means you have not installed Oracle Database 11g Examples (formerly called companion CD). It is available at the Oracle Database 11g download page: http://www.oracle.com/technology/software/products/database/index.html

                  Once you install the examples you will find the bulkload demo files in the above location.

                  Melli
                  • 6. Re: Batch loading with sdordf.jar.
                    610533
                    Hi Mellie
                    After having a little break I have installed the jena patch during which I had to drop the network and model created before.

                    I tried running a batch load as before but I still get the error message saying the temporary table already exists.

                    I tried the clean up routine as suggested but get the error.

                    SQL> exec sdo_rdf.cleanup_batch_load('researchdata')
                    BEGIN sdo_rdf.cleanup_batch_load('researchdata'); END;

                    *
                    ERROR at line 1:
                    ORA-13199: Batch load cleanup failed. ORA-00942: table or view does not exist
                    ORA-06512: at "MDSYS.MD", line 1723
                    ORA-06512: at "MDSYS.MDERR", line 17
                    ORA-06512: at "MDSYS.SDO_RDF", line 1016
                    ORA-06512: at "MDSYS.SDO_RDF", line 1022
                    ORA-06512: at line 1

                    I run it as mdsys as you said.

                    Any other suggestions?
                    Cheers

                    Phil
                    • 7. Re: Batch loading with sdordf.jar.
                      Mannamal-Oracle
                      Hi Phil,

                      This will perhaps be easier to debug offline, and we perhaps we should involve Oracle Support. Can you email me at <melliyal> dot <annamalai> <at> oracle <dot> com and we can take it from there?

                      Thanks,
                      Melli
                      • 8. Re: Batch loading with sdordf.jar.
                        610533
                        Hi Melli

                        Don't worry, I have got the bulk loader working.
                        Eh not bad, less hassle than I thought it was going to be especially as the cntrl files worked with minimal change.

                        Several Million triples loaded in just a few minutes even though the db was on a very old slow desktop.

                        Cheers

                        Phil
                        • 9. Re: Batch loading with sdordf.jar.
                          Mannamal-Oracle
                          Excellent!

                          Yes, the new bulk loader is extremely fast.

                          If you know what caused the earlier problem, and if you think its something others might run into, it would be great if you could post how the problem got resolved.

                          Melli
                          • 10. Re: Batch loading with sdordf.jar.
                            610533
                            HI Melli

                            I didn't get the batch loader to work.
                            I did it through the bulk loader so I've no idea what was going on.

                            I will try to create a new table and batch load into it.
                            Just to see if there is something left over from when I first tried which started the thread.

                            From the error I get it is saying that a temp table already exists.
                            Is it possible to get someone to look at the code and see where the error is thrown which may give us an indication?

                            Cheers
                            Phil
                            • 11. Re: Batch loading with sdordf.jar.
                              610533
                              HI Melli

                              I didn't get the batch loader to work.
                              I did it through the bulk loader so I've no idea what was going on.

                              I will try to create a new table and batch load into it.
                              Just to see if there is something left over from when I first tried which started the thread.

                              From the error I get it is saying that a temp table already exists.
                              Is it possible to get someone to look at the code and see where the error is thrown which may give us an indication?

                              Cheers
                              Phil
                              • 12. Re: Batch loading with sdordf.jar.
                                alwu-Oracle
                                Could you login using sqlplus as MDSYS,

                                and then do

                                select * from tab where tname like 'RDF_LINK$_%';
                                • 13. Re: Batch loading with sdordf.jar.
                                  610533
                                  Hi Alan

                                  The sql gives

                                  tname -> RDF_LINK$_TEMPBM$
                                  tabtype -> TABLE

                                  Cheers

                                  Phil
                                  • 14. Re: Batch loading with sdordf.jar.
                                    alwu-Oracle
                                    Please, as MDSYS, drop that table RDF_LINK$_TEMPBM$ and re-try the batch loader.