[
https://issues.apache.org/jira/browse/JENA-1892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17096723#comment-17096723
]
Gilles Sérasset commented on JENA-1892:
---------------------------------------
I'm on a Mac OS X 10.15.4 Catalina. I suspect a pb with my environment. I tried
to isolate the test class in a simple maven project with only jena as
dependency but the problem remains.
Here is what I got when using command line tdbdump on the temporary folder that
has been created.
{code:java}
> tdbdump --loc=jenatest12246169353276603606
java.lang.StringIndexOutOfBoundsException: String index out of range: 71 at
java.base/java.lang.StringLatin1.charAt(StringLatin1.java:47) at
java.base/java.lang.String.charAt(String.java:693) at
org.apache.jena.atlas.lib.StrUtils.decodeHex(StrUtils.java:212) at
org.apache.jena.tdb.store.nodetable.NodecSSE.decode(NodecSSE.java:121) at
org.apache.jena.tdb.lib.NodeLib.decode(NodeLib.java:120) at
org.apache.jena.tdb.lib.NodeLib.fetchDecode(NodeLib.java:97) at
org.apache.jena.tdb.store.nodetable.NodeTableNative.readNodeFromTable(NodeTableNative.java:182)
at
org.apache.jena.tdb.store.nodetable.NodeTableNative._retrieveNodeByNodeId(NodeTableNative.java:108)
at
org.apache.jena.tdb.store.nodetable.NodeTableNative.getNodeForNodeId(NodeTableNative.java:67)
at
org.apache.jena.tdb.store.nodetable.NodeTableCache._retrieveNodeByNodeId(NodeTableCache.java:128)
at
org.apache.jena.tdb.store.nodetable.NodeTableCache.getNodeForNodeId(NodeTableCache.java:82)
at
org.apache.jena.tdb.store.nodetable.NodeTableWrapper.getNodeForNodeId(NodeTableWrapper.java:50)
at
org.apache.jena.tdb.store.nodetable.NodeTableInline.getNodeForNodeId(NodeTableInline.java:67)
at org.apache.jena.tdb.lib.TupleLib.quad(TupleLib.java:126) at
org.apache.jena.tdb.lib.TupleLib.quad(TupleLib.java:120) at
org.apache.jena.tdb.lib.TupleLib.lambda$convertToQuads$3(TupleLib.java:59) at
org.apache.jena.atlas.iterator.Iter$2.next(Iter.java:352) at
org.apache.jena.riot.system.StreamRDFOps.sendQuadsToStream(StreamRDFOps.java:140)
at org.apache.jena.riot.writer.NQuadsWriter.write$(NQuadsWriter.java:62) at
org.apache.jena.riot.writer.NQuadsWriter.write(NQuadsWriter.java:45) at
org.apache.jena.riot.writer.NQuadsWriter.write(NQuadsWriter.java:91) at
org.apache.jena.riot.RDFWriter.write$(RDFWriter.java:207) at
org.apache.jena.riot.RDFWriter.output(RDFWriter.java:165) at
org.apache.jena.riot.RDFWriter.output(RDFWriter.java:112) at
org.apache.jena.riot.RDFWriterBuilder.output(RDFWriterBuilder.java:205) at
org.apache.jena.riot.RDFDataMgr.write$(RDFDataMgr.java:1308) at
org.apache.jena.riot.RDFDataMgr.write(RDFDataMgr.java:1193) at
tdb.tdbdump.exec(tdbdump.java:67) at
jena.cmd.CmdMain.mainMethod(CmdMain.java:93) at
jena.cmd.CmdMain.mainRun(CmdMain.java:58) at
jena.cmd.CmdMain.mainRun(CmdMain.java:45) at tdb.tdbdump.main(tdbdump.java:36)
{code}
> Non ASCII chars in URIs leads to StringIndexOutOfBoundException
> ---------------------------------------------------------------
>
> Key: JENA-1892
> URL: https://issues.apache.org/jira/browse/JENA-1892
> Project: Apache Jena
> Issue Type: Bug
> Components: Base, TDB
> Affects Versions: Jena 3.14.0
> Reporter: Gilles Sérasset
> Priority: Major
> Attachments: JenaIRITest.java
>
>
> When a URI uses a non ASCII char, the StrUtils.decodeHex() method will
> incorrectly decode the URI when stored in TDB and eventually throw a
> StringIndexOutOfBoundException.
> In the attached JUnit class is a method which will raise the exception.
> Note that if the dataset is not closed and reopened (forcing TDB to store the
> data on disk and retrieve it), the code works correctly.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)