You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Brad Moran <bm...@pinnacle21.net> on 2013/08/19 21:45:08 UTC

jena.textindexer error

*Hi,*
*tried running jena.textindexer from bash like:*

java -cp jena-2.10.2/jena-fuseki-0.2.8-SNAPSHOT/fuseki-server.jar
jena.textindexer --desc=NetBeansProjects/mdr-older/trunk/data.ttl

*But i am receiving this error:*

ERROR [line: 1, col: 1 ] Not implemented
com.hp.hpl.jena.sparql.ARQException: Failed reading assembler description:
[line: 1, col: 1 ] Not implemented
at
com.hp.hpl.jena.sparql.core.assembler.AssemblerUtils.build(AssemblerUtils.java:87)
at
org.apache.jena.query.text.TextDatasetFactory.create(TextDatasetFactory.java:38)
at jena.textindexer.processModulesAndArgs(textindexer.java:89)
at arq.cmdline.CmdArgModule.process(CmdArgModule.java:51)
at arq.cmdline.CmdMain.mainMethod(CmdMain.java:100)
at arq.cmdline.CmdMain.mainRun(CmdMain.java:63)
at arq.cmdline.CmdMain.mainRun(CmdMain.java:50)
at jena.textindexer.main(textindexer.java:55)

*The problem seems to be with my assembler file:*
*
*
@prefix :        <http://localhost/jena_example/#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix tdb:     <http://jena.hpl.hp.com/2008/tdb#> .
@prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .
@prefix text:    <http://jena.apache.org/text#> .
@prefix mms:     <http://rdf.cdisc.org/mms#> .
@prefix sdtms:   <http://rdf.cdisc.org/sdtm-1-2/schema#> .
@prefix sdtmigs: <http://rdf.cdisc.org/sdtmig-3-1-2/schema#> .

## Example of a TDB dataset and text index
## Initialize TDB
[] ja:loadClass "com.hp.hpl.jena.tdb.TDB" .
tdb:DatasetTDB  rdfs:subClassOf  ja:RDFDataset .
tdb:GraphTDB    rdfs:subClassOf  ja:Model .

## Initialize text query
[] ja:loadClass       "org.apache.jena.query.text.TextQuery" .
# A TextDataset is a regular dataset with a text index.
text:TextDataset      rdfs:subClassOf   ja:RDFDataset .
# Lucene index
text:TextIndexLucene  rdfs:subClassOf   text:TextIndex .

## ---------------------------------------------------------------
## This URI must be fixed - it's used to assemble the text dataset.

:text_dataset rdf:type     text:TextDataset ;
    text:dataset   <#dataset> ;
    text:index     <#indexLucene> ;
    .

# A TDB dataset used for RDF storage
<#dataset> rdf:type      tdb:DatasetTDB ;
    tdb:location "tdb" ;
    .

# Text index description
<#indexLucene> a text:TextIndexLucene ;
    text:directory <file:luceneIndexes> ;
    text:entityMap <#entMap> ;
    .

# Mapping in the index
# URI stored in field "uri"
# rdfs:label is mapped to field "text"
<#entMap> a text:EntityMap ;
    text:entityField      "uri" ;
    text:defaultField     "text" ;
    text:map (
         [ text:field "text" ; text:predicate mms:dataElementName ]
 [ text:field "text" ; text:predicate mms:dataElementDescription ]
 [ text:field "text" ; text:predicate mms:dataElementType ]
 [ text:field "text" ; text:predicate mms:dataElementLabel ]
 [ text:field "text" ; text:predicate mms:broader ]
 [ text:field "text" ; text:predicate mms:ordinal ]
 [ text:field "text" ; text:predicate sdtms:dataElementCompliance ]
 [ text:field "text" ; text:predicate sdtms:dataElementType ]
 [ text:field "text" ; text:predicate sdtms:dataElementRole ]
 [ text:field "text" ; text:predicate sdtmigs:references ]
         ) .

*Any advice on what might be going wrong?*

Re: Re: jena.textindexer error

