Search the web
Sign In
New User? Sign Up
jena-dev · Jena Developers
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
error loading N3 in Jena 2.6   Message List  
Reply | Forward Message #40800 of 42354 |
Re: [jena-dev] Re: error loading N3 in Jena 2.6



jmoscato wrote:
>
> I still get the Bad IRI exception. I do a TDBFactory.createModel(), then
> your suggested workaround. Loading the N3 data happens after that, which
> is when I get the exception.
>
> Is the problem that my URI does not resolve to a real address?
>
> Any other ideas? And if I should start my own message thread, please let
> me know.


> com.hp.hpl.jena.shared.JenaException:
> com.hp.hpl.jena.riot.RiotException: Bad IRI:
> http://www.fakedomain.org/bar#

I can't reproduce this - I wrote a datafile withj that IRI and it worked
fine.

Could you provide a small N3 data file that illustrates the problem?
Also, there should be more stack information that just the RiotException.

> I have tried things like the following, but to no avail:
> model.getReader("N3").setProperty("allowBadURIs", "true");
> model.getReader("N3").setProperty("iri-rules", "lax");

1/ That does not do what you think it does
2/ And it won't work even if it did ;-)

model.getReader creates new reader you can configure (it's not a good
choice of name for the method).

The idiom is:

RDFReader r = model.getReader ...
r.setProperty...
r.read ....

And the Turtle reader in TDB does not have those properties.



>
> Is there a way to relax such checking, that perhaps would help the
> original poster as well?

This is a different issue to the OP (that was to do with literals).

Andy




Fri Jul 10, 2009 11:01 am

andyseaborne
Offline Offline
Send Email Send Email

Forward
Message #40800 of 42354 |
Expand Messages Author Sort by Date

Hello, I switched my Jena libraries to those distributed with TDB 0.8.1 (Jena 2.6.0, I believe). My code for loading RDF worked previously. model.read(in,...
David Donohue
schtickdisc
Offline Send Email
Jul 9, 2009
9:21 pm

... Oh yes! TDB now has it's own Turtle parser (N3 is parsed as Turtle nowadays in Jena) as well as it's own N-triples parser. They are faster - and...
Andy Seaborne
andyseaborne
Offline Send Email
Jul 9, 2009
10:18 pm

Thanks, Andy, your workaround worked perfectly for me. My how the loader has sped up! I continue to be amazed at your results and your service (it's late...
David Donohue
schtickdisc
Offline Send Email
Jul 10, 2009
2:48 am

Hi, I just noticed a similar problem when upgrading to TDB 0.8.1 and Jena 2.6.0. I have previously been loading N3 successfully, but now I get an exception ...
jmoscato
Offline Send Email
Jul 9, 2009
10:25 pm

Hello Andy, I just saw your reply in the middle of creating and sending my message. I'll try your suggested workaround and post the results. Thanks! John ... ...
jmoscato
Offline Send Email
Jul 9, 2009
10:33 pm

I still get the Bad IRI exception. I do a TDBFactory.createModel(), then your suggested workaround. Loading the N3 data happens after that, which is when I get...
jmoscato
Offline Send Email
Jul 9, 2009
10:56 pm

... I can't reproduce this - I wrote a datafile withj that IRI and it worked fine. Could you provide a small N3 data file that illustrates the problem? Also,...
Andy Seaborne
andyseaborne
Offline Send Email
Jul 10, 2009
11:01 am

This is a FYGI concerning design decisions about I/O global settings in Jena. ===== Back in Jena 1 days, the issue of scope of the I/O subsystems was one that...
Jeremy Carroll
jeremy.carro...
Offline Send Email
Jul 11, 2009
12:30 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help