You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by "Matteo Busanelli (GMail)" <ma...@gmail.com> on 2013/08/01 13:57:25 UTC
Fuseki error "tables SDB.NNodeTriples' doesn't exist" when tryng
to make Update query with SDB
Hi,
I have a Fuseki on SDB 1.3.4.
This is my fuseki conf:
==================================================================
[] rdf:type fuseki:Server ;
fuseki:services (
<#service>
) .
##[] ja:loadClass "net.rootdev.fusekisdbconnect.SDBConnect" .
##jumble:SDBConnect rdfs:subClassOf ja:RDFDataset .
## Initialize SDB.
[] ja:loadClass "com.hp.hpl.jena.sdb.SDB" .
## Declare that sdb:DatasetStore is an implementation of ja:RDFDataset .
sdb:DatasetStore rdfs:subClassOf ja:RDFDataset .
<#service> rdf:type fuseki:Service ;
# URI of the dataset -- http://host:port/ds
fuseki:name "ds" ;
# SPARQL query services e.g. http://host:port/ds/sparql?query=...
fuseki:serviceQuery "sparql" ;
fuseki:serviceQuery "query" ;
# SPARQL Update service -- http://host:port/ds/update?request=...
fuseki:serviceUpdate "update" ; # SPARQL query service -- /ds/update
# Upload service -- http://host:port/ds/upload?graph=default or ?graph=URI or ?default
# followed by a multipart body, each part being RDF syntax.
# Syntax determined by the file name extension.
fuseki:serviceUpload "upload" ; # Non-SPARQL upload service
# SPARQL Graph store protocol (read and write)
# GET, PUT, POST DELETE to http://host:port/ds/data?graph= or ?default=
#fuseki:serviceReadWriteGraphStore "data" ;
# A separate read-only graph store endpoint:
fuseki:serviceReadGraphStore "get" ; # Graph store protocol (read only) -- /ds/get
# ... (special case) and as both /ds?default and /ds/?default
fuseki:serviceReadGraphStore "" ;
fuseki:dataset <#dataset> ;
.
## SDB Dataset configuration.
<#dataset> rdf:type sdb:DatasetStore ;
sdb:store <#store>
.
<#store> rdf:type sdb:Store ;
sdb:layout "layout2" ;
sdb:connection <#conn> ;
sdb:engine "InnoDB" ; # MySQL specific
.
<#conn> rdf:type sdb:SDBConnection ;
sdb:sdbType "MySQL";
sdb:sdbHost "localhost";
sdb:sdbName "SDB2";
sdb:driver "com.mysql.jdbc.Driver";
sdb:sdbUser "sdb";
sdb:sdbPassword "sdb";
sdb:jdbcURL "jdbc:mysql://localhost:3306/SDB2?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true";
sdb:pingQuery "SELECT 1";
#sdb:datasource "java:jboss/datasources/SDB";
.
=========================================================================================
All select query seems to work fine. The problem arise when I try to make an update like INSERT DATA without specifiyng the namedgraph in SDB
(default graph).
I get this exeption of SDB tables NNodeTriples not found:
11:05:21,530 INFO [stdout] (http--0.0.0.0-8080-1) 11:05:21 INFO Fuseki :: [24] POST http://192.168.2.218:8080/fuseki/ds/update
11:05:21,532 INFO [stdout] (http--0.0.0.0-8080-1) 11:05:21 INFO SPARQL_Update$HttpActionUpdate :: il dataset che arriva è di tipo:
com.hp.hpl.jena.sdb.store.DatasetStoreGraph
11:05:21,532 INFO [stdout] (http--0.0.0.0-8080-1) 11:05:21 INFO SPARQL_Update$HttpActionUpdate :: Utilizzo DatasetGraphWithLock: migliori peggiori
per SDB rispetto a DatasetGraphWithLock
11:05:21,537 INFO [stdout] (http--0.0.0.0-8080-1) 11:05:21 DEBUG LockMRSW :: http--0.0.0.0-8080-1 >> enterCS: Thread R/W: 0/1 :: Model R/W: 0/1
(thread: http--0.0.0.0-8080-1)
11:05:21,538 INFO [stdout] (http--0.0.0.0-8080-1) 11:05:21 DEBUG LockMRSW :: http--0.0.0.0-8080-1 << enterCS: Thread R/W: 0/2 :: Model R/W: 0/2
(thread: http--0.0.0.0-8080-1)
11:05:21,544 INFO [stdout] (http--0.0.0.0-8080-1) 11:05:21 DEBUG LockMRSW :: Lock : http--0.0.0.0-8080-1
11:05:21,545 INFO [stdout] (http--0.0.0.0-8080-1) 11:05:21 DEBUG LockMRSW :: Lock : http--0.0.0.0-8080-1
11:05:21,547 INFO [stdout] (http--0.0.0.0-8080-1) 11:05:21 DEBUG LockMRSW :: Lock : http--0.0.0.0-8080-1
11:05:21,549 INFO [stdout] (http--0.0.0.0-8080-1) 11:05:21 DEBUG LockMRSW :: Lock : http--0.0.0.0-8080-1
11:05:21,556 INFO [stdout] (http--0.0.0.0-8080-1) 11:05:21 DEBUG LockMRSW :: Lock : http--0.0.0.0-8080-1
11:05:21,584 INFO [stdout] (Thread-84) 11:05:21 ERROR LoaderTuplesNodes :: Error in thread: Exception flushing
11:05:21,585 INFO [stdout] (Thread-84) com.hp.hpl.jena.sdb.SDBException: Exception flushing
11:05:21,586 INFO [stdout] (Thread-84) at com.hp.hpl.jena.sdb.layout2.TupleLoaderBase.flush(TupleLoaderBase.java:234)
11:05:21,587 INFO [stdout] (Thread-84) at com.hp.hpl.jena.sdb.layout2.TupleLoaderBase.finish(TupleLoaderBase.java:169)
11:05:21,589 INFO [stdout] (Thread-84) at com.hp.hpl.jena.sdb.layout2.LoaderTuplesNodes.commitTuples(LoaderTuplesNodes.java:306)
11:05:21,590 INFO [stdout] (Thread-84) at com.hp.hpl.jena.sdb.layout2.LoaderTuplesNodes.access$100(LoaderTuplesNodes.java:43)
11:05:21,607 INFO [stdout] (Thread-84) at com.hp.hpl.jena.sdb.layout2.LoaderTuplesNodes$Commiter.run(LoaderTuplesNodes.java:346)
11:05:21,608 INFO [stdout] (Thread-84) at java.lang.Thread.run(Thread.java:722)
11:05:21,609 INFO [stdout] (Thread-84) Caused by: java.sql.BatchUpdateException: Table 'SDB2.NNodeTriples' doesn't exist
11:05:21,610 INFO [stdout] (Thread-84) at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2054)
11:05:21,611 INFO [stdout] (Thread-84) at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1467)
11:05:21,612 INFO [stdout] (Thread-84) at com.hp.hpl.jena.sdb.layout2.TupleLoaderBase.flush(TupleLoaderBase.java:214)
11:05:21,614 INFO [stdout] (Thread-84) ... 5 more
11:05:21,614 INFO [stdout] (Thread-84) Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'SDB2.NNodeTriples' doesn't exist
11:05:21,616 INFO [stdout] (Thread-84) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
11:05:21,617 INFO [stdout] (Thread-84) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
11:05:21,618 INFO [stdout] (Thread-84) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
11:05:21,620 INFO [stdout] (Thread-84) at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
11:05:21,621 INFO [stdout] (Thread-84) at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
11:05:21,622 INFO [stdout] (Thread-84) at com.mysql.jdbc.Util.getInstance(Util.java:386)
11:05:21,623 INFO [stdout] (Thread-84) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1053)
11:05:21,624 INFO [stdout] (Thread-84) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4074)
11:05:21,625 INFO [stdout] (Thread-84) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4006)
11:05:21,626 INFO [stdout] (Thread-84) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2468)
11:05:21,627 INFO [stdout] (Thread-84) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2629)
11:05:21,628 INFO [stdout] (Thread-84) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2719)
11:05:21,629 INFO [stdout] (Thread-84) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)
11:05:21,630 INFO [stdout] (Thread-84) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2450)
11:05:21,632 INFO [stdout] (Thread-84) at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2006)
11:05:21,640 INFO [stdout] (Thread-84) ... 7 more
In fact the tables is not in the SDB schema (I have only quads, triples, prefixes and nodes).
Is this a problem of version of SDB or jena (my fuseki uses jena-core 2.7.3 and arq 2.9.3) ?
Did anyone ever had this problem?
Thanx in advance for the support.
Matteo
Re: Fuseki error "tables SDB.NNodeTriples' doesn't exist" when tryng
to make Update query with SDB
Posted by Andy Seaborne <an...@apache.org>.
On 01/08/13 16:44, Matteo Busanelli (GMail) wrote:
> Thanx Andy.
>
> Unfortunately we need to rely triple storing on MySQL or Postgres in an
> enterprise architecture...therefore it's hard to use TDB.
>
> I will try to update all versions as you suggest but in this case I have
> to re-create the SDB db or I can reuse the one used with SDB 1.3.4?
> Is the db schema of SDB changed (NNodeTriples is not a table of the SDB
> 1.3.4)?
Same schema.
NNodeTriples is a temporary table so it will not show up in the schema.
Andy
>
> Bye,
> Matteo.
>
> Il 01/08/2013 16:27, Andy Seaborne ha scritto:
>> On 01/08/13 12:57, Matteo Busanelli (GMail) wrote:
>>> Hi,
>>> I have a Fuseki on SDB 1.3.4.
>>>
>>> This is my fuseki conf:
>>
>>
>>> In fact the tables is not in the SDB schema (I have only quads, triples,
>>> prefixes and nodes).
>>
>> NNodeTriples is used by the bulk loader.
>>
>> From memory, there was a race condition on updating whereby if two
>> updates were received and overlapped, things broke.
>>
>>>
>>> Is this a problem of version of SDB or jena (my fuseki uses jena-core
>>> 2.7.3 and arq 2.9.3) ?
>>
>> Consider upgrading : SDB 1.3.6, Fuseki 0.2.7 (Jena 2.10.1).
>>
>> Do you need to use SDB? TDB is to be preferred.
>>
>>> Did anyone ever had this problem?
>>>
>>> Thanx in advance for the support.
>>>
>>> Matteo
>>>
>>
>> Andy
>>
>>
>
Re: Fuseki error "tables SDB.NNodeTriples' doesn't exist" when tryng
to make Update query with SDB
Posted by "Matteo Busanelli (GMail)" <ma...@gmail.com>.
Thanx Andy.
Unfortunately we need to rely triple storing on MySQL or Postgres in an enterprise architecture...therefore it's hard to use TDB.
I will try to update all versions as you suggest but in this case I have to re-create the SDB db or I can reuse the one used with SDB 1.3.4?
Is the db schema of SDB changed (NNodeTriples is not a table of the SDB 1.3.4)?
Bye,
Matteo.
Il 01/08/2013 16:27, Andy Seaborne ha scritto:
> On 01/08/13 12:57, Matteo Busanelli (GMail) wrote:
>> Hi,
>> I have a Fuseki on SDB 1.3.4.
>>
>> This is my fuseki conf:
>
>
>> In fact the tables is not in the SDB schema (I have only quads, triples,
>> prefixes and nodes).
>
> NNodeTriples is used by the bulk loader.
>
> From memory, there was a race condition on updating whereby if two updates were received and overlapped, things broke.
>
>>
>> Is this a problem of version of SDB or jena (my fuseki uses jena-core
>> 2.7.3 and arq 2.9.3) ?
>
> Consider upgrading : SDB 1.3.6, Fuseki 0.2.7 (Jena 2.10.1).
>
> Do you need to use SDB? TDB is to be preferred.
>
>> Did anyone ever had this problem?
>>
>> Thanx in advance for the support.
>>
>> Matteo
>>
>
> Andy
>
>
Re: Fuseki error "tables SDB.NNodeTriples' doesn't exist" when tryng
to make Update query with SDB
Posted by Andy Seaborne <an...@apache.org>.
On 01/08/13 12:57, Matteo Busanelli (GMail) wrote:
> Hi,
> I have a Fuseki on SDB 1.3.4.
>
> This is my fuseki conf:
> In fact the tables is not in the SDB schema (I have only quads, triples,
> prefixes and nodes).
NNodeTriples is used by the bulk loader.
From memory, there was a race condition on updating whereby if two
updates were received and overlapped, things broke.
>
> Is this a problem of version of SDB or jena (my fuseki uses jena-core
> 2.7.3 and arq 2.9.3) ?
Consider upgrading : SDB 1.3.6, Fuseki 0.2.7 (Jena 2.10.1).
Do you need to use SDB? TDB is to be preferred.
> Did anyone ever had this problem?
>
> Thanx in advance for the support.
>
> Matteo
>
Andy