Posted by Chris Dollin <ch...@epimorphics.com>.
On Monday, August 19, 2013 05:32:13 PM Brad Moran wrote:
> Actually just tried saving as .rdf and I get a similar error (content not
> allowed in prolog, which does not make sense to me because there is nothing
> before the @prefix, I am wondering if TextEdit could be causing this
> problem?

"Content not allowed in prolog" is usually the RDF/XML parser objecting to
non-RDF/XML text such as Turtle.

I suspect you have a file with Turtle content (@prefix etc etc) but you've
given it a name (eg wossname.rdf) that has the Jena reader expecting
RDF/XML. 

Save it as wossname.ttl and see what happens.

Chris

-- 
"I don't want to know what the Structuralists think! I want     /Archer's Goon/
 to know what YOU think!"

Epimorphics Ltd, http://www.epimorphics.com
Registered address: Court Lodge, 105 High Street, Portishead, Bristol BS20 6PT
Epimorphics Ltd. is a limited company registered in England (number 7016688)


Re: jena.textindexer error

Posted by Brad Moran <bm...@pinnacle21.net>.
Just opened in Xcode, and TextEdit was adding to the file, thanks for your
help.


On Mon, Aug 19, 2013 at 5:32 PM, Brad Moran <bm...@pinnacle21.net> wrote:

> Actually just tried saving as .rdf and I get a similar error (content not
> allowed in prolog, which does not make sense to me because there is nothing
> before the @prefix, I am wondering if TextEdit could be causing this
> problem?
>
>
> On Mon, Aug 19, 2013 at 5:01 PM, Andy Seaborne <an...@apache.org> wrote:
>
>> On 19/08/13 21:26, Brad Moran wrote:
>>
>>> Where exactly? As far as I see there is no '{' in the file, am I missing
>>> one?
>>>
>>
>> The only way I can create the error message you report is to chnage it
>> and put a "{" at the start of the file.
>>
>> There should not be one.
>>
>> The file you sent in email works for me 9althopugh the email being
>> corrupted, that might be luck), so it looks like NetBeansProjects/mdr-older/
>> **trunk/data.ttl is different.
>>
>> Any other parse error at that point leads to a different message.
>>
>>         Andy
>>
>>
>>
>>>
>>> On Mon, Aug 19, 2013 at 3:45 PM, Brad Moran <bm...@pinnacle21.net>
>>> wrote:
>>>
>>>  *Hi,*
>>>> *tried running jena.textindexer from bash like:*
>>>>
>>>>
>>>> java -cp jena-2.10.2/jena-fuseki-0.2.8-**SNAPSHOT/fuseki-server.jar
>>>> jena.textindexer --desc=NetBeansProjects/mdr-**older/trunk/data.ttl
>>>>
>>>> *But i am receiving this error:*
>>>>
>>>>
>>>> ERROR [line: 1, col: 1 ] Not implemented
>>>> com.hp.hpl.jena.sparql.**ARQException: Failed reading assembler
>>>> description:
>>>> [line: 1, col: 1 ] Not implemented
>>>>   at
>>>> com.hp.hpl.jena.sparql.core.**assembler.AssemblerUtils.**
>>>> build(AssemblerUtils.java:87)
>>>> at
>>>> org.apache.jena.query.text.**TextDatasetFactory.create(**
>>>> TextDatasetFactory.java:38)
>>>>   at jena.textindexer.**processModulesAndArgs(**textindexer.java:89)
>>>> at arq.cmdline.CmdArgModule.**process(CmdArgModule.java:51)
>>>>   at arq.cmdline.CmdMain.**mainMethod(CmdMain.java:100)
>>>> at arq.cmdline.CmdMain.mainRun(**CmdMain.java:63)
>>>> at arq.cmdline.CmdMain.mainRun(**CmdMain.java:50)
>>>>   at jena.textindexer.main(**textindexer.java:55)
>>>>
>>>> *The problem seems to be with my assembler file:*
>>>> *
>>>>
>>>> *
>>>> @prefix :        <http://localhost/jena_**example/#<http://localhost/jena_example/#>>
>>>> .
>>>> @prefix rdf:     <http://www.w3.org/1999/02/22-**rdf-syntax-ns#<http://www.w3.org/1999/02/22-rdf-syntax-ns#>>
>>>> .
>>>> @prefix rdfs:    <http://www.w3.org/2000/01/**rdf-schema#<http://www.w3.org/2000/01/rdf-schema#>>
>>>> .
>>>> @prefix tdb:     <http://jena.hpl.hp.com/2008/**tdb#<http://jena.hpl.hp.com/2008/tdb#>>
>>>> .
>>>> @prefix ja:      <http://jena.hpl.hp.com/2005/**11/Assembler#<http://jena.hpl.hp.com/2005/11/Assembler#>>
>>>> .
>>>> @prefix text:    <http://jena.apache.org/text#> .
>>>> @prefix mms:     <http://rdf.cdisc.org/mms#> .
>>>> @prefix sdtms:   <http://rdf.cdisc.org/sdtm-1-**2/schema#<http://rdf.cdisc.org/sdtm-1-2/schema#>>
>>>> .
>>>> @prefix sdtmigs: <http://rdf.cdisc.org/sdtmig-**3-1-2/schema#<http://rdf.cdisc.org/sdtmig-3-1-2/schema#>>
>>>> .
>>>>
>>>> ## Example of a TDB dataset and text index
>>>> ## Initialize TDB
>>>> [] ja:loadClass "com.hp.hpl.jena.tdb.TDB" .
>>>> tdb:DatasetTDB  rdfs:subClassOf  ja:RDFDataset .
>>>> tdb:GraphTDB    rdfs:subClassOf  ja:Model .
>>>>
>>>> ## Initialize text query
>>>> [] ja:loadClass       "org.apache.jena.query.text.**TextQuery" .
>>>> # A TextDataset is a regular dataset with a text index.
>>>> text:TextDataset      rdfs:subClassOf   ja:RDFDataset .
>>>> # Lucene index
>>>> text:TextIndexLucene  rdfs:subClassOf   text:TextIndex .
>>>>
>>>> ## ------------------------------**------------------------------**---
>>>> ## This URI must be fixed - it's used to assemble the text dataset.
>>>>
>>>> :text_dataset rdf:type     text:TextDataset ;
>>>>      text:dataset   <#dataset> ;
>>>>      text:index     <#indexLucene> ;
>>>>      .
>>>>
>>>> # A TDB dataset used for RDF storage
>>>> <#dataset> rdf:type      tdb:DatasetTDB ;
>>>>      tdb:location "tdb" ;
>>>>      .
>>>>
>>>> # Text index description
>>>> <#indexLucene> a text:TextIndexLucene ;
>>>>      text:directory <file:luceneIndexes> ;
>>>>      text:entityMap <#entMap> ;
>>>>      .
>>>>
>>>> # Mapping in the index
>>>> # URI stored in field "uri"
>>>> # rdfs:label is mapped to field "text"
>>>> <#entMap> a text:EntityMap ;
>>>>      text:entityField      "uri" ;
>>>>      text:defaultField     "text" ;
>>>>      text:map (
>>>>           [ text:field "text" ; text:predicate mms:dataElementName ]
>>>>   [ text:field "text" ; text:predicate mms:dataElementDescription ]
>>>>   [ text:field "text" ; text:predicate mms:dataElementType ]
>>>>   [ text:field "text" ; text:predicate mms:dataElementLabel ]
>>>>   [ text:field "text" ; text:predicate mms:broader ]
>>>>   [ text:field "text" ; text:predicate mms:ordinal ]
>>>>   [ text:field "text" ; text:predicate sdtms:dataElementCompliance ]
>>>>   [ text:field "text" ; text:predicate sdtms:dataElementType ]
>>>>   [ text:field "text" ; text:predicate sdtms:dataElementRole ]
>>>>   [ text:field "text" ; text:predicate sdtmigs:references ]
>>>>           ) .
>>>>
>>>> *Any advice on what might be going wrong?*
>>>>
>>>>
>>>
>>
>

Re: jena.textindexer error

Posted by Brad Moran <bm...@pinnacle21.net>.
Actually just tried saving as .rdf and I get a similar error (content not
allowed in prolog, which does not make sense to me because there is nothing
before the @prefix, I am wondering if TextEdit could be causing this
problem?


On Mon, Aug 19, 2013 at 5:01 PM, Andy Seaborne <an...@apache.org> wrote:

> On 19/08/13 21:26, Brad Moran wrote:
>
>> Where exactly? As far as I see there is no '{' in the file, am I missing
>> one?
>>
>
> The only way I can create the error message you report is to chnage it and
> put a "{" at the start of the file.
>
> There should not be one.
>
> The file you sent in email works for me 9althopugh the email being
> corrupted, that might be luck), so it looks like NetBeansProjects/mdr-older/
> **trunk/data.ttl is different.
>
> Any other parse error at that point leads to a different message.
>
>         Andy
>
>
>
>>
>> On Mon, Aug 19, 2013 at 3:45 PM, Brad Moran <bm...@pinnacle21.net>
>> wrote:
>>
>>  *Hi,*
>>> *tried running jena.textindexer from bash like:*
>>>
>>>
>>> java -cp jena-2.10.2/jena-fuseki-0.2.8-**SNAPSHOT/fuseki-server.jar
>>> jena.textindexer --desc=NetBeansProjects/mdr-**older/trunk/data.ttl
>>>
>>> *But i am receiving this error:*
>>>
>>>
>>> ERROR [line: 1, col: 1 ] Not implemented
>>> com.hp.hpl.jena.sparql.**ARQException: Failed reading assembler
>>> description:
>>> [line: 1, col: 1 ] Not implemented
>>>   at
>>> com.hp.hpl.jena.sparql.core.**assembler.AssemblerUtils.**
>>> build(AssemblerUtils.java:87)
>>> at
>>> org.apache.jena.query.text.**TextDatasetFactory.create(**
>>> TextDatasetFactory.java:38)
>>>   at jena.textindexer.**processModulesAndArgs(**textindexer.java:89)
>>> at arq.cmdline.CmdArgModule.**process(CmdArgModule.java:51)
>>>   at arq.cmdline.CmdMain.**mainMethod(CmdMain.java:100)
>>> at arq.cmdline.CmdMain.mainRun(**CmdMain.java:63)
>>> at arq.cmdline.CmdMain.mainRun(**CmdMain.java:50)
>>>   at jena.textindexer.main(**textindexer.java:55)
>>>
>>> *The problem seems to be with my assembler file:*
>>> *
>>>
>>> *
>>> @prefix :        <http://localhost/jena_**example/#<http://localhost/jena_example/#>>
>>> .
>>> @prefix rdf:     <http://www.w3.org/1999/02/22-**rdf-syntax-ns#<http://www.w3.org/1999/02/22-rdf-syntax-ns#>>
>>> .
>>> @prefix rdfs:    <http://www.w3.org/2000/01/**rdf-schema#<http://www.w3.org/2000/01/rdf-schema#>>
>>> .
>>> @prefix tdb:     <http://jena.hpl.hp.com/2008/**tdb#<http://jena.hpl.hp.com/2008/tdb#>>
>>> .
>>> @prefix ja:      <http://jena.hpl.hp.com/2005/**11/Assembler#<http://jena.hpl.hp.com/2005/11/Assembler#>>
>>> .
>>> @prefix text:    <http://jena.apache.org/text#> .
>>> @prefix mms:     <http://rdf.cdisc.org/mms#> .
>>> @prefix sdtms:   <http://rdf.cdisc.org/sdtm-1-**2/schema#<http://rdf.cdisc.org/sdtm-1-2/schema#>>
>>> .
>>> @prefix sdtmigs: <http://rdf.cdisc.org/sdtmig-**3-1-2/schema#<http://rdf.cdisc.org/sdtmig-3-1-2/schema#>>
>>> .
>>>
>>> ## Example of a TDB dataset and text index
>>> ## Initialize TDB
>>> [] ja:loadClass "com.hp.hpl.jena.tdb.TDB" .
>>> tdb:DatasetTDB  rdfs:subClassOf  ja:RDFDataset .
>>> tdb:GraphTDB    rdfs:subClassOf  ja:Model .
>>>
>>> ## Initialize text query
>>> [] ja:loadClass       "org.apache.jena.query.text.**TextQuery" .
>>> # A TextDataset is a regular dataset with a text index.
>>> text:TextDataset      rdfs:subClassOf   ja:RDFDataset .
>>> # Lucene index
>>> text:TextIndexLucene  rdfs:subClassOf   text:TextIndex .
>>>
>>> ## ------------------------------**------------------------------**---
>>> ## This URI must be fixed - it's used to assemble the text dataset.
>>>
>>> :text_dataset rdf:type     text:TextDataset ;
>>>      text:dataset   <#dataset> ;
>>>      text:index     <#indexLucene> ;
>>>      .
>>>
>>> # A TDB dataset used for RDF storage
>>> <#dataset> rdf:type      tdb:DatasetTDB ;
>>>      tdb:location "tdb" ;
>>>      .
>>>
>>> # Text index description
>>> <#indexLucene> a text:TextIndexLucene ;
>>>      text:directory <file:luceneIndexes> ;
>>>      text:entityMap <#entMap> ;
>>>      .
>>>
>>> # Mapping in the index
>>> # URI stored in field "uri"
>>> # rdfs:label is mapped to field "text"
>>> <#entMap> a text:EntityMap ;
>>>      text:entityField      "uri" ;
>>>      text:defaultField     "text" ;
>>>      text:map (
>>>           [ text:field "text" ; text:predicate mms:dataElementName ]
>>>   [ text:field "text" ; text:predicate mms:dataElementDescription ]
>>>   [ text:field "text" ; text:predicate mms:dataElementType ]
>>>   [ text:field "text" ; text:predicate mms:dataElementLabel ]
>>>   [ text:field "text" ; text:predicate mms:broader ]
>>>   [ text:field "text" ; text:predicate mms:ordinal ]
>>>   [ text:field "text" ; text:predicate sdtms:dataElementCompliance ]
>>>   [ text:field "text" ; text:predicate sdtms:dataElementType ]
>>>   [ text:field "text" ; text:predicate sdtms:dataElementRole ]
>>>   [ text:field "text" ; text:predicate sdtmigs:references ]
>>>           ) .
>>>
>>> *Any advice on what might be going wrong?*
>>>
>>>
>>
>

Re: jena.textindexer error

Posted by Brad Moran <bm...@pinnacle21.net>.
Sorry, it actually saves as .rtf


On Mon, Aug 19, 2013 at 5:08 PM, Brad Moran <bm...@pinnacle21.net> wrote:

> In TextEdit there does not appear to be any '{' in the file. However,if I
> save the file it automatically saves as .rdf file. Then I manually convert
> to .ttl file. Do you think this could be causing a problem? Do I need to
> use a different editor to generate a .ttl file?
>
>
> On Mon, Aug 19, 2013 at 5:01 PM, Andy Seaborne <an...@apache.org> wrote:
>
>> On 19/08/13 21:26, Brad Moran wrote:
>>
>>> Where exactly? As far as I see there is no '{' in the file, am I missing
>>> one?
>>>
>>
>> The only way I can create the error message you report is to chnage it
>> and put a "{" at the start of the file.
>>
>> There should not be one.
>>
>> The file you sent in email works for me 9althopugh the email being
>> corrupted, that might be luck), so it looks like NetBeansProjects/mdr-older/
>> **trunk/data.ttl is different.
>>
>> Any other parse error at that point leads to a different message.
>>
>>         Andy
>>
>>
>>
>>>
>>> On Mon, Aug 19, 2013 at 3:45 PM, Brad Moran <bm...@pinnacle21.net>
>>> wrote:
>>>
>>>  *Hi,*
>>>> *tried running jena.textindexer from bash like:*
>>>>
>>>>
>>>> java -cp jena-2.10.2/jena-fuseki-0.2.8-**SNAPSHOT/fuseki-server.jar
>>>> jena.textindexer --desc=NetBeansProjects/mdr-**older/trunk/data.ttl
>>>>
>>>> *But i am receiving this error:*
>>>>
>>>>
>>>> ERROR [line: 1, col: 1 ] Not implemented
>>>> com.hp.hpl.jena.sparql.**ARQException: Failed reading assembler
>>>> description:
>>>> [line: 1, col: 1 ] Not implemented
>>>>   at
>>>> com.hp.hpl.jena.sparql.core.**assembler.AssemblerUtils.**
>>>> build(AssemblerUtils.java:87)
>>>> at
>>>> org.apache.jena.query.text.**TextDatasetFactory.create(**
>>>> TextDatasetFactory.java:38)
>>>>   at jena.textindexer.**processModulesAndArgs(**textindexer.java:89)
>>>> at arq.cmdline.CmdArgModule.**process(CmdArgModule.java:51)
>>>>   at arq.cmdline.CmdMain.**mainMethod(CmdMain.java:100)
>>>> at arq.cmdline.CmdMain.mainRun(**CmdMain.java:63)
>>>> at arq.cmdline.CmdMain.mainRun(**CmdMain.java:50)
>>>>   at jena.textindexer.main(**textindexer.java:55)
>>>>
>>>> *The problem seems to be with my assembler file:*
>>>> *
>>>>
>>>> *
>>>> @prefix :        <http://localhost/jena_**example/#<http://localhost/jena_example/#>>
>>>> .
>>>> @prefix rdf:     <http://www.w3.org/1999/02/22-**rdf-syntax-ns#<http://www.w3.org/1999/02/22-rdf-syntax-ns#>>
>>>> .
>>>> @prefix rdfs:    <http://www.w3.org/2000/01/**rdf-schema#<http://www.w3.org/2000/01/rdf-schema#>>
>>>> .
>>>> @prefix tdb:     <http://jena.hpl.hp.com/2008/**tdb#<http://jena.hpl.hp.com/2008/tdb#>>
>>>> .
>>>> @prefix ja:      <http://jena.hpl.hp.com/2005/**11/Assembler#<http://jena.hpl.hp.com/2005/11/Assembler#>>
>>>> .
>>>> @prefix text:    <http://jena.apache.org/text#> .
>>>> @prefix mms:     <http://rdf.cdisc.org/mms#> .
>>>> @prefix sdtms:   <http://rdf.cdisc.org/sdtm-1-**2/schema#<http://rdf.cdisc.org/sdtm-1-2/schema#>>
>>>> .
>>>> @prefix sdtmigs: <http://rdf.cdisc.org/sdtmig-**3-1-2/schema#<http://rdf.cdisc.org/sdtmig-3-1-2/schema#>>
>>>> .
>>>>
>>>> ## Example of a TDB dataset and text index
>>>> ## Initialize TDB
>>>> [] ja:loadClass "com.hp.hpl.jena.tdb.TDB" .
>>>> tdb:DatasetTDB  rdfs:subClassOf  ja:RDFDataset .
>>>> tdb:GraphTDB    rdfs:subClassOf  ja:Model .
>>>>
>>>> ## Initialize text query
>>>> [] ja:loadClass       "org.apache.jena.query.text.**TextQuery" .
>>>> # A TextDataset is a regular dataset with a text index.
>>>> text:TextDataset      rdfs:subClassOf   ja:RDFDataset .
>>>> # Lucene index
>>>> text:TextIndexLucene  rdfs:subClassOf   text:TextIndex .
>>>>
>>>> ## ------------------------------**------------------------------**---
>>>> ## This URI must be fixed - it's used to assemble the text dataset.
>>>>
>>>> :text_dataset rdf:type     text:TextDataset ;
>>>>      text:dataset   <#dataset> ;
>>>>      text:index     <#indexLucene> ;
>>>>      .
>>>>
>>>> # A TDB dataset used for RDF storage
>>>> <#dataset> rdf:type      tdb:DatasetTDB ;
>>>>      tdb:location "tdb" ;
>>>>      .
>>>>
>>>> # Text index description
>>>> <#indexLucene> a text:TextIndexLucene ;
>>>>      text:directory <file:luceneIndexes> ;
>>>>      text:entityMap <#entMap> ;
>>>>      .
>>>>
>>>> # Mapping in the index
>>>> # URI stored in field "uri"
>>>> # rdfs:label is mapped to field "text"
>>>> <#entMap> a text:EntityMap ;
>>>>      text:entityField      "uri" ;
>>>>      text:defaultField     "text" ;
>>>>      text:map (
>>>>           [ text:field "text" ; text:predicate mms:dataElementName ]
>>>>   [ text:field "text" ; text:predicate mms:dataElementDescription ]
>>>>   [ text:field "text" ; text:predicate mms:dataElementType ]
>>>>   [ text:field "text" ; text:predicate mms:dataElementLabel ]
>>>>   [ text:field "text" ; text:predicate mms:broader ]
>>>>   [ text:field "text" ; text:predicate mms:ordinal ]
>>>>   [ text:field "text" ; text:predicate sdtms:dataElementCompliance ]
>>>>   [ text:field "text" ; text:predicate sdtms:dataElementType ]
>>>>   [ text:field "text" ; text:predicate sdtms:dataElementRole ]
>>>>   [ text:field "text" ; text:predicate sdtmigs:references ]
>>>>           ) .
>>>>
>>>> *Any advice on what might be going wrong?*
>>>>
>>>>
>>>
>>
>

