3 Replies Latest reply on Sep 28, 2015 4:20 PM by alwu-Oracle

    Fuseki Adapter - Debug log shows exceptions

    Akhilesh Bangalore

      Hi,

       

      Today, I wanted to capture the error logs and wanted to see how the debug log looks like.

      So, I placed a log4j.properties file with the logger level set to DEBUG. I have experienced a bizzare output - the server started and was responding fine but the log kept piling up with the below error

       

      25399 [OracleQueryProgressMonitor] DEBUG oracle.spatial.rdf.client.jena.OracleQueryProgressMonitor  - run: wake up after sleeping (ms) 3000
      25400 [OracleQueryProgressMonitor] DEBUG oracle.spatial.rdf.client.jena.OracleQueryProgressMonitor  - getConnection: starts
      25400 [OracleQueryProgressMonitor] DEBUG oracle.spatial.rdf.client.jena.OracleUtils  - getDataSource: starts
      25401 [OracleQueryProgressMonitor] DEBUG oracle.spatial.rdf.client.jena.OracleUtils  - getDataSource: detect jboss by class org.jboss.jca.adapters.jdbc.WrapperDataSource
      25401 [OracleQueryProgressMonitor] DEBUG oracle.spatial.rdf.client.jena.OracleUtils  - getDataSource: not in jboss
      25402 [OracleQueryProgressMonitor] DEBUG oracle.spatial.rdf.client.jena.OracleUtils  - getDataSource: detect tomcat by class org.apache.catalina.ContainerServlet
      25402 [OracleQueryProgressMonitor] DEBUG oracle.spatial.rdf.client.jena.OracleUtils  - getDataSource: not in tomcat
      25403 [OracleQueryProgressMonitor] DEBUG oracle.spatial.rdf.client.jena.OracleUtils  - getDataSource: dsName: OracleSemDS
      25403 [OracleQueryProgressMonitor] DEBUG oracle.spatial.rdf.client.jena.OracleQueryProgressMonitor  - run: get connection
      javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
              at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
              at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
              at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)
              at javax.naming.InitialContext.lookup(Unknown Source)
              at oracle.spatial.rdf.client.jena.OracleUtils.getDataSource(OracleUtils.java:867)
              at oracle.spatial.rdf.client.jena.OracleQueryProgressMonitor.getConnection(OracleQueryProgressMonitor.java:325)
              at oracle.spatial.rdf.client.jena.OracleQueryProgressMonitor.run(OracleQueryProgressMonitor.java:369)
              at java.lang.Thread.run(Unknown Source)
      

       

      Seeing this, I created a Datasource named OracleSemDS and modified the config accordingly. This gave a new error -

       

      25603 [OracleQueryProgressMonitor] DEBUG oracle.spatial.rdf.client.jena.OracleQueryProgressMonitor  - run: wake up after sleeping (ms) 3000
      25605 [OracleQueryProgressMonitor] DEBUG oracle.spatial.rdf.client.jena.OracleQueryProgressMonitor  - run: exception
      java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist
      
      
              at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445)
              at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
              at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879)
              at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:450)
              at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192)
              at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
              at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)
              at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:884)
              at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1167)
              at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1289)
              at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3584)
              at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3628)
              at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1493)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
              at java.lang.reflect.Method.invoke(Unknown Source)
              at oracle.ucp.jdbc.proxy.PreparedStatementProxyFactory.invoke(PreparedStatementProxyFactory.java:125)
              at com.sun.proxy.$Proxy1.executeQuery(Unknown Source)
              at oracle.spatial.rdf.client.jena.OracleQueryProgressMonitor.run(OracleQueryProgressMonitor.java:411)
              at java.lang.Thread.run(Unknown Source)
      

       

       

      Can you let me know what is happening behind the scenes and if this is something that we should concern ourselves with? What is OracleQueryProgressMonitor and is there an additional configuration that should be supplied or additional packages that needs to be installed on the database instance?

       

      Thanks,

      Akhilesh

        • 1. Re: Fuseki Adapter - Debug log shows exceptions
          alwu-Oracle

          Hi Akhilesh,

           

          This is expected. The reason is that we have a feature called query management which can abort a SPARQL query via a servlet endpoint like:

          http://<hostname>:8080/joseki/querymgt?abortqid=123 

          There is a thread that will periodically wake up and check if there is any work to do (kill a query). It is trying to read from a table but the

          table has not been created. The table will be automatically created the moment you ping that Joseki servlet endpoint.

           

          If you don't want to set up Joseki, then you can create the following table manually in the schema you are using.

           

          create table oracle_orardf_query_mgt_tab(QID NUMBER, CREATION_TIME DATE) compress nologging;

          CREATE INDEX oracle_orardf_query_mgt_tab_idx on oracle_orardf_query_mgt_tab(CREATION_TIME) nologging;

           

          Thanks,

           

          Zhe Wu

          • 2. Re: Fuseki Adapter - Debug log shows exceptions
            Akhilesh Bangalore

            Hi Zhe Wu,

             

            If I am not mistaken, the servlet end-point which you have quoted is for the Joseki adapter. Does this hold good for Fuseki as well?

            In the sample config file that came along with Fuseki adapter, I could infer only the end-points - sparql, query, update, upload, data and get. Does Fuseki also have the query management end-point available?

             

            Thanks,

            Akhilesh

            • 3. Re: Fuseki Adapter - Debug log shows exceptions
              alwu-Oracle

              Hi,

               

              Just to get the terminology right, there is only one adapter, Jena Adapter (now renamed to support for Apache Jena).

              In this feature, we have support for Jena APIs, Joseki 3.4.4 and Fuseki 1.0.1.

               

              With Fuseki, you can obviously do REST and SPARQL. However, query abort function is not there because query abort

              is implemented using a servlet.

               

              Hope it clarifies,

               

              Zhe Wu