5 Replies Latest reply: Jan 29, 2013 12:42 AM by 629431 RSS

    Using Jena and Joseki with Read only Database

    629431
      We have been trying to find a way to get Jena/Joseki endpoint to function against a Read Only DB. Like an Onion with the errors just changing. Has anyone else looked into this . The data is just a copy of the DB created by Data Guard. Data Guard is not the problem as non DG DB in Read Only have errors as does a Read Write DB with user only having Read, just different errors.

      Also, why does Oracle not do some VMBox images at least for Sol and Linux ?
        • 1. Re: Using Jena and Joseki with Read only Database
          alwu-Oracle
          Hi,

          What kind of errors did you get when setting up a Joseki endpoint against a read only DB?

          For the virtual box image, did you want a generic Oracle Database, or an Oracle database
          together with Jena/Joseki?

          Thanks,

          Zhe Wu
          • 2. Re: Using Jena and Joseki with Read only Database
            629431
            Thank You for your reply. For images it would be nice to have OracleDB with patches, RDF enabled of scripts to do so and either or both Jena and Sesame. The complexity has always made it difficult for users to try it all out.

            The read only problem is strange as it seems to produce errors wrt inferencing, query rewriting and others. Are you able to start the DB in read only mode and execute a SPARQL query via the Joseki endpoint ? Also if I just make the user read only but the db read write I get errors as well.
            • 3. Re: Using Jena and Joseki with Read only Database
              629431
              From Catalina Log.

              oracle.spatial.rdf.client.jena.OracleQueryProgressMonitor []: startMonitor: starts
              2012-11-27 15:57:20,103 [http-opsrv883%2F158.167.224.133-8080-1] ERROR oracle.spatial.rdf.client.jena.assembler.OracleDefaultModelAssembler []: Constructing GraphOracleSem:
              com.hp.hpl.jena.shared.JenaException: Error in performing inference
                   at oracle.spatial.rdf.client.jena.assembler.OracleDefaultModelAssembler.constructModel(OracleDefaultModelAssembler.java:216)
                   at oracle.spatial.rdf.client.jena.assembler.OracleDefaultModelAssembler.open(OracleDefaultModelAssembler.java:157)
                   at oracle.spatial.rdf.client.jena.assembler.OracleDatasetAssembler.open(OracleDatasetAssembler.java:79)
                   at oracle.spatial.rdf.client.jena.assembler.OracleDatasetAssembler.open(OracleDatasetAssembler.java:45)
                   at com.hp.hpl.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.openBySpecificType(AssemblerGroup.java:118)
                   at com.hp.hpl.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.open(AssemblerGroup.java:105)
                   at com.hp.hpl.jena.assembler.assemblers.AssemblerGroup$ExpandingAssemblerGroup.open(AssemblerGroup.java:69)
                   at com.hp.hpl.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:37)
                   at com.hp.hpl.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:34)
                   at org.joseki.DatasetDesc.newDataset(DatasetDesc.java:65)
                   at org.joseki.DatasetDesc.initialize(DatasetDesc.java:56)
                   at org.joseki.Configuration.processModel(Configuration.java:112)
                   at org.joseki.Configuration.<init>(Configuration.java:83)
                   at org.joseki.Dispatcher.setConfiguration(Dispatcher.java:130)
                   at org.joseki.Dispatcher.initServiceRegistry(Dispatcher.java:100)
                   at org.joseki.http.Servlet.init(Servlet.java:112)
                   at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
                   at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:809)
                   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
                   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
                   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563)
                   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
                   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
                   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
                   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
                   at java.lang.Thread.run(Thread.java:662)
              Caused by: java.sql.SQLException: ORA-16000: database open for read-only access
              ORA-06512: at "MDSYS.SDO_RDF_INTERNAL", line 304
              ORA-06512: at "MDSYS.RDF_APIS", line 5
              ORA-06512: at line 1

                   at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)
                   at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
                   at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)
                   at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)
                   at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
                   at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)
                   at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:204)
                   at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1007)
                   at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1315)
                   at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3576)
                   at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3677)
                   at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4714)
                   at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1374)
                   at oracle.spatial.rdf.client.jena.GraphOracleSem.invalidateCursor(GraphOracleSem.java:3369)
                   at oracle.spatial.rdf.client.jena.GraphOracleSem.commitTransaction(GraphOracleSem.java:1642)
                   at oracle.spatial.rdf.client.jena.GraphOracleSem.performInference(GraphOracleSem.java:1723)
                   at oracle.spatial.rdf.client.jena.GraphOracleSem.performInference(GraphOracleSem.java:1691)
                   at oracle.spatial.rdf.client.jena.GraphOracleSem.performInference(GraphOracleSem.java:1668)
                   at oracle.spatial.rdf.client.jena.assembler.OracleDefaultModelAssembler.constructModel(OracleDefaultModelAssembler.java:213)
                   ... 28 more
              2012-11-27 15:57:20,107 [http-opsrv883%2F158.167.224.133-8080-1] WARN org.joseki.Configuration []: Failed to build dataset from description (service name: sparql): caught: Error while constructing GraphOracleSem:
              com.hp.hpl.jena.assembler.exceptions.AssemblerException: caught: Error while constructing GraphOracleSem:
              doing:
              root: file:///home/cellar/joseki-config.ttl#cellarDataset with type: http://www.oracle.com/2009/05/orardf/jena-joseki-ns#Dataset assembler class: class oracle.spatial.rdf.client.jena.assembler.OracleDatasetAssembler

                   at com.hp.hpl.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.openBySpecificType(AssemblerGroup.java:126)
                   at com.hp.hpl.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.open(AssemblerGroup.java:105)
                   at com.hp.hpl.jena.assembler.assemblers.AssemblerGroup$ExpandingAssemblerGroup.open(AssemblerGroup.java:69)
                   at com.hp.hpl.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:37)
                   at com.hp.hpl.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:34)
                   at org.joseki.DatasetDesc.newDataset(DatasetDesc.java:65)
                   at org.joseki.DatasetDesc.initialize(DatasetDesc.java:56)
                   at org.joseki.Configuration.processModel(Configuration.java:112)
                   at org.joseki.Configuration.<init>(Configuration.java:83)
                   at org.joseki.Dispatcher.setConfiguration(Dispatcher.java:130)
                   at org.joseki.Dispatcher.initServiceRegistry(Dispatcher.java:100)
                   at org.joseki.http.Servlet.init(Servlet.java:112)
                   at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
                   at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:809)
                   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
                   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
                   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563)
                   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
                   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
                   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
                   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
                   at java.lang.Thread.run(Thread.java:662)
              Caused by: com.hp.hpl.jena.shared.JenaException: Error while constructing GraphOracleSem:
                   at oracle.spatial.rdf.client.jena.assembler.OracleDefaultModelAssembler.constructModel(OracleDefaultModelAssembler.java:222)
                   at oracle.spatial.rdf.client.jena.assembler.OracleDefaultModelAssembler.open(OracleDefaultModelAssembler.java:157)
                   at oracle.spatial.rdf.client.jena.assembler.OracleDatasetAssembler.open(OracleDatasetAssembler.java:79)
                   at oracle.spatial.rdf.client.jena.assembler.OracleDatasetAssembler.open(OracleDatasetAssembler.java:45)
                   at com.hp.hpl.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.openBySpecificType(AssemblerGroup.java:118)
                   ... 24 more
              Caused by: com.hp.hpl.jena.shared.JenaException: Error in performing inference
                   at oracle.spatial.rdf.client.jena.assembler.OracleDefaultModelAssembler.constructModel(OracleDefaultModelAssembler.java:216)
                   ... 28 more
              Caused by: java.sql.SQLException: ORA-16000: database open for read-only access
              ORA-06512: at "MDSYS.SDO_RDF_INTERNAL", line 304
              ORA-06512: at "MDSYS.RDF_APIS", line 5
              ORA-06512: at line 1

                   at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)
                   at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
                   at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)
                   at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)
                   at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
                   at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)
                   at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:204)
                   at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1007)
                   at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1315)
                   at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3576)
                   at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3677)
                   at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4714)
                   at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1374)
                   at oracle.spatial.rdf.client.jena.GraphOracleSem.invalidateCursor(GraphOracleSem.java:3369)
                   at oracle.spatial.rdf.client.jena.GraphOracleSem.commitTransaction(GraphOracleSem.java:1642)
                   at oracle.spatial.rdf.client.jena.GraphOracleSem.performInference(GraphOracleSem.java:1723)
                   at oracle.spatial.rdf.client.jena.GraphOracleSem.performInference(GraphOracleSem.java:1691)
                   at oracle.spatial.rdf.client.jena.GraphOracleSem.performInference(GraphOracleSem.java:1668)
                   at oracle.spatial.rdf.client.jena.assembler.OracleDefaultModelAssembler.constructModel(OracleDefaultModelAssembler.java:213)
                   ... 28 more

              Also have the wireshark traces if they would help.
              • 4. Re: Using Jena and Joseki with Read only Database
                alwu-Oracle
                Does it help to create a virtual model and then use just the virtual model name in the joseki configuration file?

                Thanks,

                Zhe
                • 5. Re: Using Jena and Joseki with Read only Database
                  629431
                  That has been on the list of possibilities for a bit. Just checking to see if there was anyone out there that had come up against this situation prior to spending a lot of time as there are several other issues who's priorities are higher. Thanks for your time. I will try this approach.