Re: jena.textindexer error

Posted by Brad Moran <bm...@pinnacle21.net>.
In TextEdit there does not appear to be any '{' in the file. However,if I
save the file it automatically saves as .rdf file. Then I manually convert
to .ttl file. Do you think this could be causing a problem? Do I need to
use a different editor to generate a .ttl file?


On Mon, Aug 19, 2013 at 5:01 PM, Andy Seaborne <an...@apache.org> wrote:

> On 19/08/13 21:26, Brad Moran wrote:
>
>> Where exactly? As far as I see there is no '{' in the file, am I missing
>> one?
>>
>
> The only way I can create the error message you report is to chnage it and
> put a "{" at the start of the file.
>
> There should not be one.
>
> The file you sent in email works for me 9althopugh the email being
> corrupted, that might be luck), so it looks like NetBeansProjects/mdr-older/
> **trunk/data.ttl is different.
>
> Any other parse error at that point leads to a different message.
>
>         Andy
>
>
>
>>
>> On Mon, Aug 19, 2013 at 3:45 PM, Brad Moran <bm...@pinnacle21.net>
>> wrote:
>>
>>  *Hi,*
>>> *tried running jena.textindexer from bash like:*
>>>
>>>
>>> java -cp jena-2.10.2/jena-fuseki-0.2.8-**SNAPSHOT/fuseki-server.jar
>>> jena.textindexer --desc=NetBeansProjects/mdr-**older/trunk/data.ttl
>>>
>>> *But i am receiving this error:*
>>>
>>>
>>> ERROR [line: 1, col: 1 ] Not implemented
>>> com.hp.hpl.jena.sparql.**ARQException: Failed reading assembler
>>> description:
>>> [line: 1, col: 1 ] Not implemented
>>>   at
>>> com.hp.hpl.jena.sparql.core.**assembler.AssemblerUtils.**
>>> build(AssemblerUtils.java:87)
>>> at
>>> org.apache.jena.query.text.**TextDatasetFactory.create(**
>>> TextDatasetFactory.java:38)
>>>   at jena.textindexer.**processModulesAndArgs(**textindexer.java:89)
>>> at arq.cmdline.CmdArgModule.**process(CmdArgModule.java:51)
>>>   at arq.cmdline.CmdMain.**mainMethod(CmdMain.java:100)
>>> at arq.cmdline.CmdMain.mainRun(**CmdMain.java:63)
>>> at arq.cmdline.CmdMain.mainRun(**CmdMain.java:50)
>>>   at jena.textindexer.main(**textindexer.java:55)
>>>
>>> *The problem seems to be with my assembler file:*
>>> *
>>>
>>> *
>>> @prefix :        <http://localhost/jena_**example/#<http://localhost/jena_example/#>>
>>> .
>>> @prefix rdf:     <http://www.w3.org/1999/02/22-**rdf-syntax-ns#<http://www.w3.org/1999/02/22-rdf-syntax-ns#>>
>>> .
>>> @prefix rdfs:    <http://www.w3.org/2000/01/**rdf-schema#<http://www.w3.org/2000/01/rdf-schema#>>
>>> .
>>> @prefix tdb:     <http://jena.hpl.hp.com/2008/**tdb#<http://jena.hpl.hp.com/2008/tdb#>>
>>> .
>>> @prefix ja:      <http://jena.hpl.hp.com/2005/**11/Assembler#<http://jena.hpl.hp.com/2005/11/Assembler#>>
>>> .
>>> @prefix text:    <http://jena.apache.org/text#> .
>>> @prefix mms:     <http://rdf.cdisc.org/mms#> .
>>> @prefix sdtms:   <http://rdf.cdisc.org/sdtm-1-**2/schema#<http://rdf.cdisc.org/sdtm-1-2/schema#>>
>>> .
>>> @prefix sdtmigs: <http://rdf.cdisc.org/sdtmig-**3-1-2/schema#<http://rdf.cdisc.org/sdtmig-3-1-2/schema#>>
>>> .
>>>
>>> ## Example of a TDB dataset and text index
>>> ## Initialize TDB
>>> [] ja:loadClass "com.hp.hpl.jena.tdb.TDB" .
>>> tdb:DatasetTDB  rdfs:subClassOf  ja:RDFDataset .
>>> tdb:GraphTDB    rdfs:subClassOf  ja:Model .
>>>
>>> ## Initialize text query
>>> [] ja:loadClass       "org.apache.jena.query.text.**TextQuery" .
>>> # A TextDataset is a regular dataset with a text index.
>>> text:TextDataset      rdfs:subClassOf   ja:RDFDataset .
>>> # Lucene index
>>> text:TextIndexLucene  rdfs:subClassOf   text:TextIndex .
>>>
>>> ## ------------------------------**------------------------------**---
>>> ## This URI must be fixed - it's used to assemble the text dataset.
>>>
>>> :text_dataset rdf:type     text:TextDataset ;
>>>      text:dataset   <#dataset> ;
>>>      text:index     <#indexLucene> ;
>>>      .
>>>
>>> # A TDB dataset used for RDF storage
>>> <#dataset> rdf:type      tdb:DatasetTDB ;
>>>      tdb:location "tdb" ;
>>>      .
>>>
>>> # Text index description
>>> <#indexLucene> a text:TextIndexLucene ;
>>>      text:directory <file:luceneIndexes> ;
>>>      text:entityMap <#entMap> ;
>>>      .
>>>
>>> # Mapping in the index
>>> # URI stored in field "uri"
>>> # rdfs:label is mapped to field "text"
>>> <#entMap> a text:EntityMap ;
>>>      text:entityField      "uri" ;
>>>      text:defaultField     "text" ;
>>>      text:map (
>>>           [ text:field "text" ; text:predicate mms:dataElementName ]
>>>   [ text:field "text" ; text:predicate mms:dataElementDescription ]
>>>   [ text:field "text" ; text:predicate mms:dataElementType ]
>>>   [ text:field "text" ; text:predicate mms:dataElementLabel ]
>>>   [ text:field "text" ; text:predicate mms:broader ]
>>>   [ text:field "text" ; text:predicate mms:ordinal ]
>>>   [ text:field "text" ; text:predicate sdtms:dataElementCompliance ]
>>>   [ text:field "text" ; text:predicate sdtms:dataElementType ]
>>>   [ text:field "text" ; text:predicate sdtms:dataElementRole ]
>>>   [ text:field "text" ; text:predicate sdtmigs:references ]
>>>           ) .
>>>
>>> *Any advice on what might be going wrong?*
>>>
>>>
>>
>

