Jena adapter 2

Hi,
I was trying to connect to an oracle instance yesterday via the jena adapter 2. The connection seemed to work and i then tried to store some n3 data into the database.
For that reason I followed the code samples, that came with the adapters readme. But then I get a ClassNotFoundException for the OracleSemThingie inside eclipse, saying it can't find one of the jena classes... jena.jar is as well in the classpath as the other required jars are. Any clues for that problem?
Another question, that I have, is: what is the best way to store n3 data via jena adapter in an oracle database?
best regards,
udo

Hi,
yes, I'm sorry I didn't do it in the first post...
Exception in thread "main" java.lang.NoClassDefFoundError: com/hp/hpl/jena/sparql/engine/main/StageBasic
     at oracle.spatial.rdf.client.jena.GraphOracleSem.<init>(GraphOracleSem.java:733)
     at oracle.spatial.rdf.client.jena.GraphOracleSem.<init>(GraphOracleSem.java:545)
     at oracle.spatial.rdf.client.jena.GraphOracleSem.<init>(GraphOracleSem.java:450)
The exception comes up from this line:
          GraphOracleSem graph = new GraphOracleSem(oracle, modelName);
I've got jena.jar 2.5.6 in the classpath, as well as arq.jar, commons-logging-1.1.1, icu4j_3_4, log4j-1.2.12, sdordfclient, concurrent, iri, xercesImpl, ojdbc5.
I don't need Pellet.

