12 Replies Latest reply on Apr 6, 2010 2:15 PM by 638832

    Oracle SPARQL Service Endpoint using Joseki

    638832
      Hello,

      I installed an Oracle SPARQL Service Endpoint using Joseki, but when i submit the query ... it is not successful....it is loading and never comes with the results.
      On the Oracle Weblogic Server, in the logs i get the following message:

      Redirect is executed in begin or refresh action. Redirect url is /console/console.portal?_nfpb=true&_pageLabel=DiagnosticsViewDomainLogTablePage&DiagnosticsViewDomainLogTablePortlethandle=com.bea.console.handles.LogDispatchHandle%28%22AdminServer%3BDomainLog%22%29.

      Message id: BEA-423420.

      Help please.

      Thank you,
      Catalin
        • 1. Re: Oracle SPARQL Service Endpoint using Joseki
          715399
          Hi,

          Does the query work fine when you run it directly through the Jena Adapter API (without using the WebLogic Server endpoint)?

          If there are any exceptions being listed in the WebLogic logs, please post them here. The message you posted - BEA-423420 - seems to have more to do with the Admin Console.

          Also, note that the Oracle SPARQL Service Endpoint endpoint takes more time to answer the first query (Joseki is setting up the SPARQL services and upon first run).


          Thanks,
          Vladimir
          • 2. Re: Oracle SPARQL Service Endpoint using Joseki
            638832
            Hello.

            I tried to run a simple query, nothing fancy....

            PREFIX dc: <http://purl.org/dc/elements/1.1/>
            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
            PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
            PREFIX owl: <http://www.w3.org/2000/07/owl#>
            PREFIX fn: <http://www.w3.org/2005/xpath-functions#>
            PREFIX ouext: <http://oracle.com/semtech/jena-adaptor/ext/user-def-function#>
            PREFIX oext: <http://oracle.com/semtech/jena-adaptor/ext/function#>
            PREFIX ORACLE_SEM_FS_NS: <http://oracle.com/semtech#timeout=100,qid=123>
            SELECT ?sc ?c
            WHERE
            { ?sc rdfs:subClassOf ?c}

            I have also tried to run a query from Jena API which looks like that select ?f ?p ?k WHERE {?f ?p ?k .} LIMIT 20. It works from Jena Api, but when i try to run it from Oracle SPARQL endpoint, it doesn't work.

            And in the Oracle Weblogic console on the diagnostics menu, in the log file i get the same error:

            Message id: BEA-423420

            Message: Redirect is executed in begin or refresh action. Redirect url is /console/console.portal?_nfpb=true&_pageLabel=DiagnosticsViewDomainLogTablePage&DiagnosticsViewDomainLogTablePortlethandle=com.bea.console.handles.LogDispatchHandle%28%22AdminServer%3BDomainLog%22%29.

            I have no ideea hoe to make the Oracle SPARQL endpoint work.

            Thank you.

            Catalin
            • 3. Re: Oracle SPARQL Service Endpoint using Joseki
              638832
              Does anybody has any ideea how to debug the Weblogic Server?
              • 4. Re: Oracle SPARQL Service Endpoint using Joseki
                715399
                Hi,

                If you want to enable logging, the Jena Adapter uses SLF4j. You can check here on how to enable debug mode:
                http://www.slf4j.org/manual.html

                Please check the Jena Adapter log and post if there are any errors/exceptions.


                Regards,
                Vladimir
                • 5. Re: Oracle SPARQL Service Endpoint using Joseki
                  638832
                  Hello.

                  On the Jena Adaptor log i get this error over and over again.


                  2010-03-31 10:49:34,359 [OracleQueryProgressMonitor] DEBUG oracle.spatial.rdf.client.jena.OracleQueryProgressMonitor: run: wake up after sleeping (ms) 3000
                  2010-03-31 10:49:34,359 [OracleQueryProgressMonitor] DEBUG oracle.spatial.rdf.client.jena.OracleQueryProgressMonitor: getConnection: starts
                  2010-03-31 10:49:34,359 [OracleQueryProgressMonitor] DEBUG oracle.spatial.rdf.client.jena.OracleQueryProgressMonitor: run: get connection
                  javax.naming.NameNotFoundException: Unable to resolve 'OracleSemDS'. Resolved ''; remaining name 'OracleSemDS'
                       at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139)
                       at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:252)
                       at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:182)
                       at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:206)
                       at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:254)
                       at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:393)
                       at javax.naming.InitialContext.lookup(InitialContext.java:392)
                       at oracle.spatial.rdf.client.jena.OracleQueryProgressMonitor.getConnection(OracleQueryProgressMonitor.java:307)
                       at oracle.spatial.rdf.client.jena.OracleQueryProgressMonitor.run(OracleQueryProgressMonitor.java:350)
                       at java.lang.Thread.run(Thread.java:619)

                  Thanks,
                  Catalin
                  • 6. Re: Oracle SPARQL Service Endpoint using Joseki
                    715399
                    Hi Catalin,

                    OK, that means there is an issue with the JDBC DataSource Name. Did you create a datasource in WebLogic Server? You can check the Jena Adaptor documentation on how to create one:

                    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e11828/toc.htm

                    Note that the data source name must be OracleSemDS.

                    In the WebLogic admin console, you can also test the datasource you've created.

                    Hope this helps,
                    Vladimir
                    • 7. Re: Oracle SPARQL Service Endpoint using Joseki
                      638832
                      Hi,

                      Yes, i have created the JDBC Datasource in the Weblogic Server. In fact, i recreated again, i used Jena Adaptor documentation and the source name is OracleSemDS. I have also tested the configuration and it conects to the database.



                      Now i get this error in the logs:

                      javax.naming.NameNotFoundException: Unable to resolve 'OracleSemDS'. Resolved ''; remaining name 'OracleSemDS'
                           at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139)
                           at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:252)
                           at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:182)
                           at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:206)
                           at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:254)
                           at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:393)
                           at javax.naming.InitialContext.lookup(InitialContext.java:392)
                           at oracle.spatial.rdf.client.jena.assembler.OracleConnectionAssembler.open(OracleConnectionAssembler.java:77)
                           at oracle.spatial.rdf.client.jena.assembler.OracleDatasetAssembler.open(OracleDatasetAssembler.java:60)
                           at oracle.spatial.rdf.client.jena.assembler.OracleDatasetAssembler.open(OracleDatasetAssembler.java:38)
                           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 weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
                           at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
                           at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
                           at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
                           at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
                           at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
                           at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:531)
                           at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:235)
                           at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
                           at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3594)
                           at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
                           at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
                           at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
                           at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
                           at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
                           at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
                           at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
                      2010-03-31 17:16:45,327 [[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] WARN org.joseki.Configuration: Failed to build dataset from description (service name: update/service): caught: url is null or an empty string.
                      com.hp.hpl.jena.assembler.exceptions.AssemblerException: caught: url is null or an empty string.
                      doing:
                      root: file:///D:/Installed/oracle/middleware/user_projects/domains/base_domain/joseki-config.ttl#oracle 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 weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
                           at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
                           at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
                           at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
                           at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
                           at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
                           at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:531)
                           at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:235)
                           at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
                           at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3594)
                           at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
                           at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
                           at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
                           at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
                           at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
                           at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
                           at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
                      Caused by: java.lang.RuntimeException: url is null or an empty string.
                           at oracle.spatial.rdf.client.jena.Oracle.<init>(Oracle.java:164)
                           at oracle.spatial.rdf.client.jena.assembler.OracleConnectionAssembler.open(OracleConnectionAssembler.java:96)
                           at oracle.spatial.rdf.client.jena.assembler.OracleDatasetAssembler.open(OracleDatasetAssembler.java:60)
                           at oracle.spatial.rdf.client.jena.assembler.OracleDatasetAssembler.open(OracleDatasetAssembler.java:38)
                           at com.hp.hpl.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.openBySpecificType(AssemblerGroup.java:118)
                           ... 28 more
                      2010-03-31 17:16:45,359 [[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] DEBUG oracle.spatial.rdf.client.jena.assembler.OracleDatasetAssembler: open: root file:///D:/Installed/oracle/middleware/user_projects/domains/base_domain/joseki-config.ttl#oracle
                      2010-03-31 17:16:45,359 [[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] DEBUG oracle.spatial.rdf.client.jena.assembler.OracleConnectionAssembler: open: set allow AP to false
                      2010-03-31 17:16:45,359 [[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] DEBUG oracle.spatial.rdf.client.jena.assembler.OracleConnectionAssembler: open: null null null
                      2010-03-31 17:16:45,359 [[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] ERROR oracle.spatial.rdf.client.jena.assembler.OracleConnectionAssembler: open: init data source

                      Thanks,
                      Catalin
                      • 8. Re: Oracle SPARQL Service Endpoint using Joseki
                        715399
                        Hi Catalin,

                        That's pretty strange. I have one more suggestion: have you included the target for the data source? See this blog post:
                        http://guidoschmutz.wordpress.com/2010/01/01/solving-javax-naming-namenotfoundexception-unable-to-resolve-jdbc-soaappuserdatasource-with-oracle-soa-suite-11g-adapter-services/



                        Regards,
                        Vladimir
                        • 9. Re: Oracle SPARQL Service Endpoint using Joseki
                          638832
                          Hello,

                          Thank you very much. That was helpful.
                          I corrected the configuration, but now i get another error. I try to run the default script on the Oracle Sparql Endpoint ....

                          PREFIX dc: <http://purl.org/dc/elements/1.1/>
                          PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
                          PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
                          PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
                          PREFIX owl: <http://www.w3.org/2000/07/owl#>
                          PREFIX fn: <http://www.w3.org/2005/xpath-functions#>
                          PREFIX ouext: <http://oracle.com/semtech/jena-adaptor/ext/user-def-function#>
                          PREFIX oext: <http://oracle.com/semtech/jena-adaptor/ext/function#>
                          PREFIX ORACLE_SEM_FS_NS: <http://oracle.com/semtech#timeout=100,qid=123>
                          SELECT ?sc ?c
                          WHERE
                          { ?sc rdfs:subClassOf ?c}


                          ....which works if i run it from Jena API. But with the Oracle Sparql Endpoint i get this error in the log file:
                          java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist

                               at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:91)
                               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:1035)
                               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:1187)
                               at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3386)
                               at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3430)
                               at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1491)
                               at weblogic.jdbc.wrapper.PreparedStatement.executeQuery(PreparedStatement.java:128)
                               at oracle.spatial.rdf.client.jena.OracleQueryProgressMonitor.run(OracleQueryProgressMonitor.java:392)
                               at java.lang.Thread.run(Thread.java:619)


                          Thanks,
                          Catalin
                          • 10. Re: Oracle SPARQL Service Endpoint using Joseki
                            638832
                            Hi....i think the only diference between the Oracle Sparql Endpint and the Jena APi is that in Jena APi i have to use the semantic model...
                            In Oracle Sparql endpoint.... The queries are submitted against the dataset specified in Joseki's configuration file. Do i have to specify the model into the joseki configuration file?

                            Thanks,
                            Catalin
                            • 11. Re: Oracle SPARQL Service Endpoint using Joseki
                              715399
                              Hi Catalin,

                              Yes, you do need to specify the model in the joseki configuration file. It is explained in the doc (section 7.2.2.).
                              http://download.oracle.com/docs/cd/E11882_01/appdev.112/e11828/toc.htm

                              Vladimir
                              • 12. Re: Oracle SPARQL Service Endpoint using Joseki
                                638832
                                Thank you.

                                It works now.

                                Catalin