You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Michael Brunnbauer <br...@netestate.de> on 2011/09/29 09:29:18 UTC

tcpdump RiotParseException

hi all

I get a RiotParseException with a big TDB and tdbdump from TDB-0.8.10 after
much of the data got written out. Do I have a corrupt TDB or is there a bug
somewhere ? Here is the full trace:

Exception in thread "main" org.openjena.riot.RiotParseException: [line: 1, col: 4 ] illegal escape sequence value: f (0x66)
	at org.openjena.riot.tokens.TokenizerText.exception(TokenizerText.java:1067)
	at org.openjena.riot.tokens.TokenizerText.exception(TokenizerText.java:1057)
	at org.openjena.riot.tokens.TokenizerText.readLiteralEscape(TokenizerText.java:973)
	at org.openjena.riot.tokens.TokenizerText.readString(TokenizerText.java:489)
	at org.openjena.riot.tokens.TokenizerText.parseToken(TokenizerText.java:188)
	at org.openjena.riot.tokens.TokenizerText.hasNext(TokenizerText.java:68)
	at org.openjena.riot.tokens.TokenizerText.next(TokenizerText.java:89)
	at com.hp.hpl.jena.tdb.nodetable.NodecSSE.decode(NodecSSE.java:91)
	at com.hp.hpl.jena.tdb.lib.NodeLib.decode(NodeLib.java:89)
	at com.hp.hpl.jena.tdb.lib.NodeLib.fetchDecode(NodeLib.java:71)
	at com.hp.hpl.jena.tdb.nodetable.NodeTableNative.readNodeByNodeId(NodeTableNative.java:158)
	at com.hp.hpl.jena.tdb.nodetable.NodeTableNative._retrieveNodeByNodeId(NodeTableNative.java:85)
	at com.hp.hpl.jena.tdb.nodetable.NodeTableNative.getNodeForNodeId(NodeTableNative.java:58)
	at com.hp.hpl.jena.tdb.nodetable.NodeTableCache._retrieveNodeByNodeId(NodeTableCache.java:87)
	at com.hp.hpl.jena.tdb.nodetable.NodeTableCache.getNodeForNodeId(NodeTableCache.java:58)
	at com.hp.hpl.jena.tdb.nodetable.NodeTableWrapper.getNodeForNodeId(NodeTableWrapper.java:44)
	at com.hp.hpl.jena.tdb.nodetable.NodeTableInline.getNodeForNodeId(NodeTableInline.java:55)
	at com.hp.hpl.jena.tdb.lib.TupleLib.quad(TupleLib.java:126)
	at com.hp.hpl.jena.tdb.lib.TupleLib.quad(TupleLib.java:118)
	at com.hp.hpl.jena.tdb.lib.TupleLib.access$100(TupleLib.java:32)
	at com.hp.hpl.jena.tdb.lib.TupleLib$4.convert(TupleLib.java:76)
	at com.hp.hpl.jena.tdb.lib.TupleLib$4.convert(TupleLib.java:72)
	at org.openjena.atlas.iterator.Iter$4.next(Iter.java:267)
	at org.openjena.atlas.iterator.IteratorCons.next(IteratorCons.java:76)
	at org.openjena.atlas.iterator.Iter.sendToSink(Iter.java:428)
	at org.openjena.riot.out.NQuadsWriter.write(NQuadsWriter.java:31)
	at org.openjena.riot.RiotWriter.writeNQuads(RiotWriter.java:25)
	at tdb.tdbdump.exec(tdbdump.java:38)
	at arq.cmdline.CmdMain.mainMethod(CmdMain.java:85)
	at arq.cmdline.CmdMain.mainRun(CmdMain.java:47)
	at arq.cmdline.CmdMain.mainRun(CmdMain.java:34)
	at tdb.tdbdump.main(tdbdump.java:20)

cu,
brunni

-- 
++  Michael Brunnbauer
++  netEstate GmbH
++  Geisenhausener Straße 11a
++  81379 München
++  Tel +49 89 32 19 77 80
++  Fax +49 89 32 19 77 89 
++  E-Mail brunni@netestate.de
++  http://www.netestate.de/
++
++  Sitz: München, HRB Nr.142452 (Handelsregister B München)
++  USt-IdNr. DE221033342
++  Geschäftsführer: Michael Brunnbauer, Franz Brunnbauer
++  Prokurist: Dipl. Kfm. (Univ.) Markus Hendel

Re: tcpdump RiotParseException

Posted by Michael Brunnbauer <br...@netestate.de>.
Hello Andy,

On Thu, Sep 29, 2011 at 11:49:00AM +0100, Andy Seaborne wrote:
> Unpack the sources into directory src/ and run maven.
> mkdir src
> (cd src ; unzip -q ../arq-2.8.8-sources.jar )
> mvn compile jar:jar
> and look in target/

Thank you. I have a patched arq-2.8.8.jar and tdbdump is running. I will not
know if it has worked until tomorrow.

cu,
brunni

-- 
++  Michael Brunnbauer
++  netEstate GmbH
++  Geisenhausener Straße 11a
++  81379 München
++  Tel +49 89 32 19 77 80
++  Fax +49 89 32 19 77 89 
++  E-Mail brunni@netestate.de
++  http://www.netestate.de/
++
++  Sitz: München, HRB Nr.142452 (Handelsregister B München)
++  USt-IdNr. DE221033342
++  Geschäftsführer: Michael Brunnbauer, Franz Brunnbauer
++  Prokurist: Dipl. Kfm. (Univ.) Markus Hendel