Similar Messages

  • Jena adapter and glassfish

    I have been trying to get the Jena adapter , joseki and glassfish to work with 11g.
    No success so far. Glassfish just throws an error because somewhere in the code there is a cast to (OracleConnection) that is incorrect.
    My glassfish connection pool is setup using oracle.jdbc.pool.OracleDataSource.
    Has anyone got any ideas ?
    trace:
    WARN [httpSSLWorkerThread-8080-1] (Configuration.java:115) - Failed to build dataset from description (service name: updat
    e/service): caught: open: the connection from the datasource is not of OracleConnection type
    com.hp.hpl.jena.assembler.exceptions.AssemblerException: caught: open: the connection from the datasource is not of OracleConnection type
    doing:
    root: file:///export/apps/phil/glassfish/domains/domain1/config/joseki-config.ttl#oracle with type: http://www.oracle.com/2009/05/orardf/jena-joseki-ns#Da
    taset 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)
    UPDATE: I believe this is because glassfish wraps its connections, so I'd need to create a new data source that gets the physical OracleConnection for me.
    As discussed here: http://forums.sun.com/thread.jspa?threadID=5100748
    Edited by: user2570981 on 12-Mar-2010 08:30

    Hi, I managed to get Joseki working on Tomcat 6 with just this META-INF/context.xml file (no <resource-ref> section in web.xml needed):
    <?xml version="1.0" encoding="UTF-8"?>
    <Context>
    <Resource name="OracleSemDS"
         auth="Container"
         type="oracle.jdbc.pool.OracleDataSource"
         factory="oracle.jdbc.pool.OracleDataSourceFactory"
         user="rdfuser"
         password="rdfuser"
         driverClassName="oracle.jdbc.driver.OracleDriver"
         url="jdbc:oracle:thin:@ec2-184-72-150-221:1521:tseval"
         validationQuery="select 1 from dual"
         maxActive="10"
         maxIdle="2"/>
    </Context>
    However, it took a patched version of the sdordfclient.jar to get it working, the problem being that, in accordance with the J2EE spec, Tomcat (and Glassfish as well, I believe) puts the datasource in the "java:comp/env" JNDI namespace. The sdordfclient.jar has code responsible for finding that datasource but looks for it under simply "OracleSemDS".
    your context.xml file looks good, I'll bet if you dig around, you'll find that "java:comp/env/OracleSemDS" is bound in Tomcat, you just need a sdordfclient.jar that is looking for it there.

  • PREFIX ORACLE_SEM_FS_NS timeout via Jena Adapter

    Hi,
    I am executing SPARQL via Jena Adapter and would like to specify timeout.
    I use PREFIX ORACLE_SEM_FS_NS: <http://oracle.com/semtech#timeout=5> , according the the sem dev guide Jena examples, but the timeout value has no effect at all.
    For some heavy queries QueryExecution->execSelect() never returns
    I found this thread - Re: Query IDs in ORACLE_SEM_FS_NS : 32 or 64 bits? , which discuss the similar subject. I tried to add qid to the prefix, but that did not help. I don't use Joseki endpoint nor OracleQueryMgtServlet to manage(kill) long queries. Maybe I will provide the latter function in the future, but I would like to start with that users specify the timeout and query would interrupt itself if not ready.
    So, is there anything else I have to do in Java/Jena code or somewhere else?
    Thanks, best regards
    Jürgen
    After some more testing it turns that the problem with timeout is related to certain type of queries only. Normally the timeout works.
    But when LET statement is used in some way, then timeout does not occur and it seems the query simply hangs:
    This query works and times out (if timeout value is set short enough):
    SELECT DISTINCT
    ?HR_Zone
    (count(?e) AS ?major_count)
    WHERE {
    ?e rdf:type r:ST_Episode .
    OPTIONAL
    ?e r:isClassifiedAs rn:major_st_episode .
    OPTIONAL{
    ?e r:mappedHRZone ?zone .
    ?zone r:index ?HR_Zone
    GROUP BY ?HR_Zone
    This query does not finsih (in boundaries of my patients) and does not time out:
    SELECT DISTINCT
    ?HR_Zone
    (count(?e) AS ?major_count)
    WHERE {
    ?e rdf:type r:ST_Episode .
    OPTIONAL
    ?e r:isClassifiedAs rn:major_st_episode .
    LET( ?emajor := ?e )
    OPTIONAL{
    ?e r:mappedHRZone ?zone .
    ?zone r:index ?HR_Zone
    GROUP BY ?HR_Zone
    However, one might think that LET is not supported - but without ARQ functions it works. This query works and times out (with short timeout value)
    SELECT DISTINCT
    ?emajor ?HR_Zone
    WHERE {
    ?e rdf:type r:ST_Episode .
    OPTIONAL
    ?e r:isClassifiedAs rn:major_st_episode .
    LET( ?emajor := ?e )
    OPTIONAL{
    ?e r:mappedHRZone ?zone .
    ?zone r:index ?HR_Zone
    Edited by: user8793616 on 2010-sep-29 04:51

    Hi Jurgen,
    The timeout pragma is most effective when used with SPARQL 1.0 queries, since they are supported natively. Once you start using ARQ features - which are not available in Oracle so they are processed in the mid-tier - timeout becomes less reliable.
    Cheers,
    Vladimir

  • How to do a count(*) with Jena Adapter?

    Hi, I am trying to do a count(*). I know it's not part of the SPARQL 1.0 standard, but it is supported in ARQ, and presumably by the Jena Adapter too then?
    Other examples I have been able to find do an iteration over the resultset to get a count, but that is not acceptable since I have millions of triples. In my tests it took 15 seconds to return the count by using iteration. Oracle Semantic is advertised as scaling to "hundreds of millions of triples"; so how do I do a simple count(*) aggregation?
    Below is the code I tried. It works with a regular jena default model, returning the expected result of "2", but the result is empty if I use the Oracle Jena adapter.
    import oracle.spatial.rdf.client.jena.ModelOracleSem;
    import oracle.spatial.rdf.client.jena.Oracle;
    import com.hp.hpl.jena.graph.Node;
    import com.hp.hpl.jena.graph.Triple;
    import com.hp.hpl.jena.query.Query;
    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.ResultSet;
    import com.hp.hpl.jena.query.ResultSetFormatter;
    import com.hp.hpl.jena.rdf.model.Model;
    public class OracleJenaAdapterCountTest {
         public static void main(String[] args) throws Exception {
              String szJdbcURL = "jdbc:oracle:thin:@dragon12:1521:mydb";
              String szUser = "mydb";
              String szPasswd = "yeahright";
              String szModelName = "kp_mydb_model";
              Oracle oracle = new Oracle(szJdbcURL, szUser, szPasswd);
              Model model = ModelOracleSem.createOracleSemModel(oracle,
              szModelName);
              // this one works
              //Model model = ModelFactory.createDefaultModel();
              model.getGraph().add(
                        Triple.create(Node.createURI("http://example.com/John"),
                                  Node.createURI("http://example.com/fatherOf"),
                                  Node.createURI("http://example.com/Mary")));
              model.getGraph().add(
                        Triple.create(Node.createURI("http://example.com/John"),
                                  Node.createURI("http://example.com/fatherOf"),
                                  Node.createURI("http://example.com/Bob")));
              Query query = QueryFactory
                        .create("select (count(*) as ?count) {?f <http://example.com/fatherOf> ?k .}");
              QueryExecution qexec = QueryExecutionFactory.create(query, model);
              ResultSet results = qexec.execSelect();
              ResultSetFormatter.out(System.out, results, query);
              model.close();
              oracle.dispose();
    }

    Hi,
    Which version of Jena/Jena Adapter are you using?
    I am a bit surprised that your query did not throw out an exception. I need to set Syntax.syntaxARQ
    in the query creation, as follows. (Without it, I got com.hp.hpl.jena.query.QueryParseException when
    executing the same code.)
    Query query = QueryFactory
    .create("select (count(*) as ?count) {?f <http://example.com/fatherOf> ?k .}",
    Syntax.syntaxARQ);
    Once I have the above change, I did get the right count.
    | count |
    =========
    | 2 |
    The above query is not the most efficient one in terms of getting the count. Because we have to select out all projection and send the data from the database to the Java client. If you are using the latest Jena Adapter, you can use the count_only which will instruct the underlying query to return the count directly from the database.
    Query query = QueryFactory
    .create("PREFIX ORACLE_SEM_FS_NS: <http://oracle.com/semtech#count_only> select ?count {?f <http://example.com/fatherOf> ?k .}",
    Syntax.syntaxARQ);
    Cheers,
    Zhe Wu

  • Jena Adapter and SPARQL web service endpoint

    As I understand, with Jena adapter java interface, the client can connect to Oracle RDF database directly. Why does it still need SPARQL web service endpoint? Does the query request from Jena adapter at client side have to go through SPARQL webservice first then route to Oracle server? Or the query with SPARQL need to go through webservice and non SPARQL query directly go to Oracle server?
    Thanks.

    Hi,
    You are right that a client can connect to Oracle RDF directly through the Jena Adapter. The reason for providing a SPARQL web service endpoint is to give additional interoperability and flexibility. With the SPARQL web service endpoint, one does not even need to write any Java code to interact with the underlying database. It also makes SPARQL federation a lot easier.
    Hope it helps,
    Zhe Wu

  • How do I configure logging for Jena Adapter?

    The software I'm developing uses the jdk logger, and sends the output to a log file. I'd like to send log messages from the Jena adapter to the same location. Also, what are the names of the logged components, and how can you adjust the log levels?

    Those are internal logs. Behind the scene, Jena Adaptor is using apache commons logging.
    To disable those verbose logging output, you can set the following JVM properties.
    -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
    -Dorg.apache.commons.logging.simplelog.defaultlog=warn
    Thanks,
    Zhe Wu

  • Jena Adapter API access from Java Stored Procedures?

    Is it possible to use Jena API from code in java stored procedures in Oracle DBMS 11gR2? Possible but not recommended?
    The reason is that my company uses .Net as the application server plattform (not Java). Calling Java Stored Procedures from .Net is one way to use Jena library.
    Thank you!
    Trond

    Hi Trond,
    Unfortunately the sdordfclient.jar was compiled and built with JDK 6 and the JVM supported in the Oracle database 11gR2 is JDK5.
    If you have a strong requirement, please file a SR against Oracle support. We will then look into a possible recompilation and
    rebuild.
    Thanks,
    Zhe Wu

  • Problems applying patch for Jena adapter

    I got errors when applying the patch to 11g (11.1.0.6) for the Jena Driver (from OTN). I executed each .sql/.plb file in the order stated by the patch instructions:
    jenadrv_patch_ig.txt: Step-by-step instructions (new Oracle Database 11g installation). When I executed sdordfxb.plb I got the folowing:
    SQL> @sdordfxb.plb
    Warning: Package Body created with compilation errors.
    Errors for PACKAGE BODY SDO_RDF:
    LINE/COL ERROR
    1243/5 PL/SQL: Statement ignored
    1243/28 PLS-00302: component 'ANALYZE_MODEL' must be declared
    1272/5 PL/SQL: Statement ignored
    1272/28 PLS-00302: component 'ANALYZE_RULES_INDEX' must be declared
    1298/5 PL/SQL: Statement ignored
    1298/28 PLS-00302: component 'DELETE_MODEL_STATS' must be declared
    1317/5 PL/SQL: Statement ignored
    1317/28 PLS-00302: component 'DELETE_RULES_INDEX_STATS' must be declared
    Synonym created.
    Synonym created.
    Grant succeeded.
    After this the SDO_RDF package could not be found when making semantic API calls.
    Any idea what I did wrong? I rolled back from the patch by re-executing the backed up (pre-patch) versions of the .sql and .plb files which successfully restored the SDO_RDF package but I still can't install the patch.
    Thanks.

    After trying to re-run the patch process I couldn't get catsem11i to run successfully. I have dropped my models, network, and removed the model data tables (that I originally created) containing SDO_RDF_TRIPLE data types so I'm not sure why I'm getting the error below. Any idea where else these dependenices could be or how to fully clean?
    C:\app\skagels\product\11.1.0\db_2\md\admin>sqlplus / as sysdba
    SQL*Plus: Release 11.1.0.6.0 - Production on Thu May 8 14:51:46 2008
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> @catsem11i.sql
    install 11 RDF
    check privileges
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    Uninstall 10.2 RDF? => ?/rdbms/admin/nothing.sql
    declare
    ERROR at line 1:
    ORA-20000: Cannot proceed. Dependencies for RDF 11 type SDO_RDF_TRIPLE[_S]
    (count=6)
    ORA-06512: at line 81
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    C:\app\skagels\product\11.1.0\db_2\md\admin>

  • Cannot start weblogic server anymore after conf. jena for oracle database

    Hi,
    My weblogic server 10.3.4.0 installed in oracle developer days in oralce linux guest was able to start before using the oracle user account. Following the seman. tech. dev. guide, I set up jena adapter for oracle in my guest linux system. Since the oracle user doesn't have permission to copy folders into the autodeploy directory in weblogic server, so I login as root to copy the joseki.war folder into the autodeploy directory. However, after that, I am not able to start the weblogic server console anymore using the oracle user account. Any suggestions will be much appreciated. Thanks a lot in advance.
    Hong

    Pl do not post duplicates - cannot start weblogic server anymore in oracle user after config. in root

  • Passing literal as bind variable in jena

    Dear all,
    We are able to use bind variables using the RDFVID id. However if we want to check for a literal using the jena/joseki adapter we are not able to perform the same action. In our case the literal is of type string.
    We are using:
    * WLS 12.1.0.3.
    * Jena adapter 2.11.1.
    * Joseki 3.4.4.
    * ARQ 2.9.2.
    We try to run the following query on the joseki end-point.
    PREFIX foaf: <http://xmlns.com/foaf/0.1/>
    PREFIX vcard: <http://www.w3.org/2001/vcard-rdf/3.0#>
    PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
    PREFIX oext: <http://oracle.com/semtech/jena-adaptor/ext/function#>
    PREFIX ORACLE_SEM_FS_NS: <http://oracle.com/semtech#no_fall_back,ALLOW_DUP=T,s2s>
    PREFIX ORACLE_SEM_HT_NS: <http://oracle.com/semtech#monitor>
    PREFIX ORACLE_SEM_UEAP_NS: <http://oracle.com/semtech#f$RDFVID%20in(ORACLE_ORARDF_RES2VID(?))>
    PREFIX ORACLE_SEM_UEPJ_NS: <http://oracle.com/semtech#f$RDFVID>
    PREFIX ORACLE_SEM_UEBV_NS: <http://oracle.com/semtech#"Lee">
    SELECT ?f
    WHERE
    { graph ?g { ?p vcard:N ?vn .
       ?vn vcard:Family ?f .
        ?p foaf:title "Sen." .}
    The result set is empty. Replacing the line 'PREFIX ORACLE_SEM_UEBV_NS: <http://oracle.com/semtech#"Lee">' by any variant is either given an error or the empty set. (Some variants are (&quot;Lee&quot; , Lee, "Lee", &#39;Lee&#39; )
    When we use the generated SQL from jena/joseki, we are able to get the right result if we run the same query in SQLDeveloper. The bind variable we have to use is "Lee" (the bind variable has the quotations included). This will give the correct result set back.
    Kind regards,
    Max

    Hi Max,
    In the UEBV field, you need to put in URL encoded String of "Lee"
    Please try the following and see if it helps.
    %22Lee%22
    Thanks,
    Zhe Wu

  • Bind variables in jena WLS SPARQL Queries

    Dear all,
    We have read about the possibilities of the jena support for bind variables in the documentation (http://docs.oracle.com/cd/E11882_01/appdev.112/e25609/sem_jena.htm#RDFRM248). In the following topic of jun 14 2014 (Bind Variables in SPARQL Queries) the problem was already addressed. However we are facing some other problems.
    We are using:
    * WLS 12.1.3.0.0
    * jena adapter 2.11.1.
    * Joseki 3.4.4.
    * ARQ 2.9.2.
    We try to run the following query on the joseki end-point.
    PREFIX foaf: <http://xmlns.com/foaf/0.1/>
    PREFIX vcard: <http://www.w3.org/2001/vcard-rdf/3.0#>
    PREFIX ORACLE_SEM_FS_NS: <http://oracle.com/semtech#no_fall_back,ALLOW_DUP=T,ODS=6,s2s>
    PREFIX ORACLE_SEM_HT_NS: <http://oracle.com/semtech#monitor>
    PREFIX ORACLE_SEM_UEAP_NS: <http://oracle.com/semtech#f$RDFVID%20in(?)>
    PREFIX ORACLE_SEM_UEPJ_NS: <http://oracle.com/semtech#f$RDFVID>
    PREFIX ORACLE_SEM_UEBV_NS: <http://oracle.com/semtech#1264839720472151591>
    SELECT ?f ?g
    WHERE
    { graph ?g { ?p vcard:N ?vn .
                  ?vn vcard:Family ?f .
                   ?p foaf:title "Sen." .}
    The result we get back is however not using the bind variable. It returns the whole list without UEAP/UEPJ/UEBV.
    Is there something I missed in the documentation or do I need to set some variables for the use of bind variables?
    Kind regards,
    Max

    Dear Zhe,
    The solution provided works! However setting this property was not straight forward for me (but this is more related to WLS).
    Setting this JVM property in the arguments of the weblogic server (Server Start) does not work. I've looked through the files for any sign of the property but did not find any. Manually adding this line in setDomainEnv.sh
    (adding the variable JAVA_PROFILE = "-Doracle.spatial.rdf.client.jena.allowAP=true") does work though.
    Kind regards,
    Max

  • Export a model in RDF/XML format without Jena?

    Hi,
    Are there means to export RDF triples in RDF/XML format without using Jena or any other Java staff?
    Thanks.

    Hi Dmitry,
    Unfortunately we do not have the code within SEM_APIS to do the task. This is something we already discussed with Development at some point in a case for another customer.
    What we have for now that you may already are aware of is the use of the jena framework to generate N-Triple or RDF/XML output
    There are a couple of notes:
    How To Use Jena Adapter To Extract A Model To Move From One Database To Another Database (Doc ID 1124288.1)
    How To Move Semantic Models From One Database To Another (Doc ID 1347754.1)
    Same code in those notes can be used to generate RDF/XML changing the line
    model.write(os, "N-TRIPLE");
    to
    model.write(os, "RDF/XML");
    The formats you can output are: "RDF/XML", "RDF/XML-ABBREV", "N-TRIPLE" and "N3". The default value is represented by null is "RDF/XML".
    I know this implies the extra work of installing java JDK and Jena framework but that is the only way for now.
    Regards!
    Jorge

  • OWLPrime and Jena

    Hello,
    System Specs:
    Oracle 11g
    Oracle Jena Adapter 2.0
    Jena 2.5.6
    I am trying to leverage the transitive, inverse, etc. properties of an ontology I downloaded. The ontology I am using references the Relationship Ontology (RO) from the OBO Foundry. The Relationship Ontology contains several transitive properties including the has_part property. I have a SPARQL query that I execute using Jena. My ontology contains some information in the form: A has_part B, A has_part C, B has_part D. Without creating any entailments, I was able to correctly query my ontology and get 2 results when I ran the query "SELECT * WHERE A has_part ?parts".
    Now I want to take the next step and return the transitive cases where A has_part D (via the fact that B has_part D). To accomplish this, I loaded the "main ontology" along with the Relationship Ontology into an Oracle semantic model. Next, I ran the following through SQL*Plus to create the entailments: exec sem_apis.create_entailment(‘ontology_model_idx’,sem_models(‘ontology’), sem_rulebases(‘owlprime’));. The procedure ran fine without any errors. However, I still only get the same 2 results when I run "SELECT * WHERE A has_part ?parts". I am not returning the transitive cases. What else do I need to do? Do I need to add Pellet to my Jena code? If so, why? Aren't the inferences already in the Oracle table?
    Thanks,
    Chuck

    Hi Alan,
    I'm having a bit of trouble using my rule. First, I created my rule by executing the following commands from SQL*PLUS:
    execute sem_apis.create_rulebase('user_rulebase');
    INSERT INTO mdsys.semr_user_rulebase VALUES ('obo_has_part',
    '(?whole <http://www.w3.org/2000/01/rdf-schema#subClassOf> ?sub) (?sub <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction>) (?sub <http://www.w3.org/2002/07/owl#onProperty> <http://www.obofoundry.org/ro/ro.owl#has_part>) (?sub <http://www.w3.org/2002/07/owl#someValuesFrom> ?part)', NULL, '(?whole <http://www.obofoundry.org/ro/ro.owl#has_part> ?part)', null);
    Now I am trying to use the following code to execute my new rule along with the OWLPRIME rules from Java:
    String[] rulelist = new String[2];
    rulelist[0] = new String("OWLPRIME");
    rulelist[1] = new String("USER_RULEBASE");
    Attachment attachment = Attachment.createInstance(
    Attachment.NO_ADDITIONAL_MODELS, rulelist,
    InferenceMaintenanceMode.NO_UPDATE,
    QueryOptions.DEFAULT);
    graph.performInference();
    graph.analyzeInferredGraph();
    I am seeing the following output and errors:
    INFO [main] (SimpleLog.java:49) - performInference: has valid entailment already
    INFO [main] (SimpleLog.java:49) - Final clause = SELECT part$RDFVTYP, part$RDFLTYP, part$RDFLANG, part$RDFCLOB, decode(part$RDFVTYP, 'BLN', ('_:'||substr(part,instr(part,'m',4)+1)), part) part, whole$RDFVTYP, decode(whole$RDFVTYP, 'BLN', ('_:'||substr(whole,instr(whole,'m',4)+1)), whole) whole FROM table(sdo_rdf_match('(?whole <http://www.obofoundry.org/ro/ro.owl#has_part> ?part) ', sdo_rdf_models('NEURON_ONTOLOGY'), sdo_rdf_rulebases('OWLPRIME','USER_RULEBASE'), null, null, null))
    Error: rethrew: java.sql.SQLException: ORA-20000: We do not have a rules index for this Model-Rulebase combination
    ORA-06512: at "MDSYS.RDF_MATCH_IMPL_T", line 176
    ORA-06512: at line 1
    Do I need to run sem_apis.create_entailment?
    Thanks,
    Chuck

  • Difference between Jena/Joseki and sem_match

    Dear All,
    There are different ways for us fire SPARQL queries into the Spatial and Graph extension. The two methods we are using at this moment are Jena/Joseki and sem_match. Where Jena/Joseki is an end-point on a WLS.
    The same SPARQL queries fired either by sem_match or Jena/Joseki do not result in the same execution plan. We are wondering if it is possible in anyway to let Jena/Joseki use the same rules as sem_match to receive the same execution plan.
    If there is not such a method, is there than a plan to bring these two optimizers closer together?
    Kind regards,
    Max

    Hi Max,
    Can you please adding s2s and strict_default flags to the beginning of your query?
    e.g.
    PREFIX ORACLE_SEM_FS_NS: <http://oracle.com/semtech#s2s=f,strict_default=f>
    select ?s ?p ?o
    where {
      graph ?g {?s ?p ?o }
    To answer your question on convergence, Jena Adapter uses SEM_MATCH to answer SPARQL queries.
    By default, however, Jena Adapter first constructs a SEM_MATCH and then invokes a server-side logic to translate
    the SEM_MATCH in a pure SQL query. This feature is called S2S. S2S has a few benefits including the support
    of large queries, read-only database, and a reduced cost in query parsing.
    Now, there are a few things/situations that can cause a difference in the execution plan.
    - Jena Adapter by default chooses strict_default=t to align with Jena's behavior.
    - Given a SPARQL 1.1 query (which uses syntax beyond SPARQL 1.0), Jena Adapter (for Oracle Database 11.2.0.3+ and 12c)  
      breaks up the query into smaller pieces.
    We are working on a newer version of Jena Adapter that will translate a complete SPARQL 1.1 query into a single SEM_MATCH for Oracle Database (only for 12c+).
    Hope it helps,
    Zhe Wu

  • Jena vs. Sesame

    Hi,
    What is diffrent between Jena and Sesame. I thought that Jena is an open source framework for storage, inferencing and querying of RDF data. But I found that exist something like Sesame and it has almost the same feature.

    Hi,
    You are right, the features are similar. There has been some work comparing the performance of these two.
    You can google "Jena vs Sesame" to find out more information.
    Note that there are quite some users out there who are using just the Java APIs provided in Jena (Sesame). For example, one can use
    Jena APIs to talk to Oracle database through the Jena Adapter (Sesame Adapter).
    Oracle supports both Jena APIs and Sesame APIs. Note that there are more optimizations implemented in the Jena Adapter than those in
    the Sesame Adapter.
    Hope it helps,
    Zhe Wu

Maybe you are looking for

  • Installing iTunes Match on a PC

    I have tried this twice... The installer matches about 60% of my music and stops with no message.... A problem with storage space? Any ideas? Is there an iTunes match to share movies across devices like for music? Thanks.

  • Upgrading to 10.5.x: checking apps version minimums

    Hopefully, a softball... Finally about to upgrade to OS 10.5--but wondered if there is an easy, one-stop place to check for minimums required of my basic software, rather than be surprised after 10.5 is installed? (I go down my list, checking my soft

  • Java 1.5 - Each Element of a List Cannot Be An Array?

    I plan to create a List and each element of this List is a String Array. First, I declared a List:      private static List<String> recursiveTextArray = new ArrayList<String>();And I want to build this List by adding one Array at a time: recursiveTex

  • All photos from last month automatically deleted

    I put some new music on my Nokia lumia 920 and while it was uploading it deleted all my most recent pics on my camera roll , but not all of them plus deleted random pics from my saved pics folder...

  • Calendar Not Working on iPhone

    My phone appointments stopped syncing to Outlook.  I played with the settings and now the Calendar app will not work at all.  How can I get Calendar working and how can I start syncing again.  I sync with iTunes.