Hi Pekka, On 10 May 2012, at 14:18, Pekka Aarnio wrote: > PROBLEM 1 WITH Example 6: > ------------------------- > But when I try to run the example: > 6. Executing SPARQL queries against a ModelD2RQ # > > at Eclipse platform (Windows7) I get the java.lang.StackOverflowError > message: > > > 13:29:14 DEBUG ConnectedDB :: Keep alive agent is enabled > (interval: 3600 seconds, noop query: 'SELECT 1'). > Exception in thread "main" java.lang.StackOverflowError > at java.nio.CharBuffer.charAt(Unknown Source) > at java.nio.StringCharBuffer.get(Unknown Source) > at sun.nio.cs.UTF_8$Encoder.encodeBufferLoop(Unknown Source) > at sun.nio.cs.UTF_8$Encoder.encodeLoop(Unknown Source) > at java.nio.charset.CharsetEncoder.encode(Unknown Source) > at org.openjena.atlas.lib.Bytes.toByteBuffer(Bytes.java:285) > at org.openjena.atlas.lib.Bytes.toByteBuffer(Bytes.java:274) > at > org.openjena.atlas.io.BufferingWriter.output(BufferingWriter.java:139) > at > org.openjena.atlas.io.BufferingWriter.output(BufferingWriter.java:150) > at > org.openjena.atlas.io.BufferingWriter.output(BufferingWriter.java:171) > ....
Yes, this is a known bug in the v0.8 release. A workaround is to reduce the log level. This avoids the stack overflow because it only occurs when trying to print a debug message that turns some internal D2RQ object into a string. > I have increased vm stack size up to -Xss1024k but it didn't help. Yes — it's a genuine endless recursion, so more stack won't help. > Daniel had somekind of problem with these examples that was related to a > missing jar-file. He wrote in mail "[d2rq-dev] listStatements problem, > missing jar file" I've tried to clarify this on the website, http://d2rq.org/jena : [[ The D2RQ download omits some Jena/ARQ jar files that are not required to run D2RQ, but may be required to use other Jena/ARQ features. To get all jars, you can download the correct version of ARQ (as indicated by the name of D2RQ's /lib/arq-X.Y directory) from the Jena download site. ]] The Jena download site is http://incubator.apache.org/jena/download/ But this is unrelated to the stack overflow. > PROBLEM 2 WITH Example 7: > ------------------------- > And next, when I try to run the example: > 7. The D2RQ Assembler # Jena assemblers are some sort of black magic. The example, despite being really simple, breaks all the time for no apparent reason. I would recommend to just avoid the assemblers unless you know that you really need them. (In this case the problem is that FU Berlin, who are hosting the D2RQ namespace for historic reasons, have changed something in their server configuration, making the namespace URI go 404. I've been trying to get hold of someone there to look into this, but without success so far.) Best, Richard > > Following error messages occur: > > *Exception in thread "main" > com.hp.hpl.jena.shared.DoesNotExistException: > http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1# > * at com.hp.hpl.jena.rdf.arp.JenaReader.read(JenaReader.java:104) > > and next time I got a little further in execution with error message as: > > *Exception in thread "main" com.hp.hpl.jena.shared.JenaException: > java.net.ConnectException: Connection refused: connect > at com.hp.hpl.jena.rdf.arp.JenaReader.read(JenaReader.java:106) > at com.hp.hpl.jena.rdf.model.impl.ModelCom.read(ModelCom.java:223) > > > The problem might be in the assembler.ttl file content copied from the > example page. So, jena can't import the d2rq.rdf from the > url:<http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> > > My assembler.ttl content: > ------------------------ > @prefix : <#> . > @prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> . > @prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> . > > <> ja:imports d2rq: . > > :myModel > a d2rq:D2RQModel; > d2rq:mappingFile <mapping-iswc.ttl>; > d2rq:resourceBaseURI <http://localhost:2020/>; > . > ------------------------- > How should I edit this ttl-code so that it imports the d2rq rdf-file > from my local PC? Sure, I have to study jena assembler a little in order > to understand this example better. > > Thanks in advanced > Pekka Aarnio > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > d2rq-map-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/d2rq-map-devel ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ d2rq-map-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/d2rq-map-devel