Re: tcpdump RiotParseException

Posted by Andy Seaborne <an...@apache.org>.
On 29/09/11 11:38, Michael Brunnbauer wrote:
>
> Hello Andy,
>
> On Thu, Sep 29, 2011 at 11:26:52AM +0100, Andy Seaborne wrote:
>> I've just checked the code and it looks as if the database is fine,
>> because it's (just) the decoding of nodes that is broken.  I've just
>> fixed that in SVN.
>
> Good to hear.
>
>> I can do a ARQ SNAPSHOT build (to go with TDB-0.8.11 SNAPSHOT).
>
> You mean a .jar for ARQ to place in the TDB-0.8.10 lib ? That would be fine.

I'm afraid not - the latest ARQ snapshot probably isn't compatible with 
TDB 0.8.10.

>
>> Or you can take the code for ARQ 2.8.8 and patch that in
>> TokenizerText.readLiteralEscape ; add
>
> I have no experience compiling the Jena packages.

Unpack the sources into directory src/ and run maven.

mkdir src
(cd src ; unzip -q ../arq-2.8.8-sources.jar )
mvn compile jar:jar

and look in target/

	Andy

>
> Regards,
>
> Michael Brunnbauer
>


Re: tcpdump RiotParseException

Posted by Paolo Castagna <ca...@googlemail.com>.
Michael Brunnbauer wrote:
> Hello Andy,
> 
> On Thu, Sep 29, 2011 at 11:26:52AM +0100, Andy Seaborne wrote:
>> I've just checked the code and it looks as if the database is fine, 
>> because it's (just) the decoding of nodes that is broken.  I've just 
>> fixed that in SVN.
> 
> Good to hear.
> 
>> I can do a ARQ SNAPSHOT build (to go with TDB-0.8.11 SNAPSHOT).
> 
> You mean a .jar for ARQ to place in the TDB-0.8.10 lib ? That would be fine.
> 
>> Or you can take the code for ARQ 2.8.8 and patch that in 
>> TokenizerText.readLiteralEscape ; add
> 
> I have no experience compiling the Jena packages.

Hi Michael,
it is extremely easy to do, if you want to try.
You "just" need Java and Maven.
If you do not have Maven to install it follow the instructions here [1].

Once you have Java and Maven, you do:

cd /tmp/
svn co http://svn.apache.org/repos/asf/incubator/jena/Jena2/ARQ/tags/ARQ-2.8.8/ arq
cd /tmp/arq/

... make your changes here

mvn install
ls -la /tmp/arq/target/

This is more or less the same for all the other Jena modules.

Paolo

  [1] http://maven.apache.org/download.html#Installation_Instructions

> 
> Regards,
> 
> Michael Brunnbauer
> 


Re: tcpdump RiotParseException

Posted by Michael Brunnbauer <br...@netestate.de>.
Hello Andy,

On Thu, Sep 29, 2011 at 11:26:52AM +0100, Andy Seaborne wrote:
> I've just checked the code and it looks as if the database is fine, 
> because it's (just) the decoding of nodes that is broken.  I've just 
> fixed that in SVN.

Good to hear.

> I can do a ARQ SNAPSHOT build (to go with TDB-0.8.11 SNAPSHOT).

You mean a .jar for ARQ to place in the TDB-0.8.10 lib ? That would be fine.

> Or you can take the code for ARQ 2.8.8 and patch that in 
> TokenizerText.readLiteralEscape ; add

I have no experience compiling the Jena packages.

Regards,

Michael Brunnbauer

-- 
++  Michael Brunnbauer
++  netEstate GmbH
++  Geisenhausener Straße 11a
++  81379 München
++  Tel +49 89 32 19 77 80
++  Fax +49 89 32 19 77 89 
++  E-Mail brunni@netestate.de
++  http://www.netestate.de/
++
++  Sitz: München, HRB Nr.142452 (Handelsregister B München)
++  USt-IdNr. DE221033342
++  Geschäftsführer: Michael Brunnbauer, Franz Brunnbauer
++  Prokurist: Dipl. Kfm. (Univ.) Markus Hendel

Re: tcpdump RiotParseException

Posted by Andy Seaborne <an...@apache.org>.
On 29/09/11 08:29, Michael Brunnbauer wrote:
>
> hi all
>
> I get a RiotParseException with a big TDB and tdbdump from TDB-0.8.10 after
> much of the data got written out. Do I have a corrupt TDB or is there a bug
> somewhere ? Here is the full trace:
>
> Exception in thread "main" org.openjena.riot.RiotParseException: [line: 1, col: 4 ] illegal escape sequence value: f (0x66)

The data seems to have a form feed character "\f" in it.  Unusual but legal.

I've just checked the code and it looks as if the database is fine, 
because it's (just) the decoding of nodes that is broken.  I've just 
fixed that in SVN.

Work arounds:

I can do a ARQ SNAPSHOT build (to go with TDB-0.8.11 SNAPSHOT).

Or you can take the code for ARQ 2.8.8 and patch that in 
TokenizerText.readLiteralEscape ; add

  case 'f':   return '\f' ;

to the switch statement.

(The whole node writing-reading could do with a checkover in case it can 
be made more efficiency but that's another matter)

...
> 	at tdb.tdbdump.main(tdbdump.java:20)
>
> cu,
> brunni
>

	Sorry about that,
	Andy