Re: jena.textindexer error

Posted by Andy Seaborne <an...@apache.org>.
On 19/08/13 21:26, Brad Moran wrote:
> Where exactly? As far as I see there is no '{' in the file, am I missing
> one?

The only way I can create the error message you report is to chnage it 
and put a "{" at the start of the file.

There should not be one.

The file you sent in email works for me 9althopugh the email being 
corrupted, that might be luck), so it looks like 
NetBeansProjects/mdr-older/trunk/data.ttl is different.

Any other parse error at that point leads to a different message.

	Andy


>
>
> On Mon, Aug 19, 2013 at 3:45 PM, Brad Moran <bm...@pinnacle21.net> wrote:
>
>> *Hi,*
>> *tried running jena.textindexer from bash like:*
>>
>> java -cp jena-2.10.2/jena-fuseki-0.2.8-SNAPSHOT/fuseki-server.jar
>> jena.textindexer --desc=NetBeansProjects/mdr-older/trunk/data.ttl
>>
>> *But i am receiving this error:*
>>
>> ERROR [line: 1, col: 1 ] Not implemented
>> com.hp.hpl.jena.sparql.ARQException: Failed reading assembler description:
>> [line: 1, col: 1 ] Not implemented
>>   at
>> com.hp.hpl.jena.sparql.core.assembler.AssemblerUtils.build(AssemblerUtils.java:87)
>> at
>> org.apache.jena.query.text.TextDatasetFactory.create(TextDatasetFactory.java:38)
>>   at jena.textindexer.processModulesAndArgs(textindexer.java:89)
>> at arq.cmdline.CmdArgModule.process(CmdArgModule.java:51)
>>   at arq.cmdline.CmdMain.mainMethod(CmdMain.java:100)
>> at arq.cmdline.CmdMain.mainRun(CmdMain.java:63)
>> at arq.cmdline.CmdMain.mainRun(CmdMain.java:50)
>>   at jena.textindexer.main(textindexer.java:55)
>>
>> *The problem seems to be with my assembler file:*
>> *
>> *
>> @prefix :        <http://localhost/jena_example/#> .
>> @prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
>> @prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
>> @prefix tdb:     <http://jena.hpl.hp.com/2008/tdb#> .
>> @prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .
>> @prefix text:    <http://jena.apache.org/text#> .
>> @prefix mms:     <http://rdf.cdisc.org/mms#> .
>> @prefix sdtms:   <http://rdf.cdisc.org/sdtm-1-2/schema#> .
>> @prefix sdtmigs: <http://rdf.cdisc.org/sdtmig-3-1-2/schema#> .
>>
>> ## Example of a TDB dataset and text index
>> ## Initialize TDB
>> [] ja:loadClass "com.hp.hpl.jena.tdb.TDB" .
>> tdb:DatasetTDB  rdfs:subClassOf  ja:RDFDataset .
>> tdb:GraphTDB    rdfs:subClassOf  ja:Model .
>>
>> ## Initialize text query
>> [] ja:loadClass       "org.apache.jena.query.text.TextQuery" .
>> # A TextDataset is a regular dataset with a text index.
>> text:TextDataset      rdfs:subClassOf   ja:RDFDataset .
>> # Lucene index
>> text:TextIndexLucene  rdfs:subClassOf   text:TextIndex .
>>
>> ## ---------------------------------------------------------------
>> ## This URI must be fixed - it's used to assemble the text dataset.
>>
>> :text_dataset rdf:type     text:TextDataset ;
>>      text:dataset   <#dataset> ;
>>      text:index     <#indexLucene> ;
>>      .
>>
>> # A TDB dataset used for RDF storage
>> <#dataset> rdf:type      tdb:DatasetTDB ;
>>      tdb:location "tdb" ;
>>      .
>>
>> # Text index description
>> <#indexLucene> a text:TextIndexLucene ;
>>      text:directory <file:luceneIndexes> ;
>>      text:entityMap <#entMap> ;
>>      .
>>
>> # Mapping in the index
>> # URI stored in field "uri"
>> # rdfs:label is mapped to field "text"
>> <#entMap> a text:EntityMap ;
>>      text:entityField      "uri" ;
>>      text:defaultField     "text" ;
>>      text:map (
>>           [ text:field "text" ; text:predicate mms:dataElementName ]
>>   [ text:field "text" ; text:predicate mms:dataElementDescription ]
>>   [ text:field "text" ; text:predicate mms:dataElementType ]
>>   [ text:field "text" ; text:predicate mms:dataElementLabel ]
>>   [ text:field "text" ; text:predicate mms:broader ]
>>   [ text:field "text" ; text:predicate mms:ordinal ]
>>   [ text:field "text" ; text:predicate sdtms:dataElementCompliance ]
>>   [ text:field "text" ; text:predicate sdtms:dataElementType ]
>>   [ text:field "text" ; text:predicate sdtms:dataElementRole ]
>>   [ text:field "text" ; text:predicate sdtmigs:references ]
>>           ) .
>>
>> *Any advice on what might be going wrong?*
>>
>


