我尝试使用SDB将Jena与Oracle数据库连接,但是当我编译代码时,我遇到了错误,我不知道这意味着什么:
线程“main”中的异常org.openjena.riot.RiotException:代码:SCHEME中的11 / LOWERCASE_PREFERRED:此组件中首选小写
我使用的sdb.ttl文件:
@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" ;
.
我使用SDB的Jena课程:
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() ;
}
}
有什么问题,我该如何解决?