12 Replies Latest reply on Jul 6, 2009 12:41 AM by alwu-Oracle

    Import of RDF-Triple

    701963
      Hello guys,

      I am trying to Import some N3-Triple to my Database.
      I opened SQL*PLUS and logged in with user: 'SYSTEM'

      First, I installed the RDF-stuff with SQL'PLUS by typing @catsem11i.sql;
      Then, i did the following steps:

      1) CREATE TABLESPACE rdf_tablespace
      DATAFILE '/local/oracle/app/oracle/oradata/THESEUSDl/rdf_tablespace.dat' SIZE 1024M REUSE
      AUTOEXTEND ON NEXT 256M MAXSIZE UNLIMITED
      SEGMENT SPACE MANAGEMENT AUTO;
      2) EXECUTE SDO_RDF.CREATE_RDF_NETWORK('rdf_tablespace');
      3) GRANT EXECUTE ON MDSYS.RDF_APIS_INTERNAL TO SYS;
      4) CREATE TABLE RDF_DATA (id NUMBER, triple SDO_RDF_TRIPLE_S);
      5) EXECUTE SDO_RDF.CREATE_RDF_MODEL('RDF', 'RDF_DATA', 'TRIPLE');

      Well, then I took my littel Java-file for importing the triples:

      here is my code:

      import java.io.IOException;
      import java.io.InputStream;
      import java.io.PrintStream;
      import java.sql.SQLException;

      import oracle.spatial.rdf.client.jena.GraphOracleSem;
      import oracle.spatial.rdf.client.jena.ModelOracleSem;
      import oracle.spatial.rdf.client.jena.Oracle;
      import oracle.spatial.rdf.client.jena.OracleBulkUpdateHandler;

      import com.hp.hpl.jena.graph.GraphUtil;
      import com.hp.hpl.jena.rdf.model.Model;
      import com.hp.hpl.jena.rdf.model.ModelFactory;
      import com.hp.hpl.jena.util.FileManager;

      public class Import {

      /**
      * @param args
      * @throws ClassNotFoundException
      * @throws SQLException
      * @throws IOException
      */
      public static void main(String[] args) throws ClassNotFoundException,
      SQLException, IOException {
      PrintStream psOut = System.out;
      String tbs = "rdf_tablespace";
      int method = 1;
      String className = "oracle.jdbc.driver.OracleDriver"; // path of driver
      // class
      Class.forName(className); // Load the Driver
      String DB_URL = "jdbc:oracle:thin:@URL:1521:THESEUSDB"; // URL of database
      String DB_USER = "SYSTEM"; // database user id
      String DB_PASSWD = "secret_pw"; // database password
      String DB = "Oracle"; // database type

      // Create database connection
      Oracle oracle = new Oracle(DB_URL, DB_USER, DB_PASSWD);

      // darf nicht mit einer zahl anfangen
      String modelName = "onehoundred";

      // create or open the default model
      Model model = ModelFactory.createDefaultModel();
      GraphOracleSem graph = new GraphOracleSem(oracle, modelName);
      // read data
      String filename = "C:\\Path
      sp2b_100000.n3";
      InputStream is = FileManager.get().open(filename);

      // for n3 files
      model.read(is, "", "N3");

      is.close();

      ModelOracleSem modelDest = ModelOracleSem.createOracleSemModel(oracle,
      modelName);

      GraphOracleSem g = modelDest.getGraph();
      g.dropApplicationTableIndex();

      //batch
      psOut.println("start batch load");
      ((OracleBulkUpdateHandler) g.getBulkUpdateHandler()).addInBatch(
      GraphUtil.findAll(model.getGraph()), tbs);
      psOut.println("end size " + modelDest.size());

      g.rebuildApplicationTableIndex();
      modelDest.close();

      // Close the database connection
      oracle.dispose();
      System.out.println("Ready.");

      }

      I run it - it takes about 3 minutes - and the i get the following result:

      start batch load
      end size 100073
      Ready.

      So far, so good. But now, i have a little problem. If i look into my Database (with DBVisualizer) , i cannot find my imported triples...
      I don't understand why. In my Java Code, I have "String tbs = "rdf_tablespace"" which I also created before with SQL*Plus. And in that tablespace should be my table "RDF_DATA", i guess. So do I understand anything wrong? Did I forget any step?
      Who can help? I am very desperate right now :-)
        • 1. Re: Import of RDF-Triple
          alwu-Oracle
          You should provide a correct tablespace for the tbs variable. Also, it is probably a good idea not to use SYSTEM as the user to create rdf/owl data.

          Based on your code and what you have done, could you login as SYSTEM from SQLPlus, and do the following?

          SQL> select count(1) from mdsys.rdfm_onehoundred;

          This query will show you how many unique triples are in the model "onehoundred"

          Note that, all the data you loaded goes to model "onehoundred" instead of the "RDF" model you created at the very beginning.
          This is because your model modelDest is created based on the modelName variable which is "onehoundred"

          Last point, with Jena Adaptor, there is no need to create application table and rdf/owl model explicitly.

          Hope it helps,

          Zhe Wu
          • 2. Re: Import of RDF-Triple
            701963
            Hello Zhe Wu,

            thank you for your fast reply. I could do the command you asked me to do:
            -------------------------------------------------------------------------------
            SQL> select count(1) from mdsys.rdfm_onehoundred;

            COUNT(1)
            ----------
            131360
            --------------------------------------------------------------------------------
            So it says, that my import was successful? But why did I create tables and models before importing the data, when I don't need these things at all? And how can I now find my triples? Because the next step I want and have to do is to send some queries to the database to measure the time for response.
            Can you or anyone tell me how to do that? Is there any tutorial or something like that how to measure the time?

            Waiting for your help :-)

            Christian
            • 3. Re: Import of RDF-Triple
              alwu-Oracle
              Yes. The loading was successful.

              When you use Jena Adaptor, you don't have to create application table/semantic model explicitly. They will be created automatically. However, if you are using SQL or PL/SQL APIs, you have to create them by yourself.

              To run queries, it is rather simple. There are two choices:

              1) To use Jena APIs, you can take a look at the sample code at
              http://www.oracle.com/technology/tech/semantic_technologies/documentation/jenaadaptor2_readme.html

              2) To use SQL APIs, you can take a look at the following OBE
              http://www.oracle.com/technology/obe/11gr1_db/datamgmt/nci_semantic_network/nci_semantics_les01.htm#t5

              Keep in mind that it is the "onehoundred" model that has all the triples.

              Thanks,

              Zhe Wu
              • 4. Re: Import of RDF-Triple
                701963
                Hello again,

                thanks for your reply.
                Now, I have another new problem. I have to import another "triple-package" with 1million triples. I use the same java code I posted a few days ago and create a new table called "onemillion". I run my program, but then, after a few minutes, i get a java heap space exception. I have read in different forums that I have to edit the memory. so I edited the Xms and Xmx variables in Eclipse to "Xms1024M and Xmx2056M", but I still get the same Exception.
                Does anybody know, how to solve this problem?

                Christian
                • 5. Re: Import of RDF-Triple
                  alwu-Oracle
                  Hi,

                  Did you use the following two lines in your eclipse.ini?

                  -Xms1024m
                  -Xmx2048m

                  One thing you can try is to use your own Java command line to run your program and set those memory settings on the command line. I use this approach and has never encountered a problem. You need to specify the classpath obviously.

                  Cheers,

                  Zhe Wu
                  • 6. Re: Import of RDF-Triple
                    701963
                    Hello once again,

                    I have now successfully imported all my triple-packages to different tablespaces. As I wrote in any posting before, I have to send some SPARQL-Queries to my tablespace now and want to measure the time for response.
                    My question now is, if anyone can tell me, what is missing in my java-code to do so.

                    Here the code:

                    import java.io.IOException;
                    import java.io.InputStream;
                    import java.io.PrintStream;
                    import java.sql.SQLException;

                    import oracle.spatial.rdf.client.jena.GraphOracleSem;
                    import oracle.spatial.rdf.client.jena.ModelOracleSem;
                    import oracle.spatial.rdf.client.jena.Oracle;
                    import oracle.spatial.rdf.client.jena.OracleBulkUpdateHandler;

                    import com.hp.hpl.jena.graph.GraphUtil;
                    import com.hp.hpl.jena.query.QueryExecution;
                    import com.hp.hpl.jena.query.QueryExecutionFactory;
                    import com.hp.hpl.jena.query.QueryFactory;
                    import com.hp.hpl.jena.query.QuerySolution;
                    import com.hp.hpl.jena.query.ResultSet;
                    import com.hp.hpl.jena.rdf.model.Model;
                    import com.hp.hpl.jena.rdf.model.ModelFactory;
                    import com.hp.hpl.jena.rdf.model.impl.ModelCom;
                    import com.hp.hpl.jena.util.FileManager;

                    public class Time {

                         /**
                         * @param args
                         * @throws ClassNotFoundException
                         * @throws SQLException
                         * @throws IOException
                         */
                         public static void main(String[] args) throws ClassNotFoundException,
                                   SQLException, IOException {
                              PrintStream psOut = System.out;
                              String tbs = "rdf_space"; // you should customize it
                              int method = 1;
                              String className = "oracle.jdbc.driver.OracleDriver"; // path of driver
                              // class
                              Class.forName(className); // Load the Driver
                              String DB_URL = "jdbc:oracle:thin:@URL"; // URL
                              // of
                              // database
                              String DB_USER = "SYSTEM"; // database user id
                              String DB_PASSWD = "secret_pw"; // database password
                              String DB = "Oracle"; // database type

                              // Create database connection
                              Oracle oracle = new Oracle(DB_URL, DB_USER, DB_PASSWD);
                              //+++TIME
                              String modelName = "hundred";
                              GraphOracleSem graph = new GraphOracleSem(oracle, modelName);
                              ModelCom modelCom = new ModelCom(graph);
                         
                              String queryString = " PREFIX ub: <http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#> "
                                        + " PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> "
                                        + " SELECT ?x ?y ?z "
                                        + " WHERE { "
                                        + " ?x rdf:type ub:GraduateStudent . "
                                        + " ?y rdf:type ub:University . "
                                        + " ?z rdf:type ub:Department . "
                                        + " ?x ub:memberOf ?z . "
                                        + " ?z ub:subOrganizationOf ?y . "
                                        + " ?x ub:undergraduateDegreeFrom ?y . " + " } ";
                              QueryExecution qexec = QueryExecutionFactory.create(QueryFactory
                                        .create(queryString));
                              //+++TIME
                              try {
                                   ResultSet results = qexec.execSelect();
                                   while (results.hasNext()) {
                                        QuerySolution soln = results.nextSolution();
                                        System.out.println("solution: " + soln);
                                   }
                              } finally {
                                   if (qexec != null)
                                        qexec.close();
                              }
                              //+++TIME
                              
                              // Close the database connection
                              oracle.dispose();
                              //+++TIME
                              System.out.println("Fertig.");

                         }
                    }

                    The only things I have not edited yet, is to insert the correct SPARQL QUery an the "//+++TIME"-Line means, that there will be System.nanoTime();.

                    Hope, that anyone can give me some advice

                    Christian
                    • 7. Re: Import of RDF-Triple
                      alwu-Oracle
                      I have eyeballed the code and it looks fine. Did you encounter a problem in executing the code or what?

                      Cheers,
                      Zhe Wu
                      • 8. Re: Import of RDF-Triple
                        701963
                        Hi,

                        oh sorry, I forgot to write.
                        A part of the java code, I took from the Jena readme. there was one line in the code snippet:

                        QueryExecution qexec = QueryExecutionFactory.create(QueryFactory
                        .create(queryString), model);

                        There, the "model" is underlined red with the error "cannot be resolved. To be true, I don't know exactly, what this line is for, what it makes. Can you tell me?
                        In my last posting, I left the *model* out of the code.

                        Another question I have is, if I only need my tablespace "String tbs = "rdf_space"" or do I also need my table "String modelName = hundred"" in my Java Code?


                        Christian
                        • 9. Re: Import of RDF-Triple
                          alwu-Oracle
                          Hi,

                          In your code, you have ModelCom modelCom = new ModelCom(graph);
                          so in the QueryExecutionFactor.create(....), you want to use the same
                          variable name modelCom. You can also use ModelOracleSem class for this purpose.

                          You do need to set the modelName to be the correct name of the model
                          you want to query against. The query is executed against one model or
                          multiple models, not against tablespaces. In Oracle Database, a tablespace
                          is used as a storage for data like tables etc.

                          BTW, to measure the execution time, you may want to get rid of the System.out.println("solution: ....) line because that print may take more time than the query execution itself.

                          Hope it helps,

                          Zhe Wu
                          • 10. Re: Import of RDF-Triple
                            701963
                            Hi,

                            I have done everything you wrote and everything worked really fine. Today, I wanted to measure time again - with the same queries - and now, I get the following error:


                            Lade Query
                            INFO [main] (SimpleLog.java:49) - Final clause = SELECT ee$RDFVTYP, ee$RDFLTYP, ee$RDFLANG, ee$RDFCLOB, decode(ee$RDFVTYP, 'BLN', ('_:'||substr(ee,instr(ee,'m',4)+1)), ee) ee, title$RDFVTYP, title$RDFLTYP, title$RDFLANG, title$RDFCLOB, decode(title$RDFVTYP, 'BLN', ('_:'||substr(title,instr(title,'m',4)+1)), title) title, inproc$RDFVTYP, decode(inproc$RDFVTYP, 'BLN', ('_:'||substr(inproc,instr(inproc,'m',4)+1)), inproc) inproc, yr$RDFVTYP, yr$RDFLTYP, yr$RDFLANG, yr$RDFCLOB, decode(yr$RDFVTYP, 'BLN', ('_:'||substr(yr,instr(yr,'m',4)+1)), yr) yr, booktitle$RDFVTYP, booktitle$RDFLTYP, booktitle$RDFLANG, booktitle$RDFCLOB, decode(booktitle$RDFVTYP, 'BLN', ('_:'||substr(booktitle,instr(booktitle,'m',4)+1)), booktitle) booktitle, proc$RDFVTYP, proc$RDFLTYP, proc$RDFLANG, proc$RDFCLOB, decode(proc$RDFVTYP, 'BLN', ('_:'||substr(proc,instr(proc,'m',4)+1)), proc) proc, page$RDFVTYP, page$RDFLTYP, page$RDFLANG, page$RDFCLOB, decode(page$RDFVTYP, 'BLN', ('_:'||substr(page,instr(page,'m',4)+1)), page) page, url$RDFVTYP, url$RDFLTYP, url$RDFLANG, url$RDFCLOB, decode(url$RDFVTYP, 'BLN', ('_:'||substr(url,instr(url,'m',4)+1)), url) url, author$RDFVTYP, author$RDFLTYP, author$RDFLANG, author$RDFCLOB, decode(author$RDFVTYP, 'BLN', ('_:'||substr(author,instr(author,'m',4)+1)), author) author FROM table(sdo_rdf_match('(?inproc <http://purl.org/dc/terms/issued> ?yr) (?inproc <http://xmlns.com/foaf/0.1/homepage> ?url) (?inproc <http://swrc.ontoware.org/ontology#pages> ?page) (?inproc <http://www.w3.org/2000/01/rdfschema#seeAlso> ?ee) (?inproc <http://purl.org/dc/terms/partOf> ?proc) (?inproc <http://purl.org/dc/elements/1.1/title> ?title) (?inproc <http://localhost/vocabulary/bench/booktitle> ?booktitle) (?inproc <http://purl.org/dc/elements/1.1/creator> ?author) (?inproc <http://www.w3.org/1999/02/22-rdfsyntax-ns#type> <http://localhost/vocabulary/bench/Inproceedings>) ', sdo_rdf_models('HUNDERTK'), null, null, null, null))
                            Exception in thread "main" java.sql.SQLException: ORA-00449: Hintergrundprozess 'MMON' wegen unerwartetem Fehler 448 beendet
                            ORA-06512: in "MDSYS.RDF_MATCH_IMPL_T", Zeile 169
                            ORA-06512: in "MDSYS.RDF_MATCH_IMPL_T", Zeile 35
                            ORA-06512: in Zeile 4

                            at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
                            at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
                            at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)
                            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.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)
                            at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:791)
                            at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:866)
                            at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
                            at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3387)
                            at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3431)
                            at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1491)
                            at oracle.spatial.rdf.client.jena.Oracle.executeQuery(Oracle.java:255)
                            at oracle.spatial.rdf.client.jena.OracleSemQueryPlan.executeBindings(OracleSemQueryPlan.java:302)
                            at com.hp.hpl.jena.sparql.engine.iterator.QueryIterBlockTriplesQH$StagePattern.<init>(QueryIterBlockTriplesQH.java:89)
                            at com.hp.hpl.jena.sparql.engine.iterator.QueryIterBlockTriplesQH.nextStage(QueryIterBlockTriplesQH.java:55)
                            at com.hp.hpl.jena.sparql.engine.iterator.QueryIterRepeatApply.makeNextStage(QueryIterRepeatApply.java:92)
                            at com.hp.hpl.jena.sparql.engine.iterator.QueryIterRepeatApply.hasNextBinding(QueryIterRepeatApply.java:54)
                            at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:69)
                            at com.hp.hpl.jena.sparql.engine.iterator.QueryIterRepeatApply.makeNextStage(QueryIterRepeatApply.java:85)
                            at com.hp.hpl.jena.sparql.engine.iterator.QueryIterRepeatApply.hasNextBinding(QueryIterRepeatApply.java:54)
                            at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:69)
                            at com.hp.hpl.jena.sparql.engine.iterator.QueryIterSort.sort(QueryIterSort.java:47)
                            at com.hp.hpl.jena.sparql.engine.iterator.QueryIterSort.<init>(QueryIterSort.java:39)
                            at com.hp.hpl.jena.sparql.engine.iterator.QueryIterSort.<init>(QueryIterSort.java:34)
                            at com.hp.hpl.jena.sparql.engine.main.OpCompiler.compile(OpCompiler.java:355)
                            at com.hp.hpl.jena.sparql.engine.main.CompilerDispatch.visit(CompilerDispatch.java:163)
                            at com.hp.hpl.jena.sparql.algebra.op.OpOrder.visit(OpOrder.java:28)
                            at com.hp.hpl.jena.sparql.engine.main.CompilerDispatch.compile(CompilerDispatch.java:33)
                            at com.hp.hpl.jena.sparql.engine.main.OpCompiler.compileOp(OpCompiler.java:94)
                            at com.hp.hpl.jena.sparql.engine.main.OpCompiler.compile(OpCompiler.java:361)
                            at com.hp.hpl.jena.sparql.engine.main.CompilerDispatch.visit(CompilerDispatch.java:170)
                            at com.hp.hpl.jena.sparql.algebra.op.OpProject.visit(OpProject.java:38)
                            at com.hp.hpl.jena.sparql.engine.main.CompilerDispatch.compile(CompilerDispatch.java:33)
                            at com.hp.hpl.jena.sparql.engine.main.OpCompiler.compileOp(OpCompiler.java:94)
                            at com.hp.hpl.jena.sparql.engine.main.OpCompiler.compile(OpCompiler.java:72)
                            at com.hp.hpl.jena.sparql.engine.main.QueryEngineMain.eval(QueryEngineMain.java:44)
                            at com.hp.hpl.jena.sparql.engine.QueryEngineBase.createPlan(QueryEngineBase.java:86)
                            at com.hp.hpl.jena.sparql.engine.QueryEngineBase.getPlan(QueryEngineBase.java:75)
                            at com.hp.hpl.jena.sparql.engine.main.QueryEngineMain$1.create(QueryEngineMain.java:67)
                            at com.hp.hpl.jena.sparql.engine.QueryExecutionBase.getPlan(QueryExecutionBase.java:282)
                            at com.hp.hpl.jena.sparql.engine.QueryExecutionBase.startQueryIterator(QueryExecutionBase.java:259)
                            at com.hp.hpl.jena.sparql.engine.QueryExecutionBase.execResultSet(QueryExecutionBase.java:264)
                            at com.hp.hpl.jena.sparql.engine.QueryExecutionBase.execSelect(QueryExecutionBase.java:92)
                            at Time.main(Time.java:300)
                            com.hp.hpl.jena.shared.JenaException: rethrew: java.sql.SQLException: ORA-00449: Hintergrundprozess 'MMON' wegen unerwartetem Fehler 448 beendet
                            ORA-06512: in "MDSYS.RDF_MATCH_IMPL_T", Zeile 169
                            ORA-06512: in "MDSYS.RDF_MATCH_IMPL_T", Zeile 35
                            ORA-06512: in Zeile 4

                            at oracle.spatial.rdf.client.jena.OracleSemQueryPlan.executeBindings(OracleSemQueryPlan.java:352)
                            at com.hp.hpl.jena.sparql.engine.iterator.QueryIterBlockTriplesQH$StagePattern.<init>(QueryIterBlockTriplesQH.java:89)
                            at com.hp.hpl.jena.sparql.engine.iterator.QueryIterBlockTriplesQH.nextStage(QueryIterBlockTriplesQH.java:55)
                            at com.hp.hpl.jena.sparql.engine.iterator.QueryIterRepeatApply.makeNextStage(QueryIterRepeatApply.java:92)
                            at com.hp.hpl.jena.sparql.engine.iterator.QueryIterRepeatApply.hasNextBinding(QueryIterRepeatApply.java:54)
                            at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:69)
                            at com.hp.hpl.jena.sparql.engine.iterator.QueryIterRepeatApply.makeNextStage(QueryIterRepeatApply.java:85)
                            at com.hp.hpl.jena.sparql.engine.iterator.QueryIterRepeatApply.hasNextBinding(QueryIterRepeatApply.java:54)
                            at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java:69)
                            at com.hp.hpl.jena.sparql.engine.iterator.QueryIterSort.sort(QueryIterSort.java:47)
                            at com.hp.hpl.jena.sparql.engine.iterator.QueryIterSort.<init>(QueryIterSort.java:39)
                            at com.hp.hpl.jena.sparql.engine.iterator.QueryIterSort.<init>(QueryIterSort.java:34)
                            at com.hp.hpl.jena.sparql.engine.main.OpCompiler.compile(OpCompiler.java:355)
                            at com.hp.hpl.jena.sparql.engine.main.CompilerDispatch.visit(CompilerDispatch.java:163)
                            at com.hp.hpl.jena.sparql.algebra.op.OpOrder.visit(OpOrder.java:28)
                            at com.hp.hpl.jena.sparql.engine.main.CompilerDispatch.compile(CompilerDispatch.java:33)
                            at com.hp.hpl.jena.sparql.engine.main.OpCompiler.compileOp(OpCompiler.java:94)
                            at com.hp.hpl.jena.sparql.engine.main.OpCompiler.compile(OpCompiler.java:361)
                            at com.hp.hpl.jena.sparql.engine.main.CompilerDispatch.visit(CompilerDispatch.java:170)
                            at com.hp.hpl.jena.sparql.algebra.op.OpProject.visit(OpProject.java:38)
                            at com.hp.hpl.jena.sparql.engine.main.CompilerDispatch.compile(CompilerDispatch.java:33)
                            at com.hp.hpl.jena.sparql.engine.main.OpCompiler.compileOp(OpCompiler.java:94)
                            at com.hp.hpl.jena.sparql.engine.main.OpCompiler.compile(OpCompiler.java:72)
                            at com.hp.hpl.jena.sparql.engine.main.QueryEngineMain.eval(QueryEngineMain.java:44)
                            at com.hp.hpl.jena.sparql.engine.QueryEngineBase.createPlan(QueryEngineBase.java:86)
                            at com.hp.hpl.jena.sparql.engine.QueryEngineBase.getPlan(QueryEngineBase.java:75)
                            at com.hp.hpl.jena.sparql.engine.main.QueryEngineMain$1.create(QueryEngineMain.java:67)
                            at com.hp.hpl.jena.sparql.engine.QueryExecutionBase.getPlan(QueryExecutionBase.java:282)
                            at com.hp.hpl.jena.sparql.engine.QueryExecutionBase.startQueryIterator(QueryExecutionBase.java:259)
                            at com.hp.hpl.jena.sparql.engine.QueryExecutionBase.execResultSet(QueryExecutionBase.java:264)
                            at com.hp.hpl.jena.sparql.engine.QueryExecutionBase.execSelect(QueryExecutionBase.java:92)
                            at Time.main(Time.java:300)
                            Caused by: java.sql.SQLException: ORA-00449: Hintergrundprozess 'MMON' wegen unerwartetem Fehler 448 beendet
                            ORA-06512: in "MDSYS.RDF_MATCH_IMPL_T", Zeile 169
                            ORA-06512: in "MDSYS.RDF_MATCH_IMPL_T", Zeile 35
                            ORA-06512: in Zeile 4

                            at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
                            at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
                            at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)
                            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.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)
                            at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:791)
                            at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:866)
                            at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
                            at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3387)
                            at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3431)
                            at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1491)
                            at oracle.spatial.rdf.client.jena.Oracle.executeQuery(Oracle.java:255)
                            at oracle.spatial.rdf.client.jena.OracleSemQueryPlan.executeBindings(OracleSemQueryPlan.java:302)
                            ... 31 more


                            I don't know why this error appears - I did not change anything. The only thing I did, was to shutdown the Database via SQL*Plus with the command "shutdown" and waited, until it was running again. Another strange thing is, that some of my queries work properly and others - that also worked one day before, cause this error message.
                            • 11. Re: Import of RDF-Triple
                              701963
                              I just saw, that there is this error in the Message:

                              ...Caused by: java.sql.SQLException: ORA-00449: background process 'MMON' unexpectedly terminated with error string 448

                              In an Oracle FAQ I read:

                              ORA-00449 background process 'string' unexpectedly terminated with error string

                              Cause: A foreground process needing service from a background process has discovered the process died.

                              Action: Refer to the message code given in the message and the trace file for the foreground and the background processes.

                              Is it possible, that I "killed" the MMON process by shutting down the database?
                              If yes, how can I relaunch this process again?

                              Best regards
                              Christian
                              • 12. Re: Import of RDF-Triple
                                alwu-Oracle
                                It seems that your question has been addressed in another thread.

                                Problem with Database after Shutdown

                                Let's know if you have any further questions.

                                Cheers,

                                Zhe