Re: jena.textindexer error

Posted by Brad Moran <bm...@pinnacle21.net>.
Where exactly? As far as I see there is no '{' in the file, am I missing
one?


On Mon, Aug 19, 2013 at 3:45 PM, Brad Moran <bm...@pinnacle21.net> wrote:

> *Hi,*
> *tried running jena.textindexer from bash like:*
>
> java -cp jena-2.10.2/jena-fuseki-0.2.8-SNAPSHOT/fuseki-server.jar
> jena.textindexer --desc=NetBeansProjects/mdr-older/trunk/data.ttl
>
> *But i am receiving this error:*
>
> ERROR [line: 1, col: 1 ] Not implemented
> com.hp.hpl.jena.sparql.ARQException: Failed reading assembler description:
> [line: 1, col: 1 ] Not implemented
>  at
> com.hp.hpl.jena.sparql.core.assembler.AssemblerUtils.build(AssemblerUtils.java:87)
> at
> org.apache.jena.query.text.TextDatasetFactory.create(TextDatasetFactory.java:38)
>  at jena.textindexer.processModulesAndArgs(textindexer.java:89)
> at arq.cmdline.CmdArgModule.process(CmdArgModule.java:51)
>  at arq.cmdline.CmdMain.mainMethod(CmdMain.java:100)
> at arq.cmdline.CmdMain.mainRun(CmdMain.java:63)
> at arq.cmdline.CmdMain.mainRun(CmdMain.java:50)
>  at jena.textindexer.main(textindexer.java:55)
>
> *The problem seems to be with my assembler file:*
> *
> *
> @prefix :        <http://localhost/jena_example/#> .
> @prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
> @prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
> @prefix tdb:     <http://jena.hpl.hp.com/2008/tdb#> .
> @prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .
> @prefix text:    <http://jena.apache.org/text#> .
> @prefix mms:     <http://rdf.cdisc.org/mms#> .
> @prefix sdtms:   <http://rdf.cdisc.org/sdtm-1-2/schema#> .
> @prefix sdtmigs: <http://rdf.cdisc.org/sdtmig-3-1-2/schema#> .
>
> ## Example of a TDB dataset and text index
> ## Initialize TDB
> [] ja:loadClass "com.hp.hpl.jena.tdb.TDB" .
> tdb:DatasetTDB  rdfs:subClassOf  ja:RDFDataset .
> tdb:GraphTDB    rdfs:subClassOf  ja:Model .
>
> ## Initialize text query
> [] ja:loadClass       "org.apache.jena.query.text.TextQuery" .
> # A TextDataset is a regular dataset with a text index.
> text:TextDataset      rdfs:subClassOf   ja:RDFDataset .
> # Lucene index
> text:TextIndexLucene  rdfs:subClassOf   text:TextIndex .
>
> ## ---------------------------------------------------------------
> ## This URI must be fixed - it's used to assemble the text dataset.
>
> :text_dataset rdf:type     text:TextDataset ;
>     text:dataset   <#dataset> ;
>     text:index     <#indexLucene> ;
>     .
>
> # A TDB dataset used for RDF storage
> <#dataset> rdf:type      tdb:DatasetTDB ;
>     tdb:location "tdb" ;
>     .
>
> # Text index description
> <#indexLucene> a text:TextIndexLucene ;
>     text:directory <file:luceneIndexes> ;
>     text:entityMap <#entMap> ;
>     .
>
> # Mapping in the index
> # URI stored in field "uri"
> # rdfs:label is mapped to field "text"
> <#entMap> a text:EntityMap ;
>     text:entityField      "uri" ;
>     text:defaultField     "text" ;
>     text:map (
>          [ text:field "text" ; text:predicate mms:dataElementName ]
>  [ text:field "text" ; text:predicate mms:dataElementDescription ]
>  [ text:field "text" ; text:predicate mms:dataElementType ]
>  [ text:field "text" ; text:predicate mms:dataElementLabel ]
>  [ text:field "text" ; text:predicate mms:broader ]
>  [ text:field "text" ; text:predicate mms:ordinal ]
>  [ text:field "text" ; text:predicate sdtms:dataElementCompliance ]
>  [ text:field "text" ; text:predicate sdtms:dataElementType ]
>  [ text:field "text" ; text:predicate sdtms:dataElementRole ]
>  [ text:field "text" ; text:predicate sdtmigs:references ]
>          ) .
>
> *Any advice on what might be going wrong?*
>

