2 Replies Latest reply on Dec 4, 2009 2:31 PM by 737663

    Two problems in BSBM benchmark of Oracle 10g with Jena Adaptor 2.0

    737663
      Hi, all.

      I'm proceeding BSBM benchmark for Oracle 10g with Jena Adaptor 2.0.
      I'm using the codes that were introduced in Jena Adaptor 2.0 guide document, and I've applied Jena patches to Oracle 10g (10.2.0).
      But, two problems are occured in benchmark process.

      The first problem is
           that 250k dataset(consisted of 250030 triples) loading time elapses over several hours, (See below code snippet.)

      and the other is
           that exceptions are occured in some sparql query execution.

      I used below queries which have no error in query syntax.
      I confirmed that through other benchmark tests.
      In case of oracle benchmark test, quey1 is ok. but, query2 makes exception.

      Please, look about the Exception message below.

      What should I do for getting much better benchmark result?

      I appreciate any help or any hint.

      Best regards ~


      ### Query 1 ###

      PREFIX bsbm-inst: <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/>
      PREFIX bsbm: <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/vocabulary/>
      PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
      PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
      SELECT DISTINCT ?product ?label
      WHERE {
      ?product rdfs:label ?label .
      ?product a <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/ProductType18> .
      ?product bsbm:productFeature <http://www4.wiwiss.fu-

      berlin.de/bizer/bsbm/v01/instances/ProductFeature833> .
      ?product bsbm:productFeature <http://www4.wiwiss.fu-

      berlin.de/bizer/bsbm/v01/instances/ProductFeature61> .
      ?product bsbm:productPropertyNumeric1 ?value1 .
           FILTER (?value1 > 136)
           }
      ORDER BY ?label
      LIMIT 10


      ### Query 2 ###

      PREFIX bsbm-inst: <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/>
      PREFIX bsbm: <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/vocabulary/>
      PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
      PREFIX dc: <http://purl.org/dc/elements/1.1/>
      SELECT ?label ?comment ?producer ?productFeature ?propertyTextual1 ?propertyTextual2 ?

      propertyTextual3
      ?propertyNumeric1 ?propertyNumeric2 ?propertyTextual4 ?propertyTextual5 ?propertyNumeric4
      WHERE {
      <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer11/Product536>

      rdfs:label ?label .
      <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer11/Product536>

      rdfs:comment ?comment .
      <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer11/Product536>

      bsbm:producer ?p .
      ?p rdfs:label ?producer .
      <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer11/Product536>

      dc:publisher ?p .
      <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer11/Product536>

      bsbm:productFeature ?f .
      ?f rdfs:label ?productFeature .
      <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer11/Product536>

      bsbm:productPropertyTextual1 ?propertyTextual1 .
      <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer11/Product536>

      bsbm:productPropertyTextual2 ?propertyTextual2 .
      <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer11/Product536>

      bsbm:productPropertyTextual3 ?propertyTextual3 .
      <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer11/Product536>

      bsbm:productPropertyNumeric1 ?propertyNumeric1 .
      <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/dataFromProducer11/Product536>

      bsbm:productPropertyNumeric2 ?propertyNumeric2 .
      OPTIONAL { <http://www4.wiwiss.fu-

      berlin.de/bizer/bsbm/v01/instances/dataFromProducer11/Product536> bsbm:productPropertyTextual4 ?

      propertyTextual4 }
      OPTIONAL { <http://www4.wiwiss.fu-

      berlin.de/bizer/bsbm/v01/instances/dataFromProducer11/Product536> bsbm:productPropertyTextual5 ?

      propertyTextual5 }
      OPTIONAL { <http://www4.wiwiss.fu-

      berlin.de/bizer/bsbm/v01/instances/dataFromProducer11/Product536> bsbm:productPropertyNumeric4 ?

      propertyNumeric4 }
      }


      ### Exception Message (in query 2 execution) ###

      Exception in thread "main" java.sql.SQLException: ORA-00936: missing expression

      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
      at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
      at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
      at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe

      (T4CPreparedStatement.java:799)
      at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1038)
      at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe

      (T4CPreparedStatement.java:839)
      at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1133)
      at oracle.jdbc.driver.OraclePreparedStatement.executeInternal

      (OraclePreparedStatement.java:3285)
      at oracle.jdbc.driver.OraclePreparedStatement.executeQuery

      (OraclePreparedStatement.java:3329)
      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.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.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.QueryIterConvert.hasNextBinding

      (QueryIterConvert.java:47)
      at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext

      (QueryIteratorBase.java:69)
      at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNextBinding

      (QueryIteratorWrapper.java:29)
      at com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext

      (QueryIteratorBase.java:69)
      at com.hp.hpl.jena.sparql.engine.ResultSetStream.hasNext(ResultSetStream.java:62)
      at benchmark.repository.oracle.OracleQuerying.getSelectQueryResult

      (OracleQuerying.java:148)
      at benchmark.repository.oracle.OracleQuerying.doSparqlQuery(OracleQuerying.java:101)
      at benchmark.repository.oracle.OracleQuerying.queryingData(OracleQuerying.java:90)
      at benchmark.repository.oracle.OracleQuerying.querying(OracleQuerying.java:49)
      at benchmark.repository.oracle.OracleQuerying.<init>(OracleQuerying.java:44)
      at benchmark.Benchmark.runTest(Benchmark.java:113)
      at benchmark.Benchmark.main(Benchmark.java:56)


      ### Loading Code Snippet ###

                String jdbcURL = "jdbc:oracle:thin:@" + Constants.HOST + ":1521:orcl";
                OracleDataSource ds = new OracleDataSource();
                ds.setURL(jdbcURL);
                ds.setUser(Constants.ORACLE_USER);
                ds.setPassword(Constants.ORACLE_PASSWORD);
                OracleConnection conn = (OracleConnection) ds.getConnection();
                oracle = new Oracle(conn);
                modelOracleSem = ModelOracleSem.createOracleSemModel(oracle, modelName);
                graphOracleSem = modelOracleSem.getGraph();
                graphOracleSem.createTables();
                graphOracleSem.clearRepository();

                for (int i = 0; i < fileList.length; i++) {
                     file = fileList;
                     if (file.isDirectory())
      continue;

                     inputFilePath = file.getAbsolutePath();
                     InputStream in = null;
                     try {
                          in = FileManager.get().open(inputFilePath);
                          if (in == null) {
                               throw new IllegalArgumentException("File: " + inputFilePath + " not found");
                          }

                          modelOracleSem.read(in, "", "N-TRIPLE");
                          modelOracleSem.commit();
                     } finally {
                          if (in != null)
                               in.close();
                     }
                }