SDB connection error in yen

I am trying to connect Jena to an Oracle database using SDB, but when I compile the code I have an error and I don't know what this means:

An exception in the stream "main" org.openjena.riot.RiotException: Code: 11 / LOWERCASE_PREFERRED in SCHEME: lowercase is preferred in this component

My sdb.ttl file that I use:

@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> . @prefix sdb: <http://jena.hpl.hp.com/2007/sdb#> . <#store> rdf:type sdb:Store ; sdb:layout "layout2/hash" ; sdb:connection <#conn> ; <#conn> rdf:type sdb:SDBConnection ; sdb:sdbType "oracle" ; sdb:sdbHost "localhost" ; sdb:sdbName "XE" ; # Oracle SID sdb:driver "oracle.jdbc.driver.OracleDriver" ; # With OracleXE, it can be useful to use the user/password # to give multiple stores in the same installation. sdb:sdbUser "m" ; sdb:sdbPassword "w" ; . 

My Jena class that uses SDB:

 import com.hp.hpl.jena.rdf.model.Model; import com.hp.hpl.jena.rdf.model.Statement; import com.hp.hpl.jena.rdf.model.StmtIterator; import com.hp.hpl.jena.sdb.SDBFactory; import com.hp.hpl.jena.sdb.Store; public class semantyka { public static void main(String [] argv) { Store store = SDBFactory.connectStore("D:\\pobrane\\SDB-1.3.4\\Store\\sdb.ttl") ; Model model = SDBFactory.connectDefaultModel(store) ; StmtIterator sIter = model.listStatements() ; for ( ; sIter.hasNext() ; ) { Statement stmt = sIter.nextStatement() ; System.out.println(stmt) ; } sIter.close() ; store.close() ; } } 

What is wrong and how can I fix it?

+4
source share
1 answer

From the Texicans comment above :

Instead

 "D:\\pobrane\\SDB-1.3.4\\Store\\sdb.ttl" 

he should be

 "file:///D:\\pobrane\\SDB-1.3.4\\Store\\sdb.ttl" 
0
source

Source: https://habr.com/ru/post/1400473/


All Articles