You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Steve Vestal <st...@adventiumlabs.com> on 2021/09/25 10:40:16 UTC

How to find line and column causing RiotException?

I am getting the following exception in a large file, XML/RDF format.  
Is there a way to find out line and column?  A way to configure Jena 
Riot so it will let me be unwise (not preferred, but it has happened).

org.apache.jena.riot.RiotException: 
<file:///C:/Users/svestal/...\revisions\6.owl> Code: 4/UNWISE_CHARACTER 
in PATH: The character matches no grammar rules of URIs/IRIs. These 
characters are permitted in RDF URI References, XML system identifiers, 
and XML Schema anyURIs.
     at 
org.apache.jena.riot.system.IRIResolver.exceptions(IRIResolver.java:389)



Re: How to find line and column causing RiotException?

Posted by Steve Vestal <st...@adventiumlabs.com>.
We were passing a local path as the Model#read input parameter rather 
than a proper file: URL in one place.  Thanks.

On 9/25/2021 12:24 PM, Andy Seaborne wrote:
> Steve,
>
> Version?
>
> If grep on the file does not find it ...
>
> If it comes from parsing, the WARN should have line+column.
>
> If you get an exception, maybe it's the base URI passed to the parser 
> and not in the data itself.
>
>     Andy
>
> On 25/09/2021 11:40, Steve Vestal wrote:
>> I am getting the following exception in a large file, XML/RDF format. 
>> Is there a way to find out line and column?  A way to configure Jena 
>> Riot so it will let me be unwise (not preferred, but it has happened).
>>
>> org.apache.jena.riot.RiotException: 
>> <file:///C:/Users/svestal/...\revisions\6.owl> Code: 
>> 4/UNWISE_CHARACTER in PATH: The character matches no grammar rules of 
>> URIs/IRIs. These characters are permitted in RDF URI References, XML 
>> system identifiers, and XML Schema anyURIs.
>>      at 
>> org.apache.jena.riot.system.IRIResolver.exceptions(IRIResolver.java:389)
>>
>>


Re: How to find line and column causing RiotException?

Posted by Andy Seaborne <an...@apache.org>.
Steve,

Version?

If grep on the file does not find it ...

If it comes from parsing, the WARN should have line+column.

If you get an exception, maybe it's the base URI passed to the parser 
and not in the data itself.

     Andy

On 25/09/2021 11:40, Steve Vestal wrote:
> I am getting the following exception in a large file, XML/RDF format. Is 
> there a way to find out line and column?  A way to configure Jena Riot 
> so it will let me be unwise (not preferred, but it has happened).
> 
> org.apache.jena.riot.RiotException: 
> <file:///C:/Users/svestal/...\revisions\6.owl> Code: 4/UNWISE_CHARACTER 
> in PATH: The character matches no grammar rules of URIs/IRIs. These 
> characters are permitted in RDF URI References, XML system identifiers, 
> and XML Schema anyURIs.
>      at 
> org.apache.jena.riot.system.IRIResolver.exceptions(IRIResolver.java:389)
> 
>