Kai He created JENA-1207:
----------------------------
Summary: Adding Decimal Typed Literal Results in TDBException on
Dataset Commit
Key: JENA-1207
URL: https://issues.apache.org/jira/browse/JENA-1207
Project: Apache Jena
Issue Type: Bug
Components: TDB
Affects Versions: Jena 3.1.0
Environment: Mac OSX
Reporter: Kai He
When adding a statement of the form
[http://www.myhost.com/mysubject, http://www.myhost.com/mysubject,
"2.2"^^http://www.w3.org/2001/XMLSchema#decimal]
using the following snippet
dataset.begin(ReadWrite.WRITE);
try {
Model model = dataset.getDefaultModel();
// add statements
model.add(statements);
dataset.commit();
} catch (Exception e) {
success = false;
e.printStackTrace();
dataset.abort();
} finally {
dataset.end();
}
A TDBException is thrown. The stack trace shows the following:
org.apache.jena.tdb.TDBException: Different ids for
"1.2"^^http://www.w3.org/2001/XMLSchema#decimal: allocated: expected
[00000000000005B7], got [020100000000000C]
at
org.apache.jena.tdb.transaction.NodeTableTrans.inconsistent(NodeTableTrans.java:232)
~[jena-tdb-3.1.0.jar:3.1.0]
at
org.apache.jena.tdb.transaction.NodeTableTrans.append(NodeTableTrans.java:220)
~[jena-tdb-3.1.0.jar:3.1.0]
at
org.apache.jena.tdb.transaction.NodeTableTrans.writeNodeJournal(NodeTableTrans.java:317)
~[jena-tdb-3.1.0.jar:3.1.0]
at
org.apache.jena.tdb.transaction.NodeTableTrans.commitPrepare(NodeTableTrans.java:289)
~[jena-tdb-3.1.0.jar:3.1.0]
at
org.apache.jena.tdb.transaction.Transaction.prepare(Transaction.java:172)
~[jena-tdb-3.1.0.jar:3.1.0]
at
org.apache.jena.tdb.transaction.Transaction.commit(Transaction.java:108)
~[jena-tdb-3.1.0.jar:3.1.0]
at
org.apache.jena.tdb.transaction.DatasetGraphTxn.commit(DatasetGraphTxn.java:54)
[jena-tdb-3.1.0.jar:3.1.0]
at
org.apache.jena.tdb.transaction.DatasetGraphTransaction._commit(DatasetGraphTransaction.java:146)
[jena-tdb-3.1.0.jar:3.1.0]
at
org.apache.jena.sparql.core.DatasetGraphTrackActive.commit(DatasetGraphTrackActive.java:46)
[jena-arq-3.1.0.jar:3.1.0]
at org.apache.jena.sparql.core.DatasetImpl.commit(DatasetImpl.java:123)
[jena-arq-3.1.0.jar:3.1.0]
The problem goes away when adding statements with integer values like
[http://www.myhost.com/mysubject, http://www.myhost.com/mysubject,
"2"^^http://www.w3.org/2001/XMLSchema#integer]
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)