Paolo Castagna wrote: > Sam contributed this test case: > https://github.com/castagna/jena-examples/blob/master/src/main/resources/data/single-bad-triple.nt > https://github.com/castagna/jena-examples/blob/master/src/main/java/dev/Run3.java > Looking at this, right now.
Getting closer... do we have a bug here? Test case is here: https://github.com/castagna/jena-examples/blob/master/src/main/java/dev/TestTDBUnicode.java This is the data (i.e. a single triple with the Unicode character \uDAE0 in a literal value): <s> <p> "Hello \uDAE0 World" . Is \uDAE0 legal in a literal value? I would think so. RiotLoader.datasetFromString(...) parses that triple with no problems: test_01 and test_02 do not throw any exceptions. However, if we try to add the same triple to a TDB store within a transaction (i.e. test_03) we have an exception when we commit the transaction: org.openjena.riot.RiotParseException: [line: 1, col: 2 ] Broken token: Hello at org.openjena.riot.tokens.TokenizerText.exception(TokenizerText.java:1209) at org.openjena.riot.tokens.TokenizerText.readString(TokenizerText.java:620) at org.openjena.riot.tokens.TokenizerText.parseToken(TokenizerText.java:248) at org.openjena.riot.tokens.TokenizerText.hasNext(TokenizerText.java:112) at com.hp.hpl.jena.tdb.nodetable.NodecSSE.decode(NodecSSE.java:105) at com.hp.hpl.jena.tdb.lib.NodeLib.decode(NodeLib.java:93) at com.hp.hpl.jena.tdb.nodetable.NodeTableNative$2.convert(NodeTableNative.java:234) at com.hp.hpl.jena.tdb.nodetable.NodeTableNative$2.convert(NodeTableNative.java:228) at org.openjena.atlas.iterator.Iter$4.next(Iter.java:301) at com.hp.hpl.jena.tdb.transaction.NodeTableTrans.append(NodeTableTrans.java:188) at com.hp.hpl.jena.tdb.transaction.NodeTableTrans.writeNodeJournal(NodeTableTrans.java:306) at com.hp.hpl.jena.tdb.transaction.NodeTableTrans.commitPrepare(NodeTableTrans.java:266) at com.hp.hpl.jena.tdb.transaction.Transaction.prepare(Transaction.java:131) at com.hp.hpl.jena.tdb.transaction.Transaction.commit(Transaction.java:112) at com.hp.hpl.jena.tdb.transaction.DatasetGraphTxn.commit(DatasetGraphTxn.java:40) at com.hp.hpl.jena.tdb.transaction.DatasetGraphTransaction._commit(DatasetGraphTransaction.java:106) at com.hp.hpl.jena.tdb.migrate.DatasetGraphTrackActive.commit(DatasetGraphTrackActive.java:60) at com.hp.hpl.jena.sparql.core.DatasetImpl.commit(DatasetImpl.java:143) at dev.TestTDBUnicode.test_03(TestTDBUnicode.java:66) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:69) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:48) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) at org.junit.runners.ParentRunner.run(ParentRunner.java:292) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) If we think this is a bug, I am going to raise a JIRA issue and continue to investigate to find out where the problem is. Thanks, Paolo