Re: jena.textindexer error

Posted by Andy Seaborne <an...@apache.org>.
There is a "{" on the first line, first column of the assembler file.

That's a graph literals / N3 formula which is not supported by the 
Turtle reader.

(the file you provided works for me)

	Andy

On 19/08/13 20:45, Brad Moran wrote:
> *Hi,*
> *tried running jena.textindexer from bash like:*
>
> java -cp jena-2.10.2/jena-fuseki-0.2.8-SNAPSHOT/fuseki-server.jar
> jena.textindexer --desc=NetBeansProjects/mdr-older/trunk/data.ttl
>
> *But i am receiving this error:*
>
> ERROR [line: 1, col: 1 ] Not implemented
> com.hp.hpl.jena.sparql.ARQException: Failed reading assembler description:
> [line: 1, col: 1 ] Not implemented
> at
> com.hp.hpl.jena.sparql.core.assembler.AssemblerUtils.build(AssemblerUtils.java:87)
> at
> org.apache.jena.query.text.TextDatasetFactory.create(TextDatasetFactory.java:38)
> at jena.textindexer.processModulesAndArgs(textindexer.java:89)
> at arq.cmdline.CmdArgModule.process(CmdArgModule.java:51)
> at arq.cmdline.CmdMain.mainMethod(CmdMain.java:100)
> at arq.cmdline.CmdMain.mainRun(CmdMain.java:63)
> at arq.cmdline.CmdMain.mainRun(CmdMain.java:50)
> at jena.textindexer.main(textindexer.java:55)
>
> *The problem seems to be with my assembler file:*
> *
> *
> @prefix :        <http://localhost/jena_example/#> .
> @prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
> @prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
> @prefix tdb:     <http://jena.hpl.hp.com/2008/tdb#> .
> @prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .
> @prefix text:    <http://jena.apache.org/text#> .
> @prefix mms:     <http://rdf.cdisc.org/mms#> .
> @prefix sdtms:   <http://rdf.cdisc.org/sdtm-1-2/schema#> .
> @prefix sdtmigs: <http://rdf.cdisc.org/sdtmig-3-1-2/schema#> .
>
> ## Example of a TDB dataset and text index
> ## Initialize TDB
> [] ja:loadClass "com.hp.hpl.jena.tdb.TDB" .
> tdb:DatasetTDB  rdfs:subClassOf  ja:RDFDataset .
> tdb:GraphTDB    rdfs:subClassOf  ja:Model .
>
> ## Initialize text query
> [] ja:loadClass       "org.apache.jena.query.text.TextQuery" .
> # A TextDataset is a regular dataset with a text index.
> text:TextDataset      rdfs:subClassOf   ja:RDFDataset .
> # Lucene index
> text:TextIndexLucene  rdfs:subClassOf   text:TextIndex .
>
> ## ---------------------------------------------------------------
> ## This URI must be fixed - it's used to assemble the text dataset.
>
> :text_dataset rdf:type     text:TextDataset ;
>      text:dataset   <#dataset> ;
>      text:index     <#indexLucene> ;
>      .
>
> # A TDB dataset used for RDF storage
> <#dataset> rdf:type      tdb:DatasetTDB ;
>      tdb:location "tdb" ;
>      .
>
> # Text index description
> <#indexLucene> a text:TextIndexLucene ;
>      text:directory <file:luceneIndexes> ;
>      text:entityMap <#entMap> ;
>      .
>
> # Mapping in the index
> # URI stored in field "uri"
> # rdfs:label is mapped to field "text"
> <#entMap> a text:EntityMap ;
>      text:entityField      "uri" ;
>      text:defaultField     "text" ;
>      text:map (
>           [ text:field "text" ; text:predicate mms:dataElementName ]
>   [ text:field "text" ; text:predicate mms:dataElementDescription ]
>   [ text:field "text" ; text:predicate mms:dataElementType ]
>   [ text:field "text" ; text:predicate mms:dataElementLabel ]
>   [ text:field "text" ; text:predicate mms:broader ]
>   [ text:field "text" ; text:predicate mms:ordinal ]
>   [ text:field "text" ; text:predicate sdtms:dataElementCompliance ]
>   [ text:field "text" ; text:predicate sdtms:dataElementType ]
>   [ text:field "text" ; text:predicate sdtms:dataElementRole ]
>   [ text:field "text" ; text:predicate sdtmigs:references ]
>           ) .
>
> *Any advice on what might be going wrong?*
>