You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by neha gupta <ne...@gmail.com> on 2016/09/27 20:59:04 UTC

Typed value Exception

 int l = soln.getLiteral("goals").getInt() ;

"goals"  contain integer value but it gives me exception:

Error converting typed value to a number.

Re: Typed value Exception

Posted by Chris Dollin <ch...@epimorphics.com>.
On 28/09/16 12:58, neha gupta wrote:
> Here is the code, I have typed it so might have some mistakes.

Don't retype it. Any mistakes you make will confuse us -- we need
to see what you did. not something like it. Use cut-and-paste.

(Also send /complete/ examples, so that we can easily cut-and-paste
into our editors and check the code.)

> OntModel model=ModelFactory.createOntologyModel();
> InputStream in =FileManager.get().open("D://ont/soccer.owl");
>              if (in==null) {
>                  throw new IllegalArgumentException( "File: " +  " not there");
>              }           model.read(in,"");
>               String
> ns="http://www.semanticweb.org/neha/ontologies/2016/6/untitled-ontology-11#";
>
>                OntClass team = model.getOntClass(ns + "Team");
> OntProperty goals=model.getOntProperty(ns+ "Goals");
> OntProperty wins=model.getOntProperty(ns+ "Wins");
>
> //Goals and Wins are entered by admin, so I want to sum the newly entered
> //goals with previous stored in ontology.
> //This is why I need integer values from these properties.

You haven't shown us the data. Print the model out:

     model.write(System.out, "TTL");

This will display it in Turtle notation, which is often easier
to read than XML.

> SELECT  *" +
>                  " WHERE {  ?x rdf:type  ont:Team . ?x ont:Goals  ?goal . ?x
> ont:Wins ?wins}  filter(?goal>10 && ?wins<?goal )  ";
> //the query also gives error , not recognizing Filter.

Filters go inside the braces, not outside.

If the query gives an error, you're not going to get results
from the rest of your code.

> Query query = QueryFactory.create(queryString) ;
>                   QueryExecution qexec = QueryExecutionFactory.create(query, model);
>                   ResultSet results = qexec.execSelect() ;
>                   while(results.hasNext()){
>                        QuerySolution soln = results.nextSolution() ;
>   int lit = soln.getLiteral("goal").getInt() ;
> int lit2=soln.getLiteral("wins").getInt() ;
> System.out.println("goals"+lit);
>
> Inline image 2

No image here. I expect the attachment has been stripped.

Chris

>
>
>
>
> On Wed, Sep 28, 2016 at 4:28 AM, Chris Dollin <chris.dollin@epimorphics.com
> <ma...@epimorphics.com>> wrote:
>
>     On 28/09/16 12:15, neha gupta wrote:
>
>         I just want to get the integer value from data property "Goals".
>
>
>     I know. You said that. But you have ignored my suggestion.
>
>         //Goals is already a data property in my owl file and it has integer value.
>
>
>     How do you know? Show us the data. Show us the code. Show us what
>     soln.getLiteral("goals") is. Maybe it isn't the integer you think it
>     is.
>
>         OntProperty goals=model.getOntProperty(ns+ "Goals");
>
>         How can I get this integer value for future arithmetic operations.
>
>         On Wed, Sep 28, 2016 at 12:11 AM, Chris Dollin
>         <chris.dollin@epimorphics.com <ma...@epimorphics.com>
>
>             wrote:
>
>
>             On 27/09/16 21:59, neha gupta wrote:
>
>                     int l = soln.getLiteral("goals").getInt() ;
>
>                 "goals"  contain integer value but it gives me exception:
>
>                 Error converting typed value to a number.
>
>
>             Print soln.getLiteral("goals") so that we can see the lexical
>             form and type of the literal. Note that spaces are not permitted
>             in integer lexical forms -- make sure there's no extra spaces
>             in your print.
>
>
>             Chris
>
>             --
>             "Always a BOM tomorrow."                                     Unsaid
>             /Babylon 5/
>
>             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)
>
>
>
>     --
>     "A facility for quotation covers the absence of original thought."/Gaudy Night/
>
>
>     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)
>
>

-- 
"If I were you, I would go to the crackpots."           /They Shall Have Stars/

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: Typed value Exception

Posted by Chris Dollin <ch...@epimorphics.com>.
On 28/09/16 16:14, neha gupta wrote:

> This does not show any result: (No error but empty output console)

What is "this"? The
>
> int l = soln.getLiteral("score").getInt() ;
>

Or the whole loop? Maybe there are no solutions and
so you won't see any outputs.

You still have not shown us your data.

We're having to guess what code you are using. You haven't shown
us the result of printing soln.getLiteral("score").

It's very hard to help if you won't answer the questions
we've asked you.

(This is true for more than SPARQL questions.)

Chris

> However, same query runs when I write:
>  ResultSetFormatter.out(System.out, results, query);
>
> On Wed, Sep 28, 2016 at 7:24 AM, Lorenz Buehmann <
> buehmann@informatik.uni-leipzig.de> wrote:
>
>> This is weird. If the query is wrong like you showed here, how can you
>> get a parse exception?! And as Chris said,
>>
>> PRINT THE VALUE OF soln.getLiteral("goals") by Java and show us the output.
>>
>>
>> On 28.09.2016 13:58, neha gupta wrote:
>>> Here is the code, I have typed it so might have some mistakes.
>>>
>>>
>>> OntModel model=ModelFactory.createOntologyModel();
>>> InputStream in =FileManager.get().open("D://ont/soccer.owl");
>>>             if (in==null) {
>>>                 throw new IllegalArgumentException( "File: " +  " not
>>> there");
>>>             }           model.read(in,"");
>>>              String
>>> ns="http://www.semanticweb.org/neha/ontologies/2016/6/
>> untitled-ontology-11#";
>>>
>>>               OntClass team = model.getOntClass(ns + "Team");
>>> OntProperty goals=model.getOntProperty(ns+ "Goals");
>>> OntProperty wins=model.getOntProperty(ns+ "Wins");
>>>
>>> //Goals and Wins are entered by admin, so I want to sum the newly
>>> entered //goals with previous stored in ontology.
>>> //This is why I need integer values from these properties.
>>>
>>> SELECT  *" +
>>>                 " WHERE {  ?x rdf:type  ont:Team . ?x ont:Goals  ?goal
>>> . ?x ont:Wins ?wins}  filter(?goal>10 && ?wins<?goal )  ";
>>> //the query also gives error , not recognizing Filter.
>>>
>>> Query query = QueryFactory.create(queryString) ;
>>>                  QueryExecution qexec =
>>> QueryExecutionFactory.create(query, model);
>>>                  ResultSet results = qexec.execSelect() ;
>>>                  while(results.hasNext()){
>>>                       QuerySolution soln = results.nextSolution() ;
>>>  int lit = soln.getLiteral("goal").getInt() ;
>>> int lit2=soln.getLiteral("wins").getInt() ;
>>> System.out.println("goals"+lit);
>>>
>>> Inline image 2
>>>
>>>
>>>
>>>
>>> On Wed, Sep 28, 2016 at 4:28 AM, Chris Dollin
>>> <chris.dollin@epimorphics.com <ma...@epimorphics.com>>
>>> wrote:
>>>
>>>     On 28/09/16 12:15, neha gupta wrote:
>>>
>>>         I just want to get the integer value from data property "Goals".
>>>
>>>
>>>     I know. You said that. But you have ignored my suggestion.
>>>
>>>         //Goals is already a data property in my owl file and it has
>>>         integer value.
>>>
>>>
>>>     How do you know? Show us the data. Show us the code. Show us what
>>>     soln.getLiteral("goals") is. Maybe it isn't the integer you think it
>>>     is.
>>>
>>>         OntProperty goals=model.getOntProperty(ns+ "Goals");
>>>
>>>         How can I get this integer value for future arithmetic
>> operations.
>>>
>>>         On Wed, Sep 28, 2016 at 12:11 AM, Chris Dollin
>>>         <chris.dollin@epimorphics.com
>>>         <ma...@epimorphics.com>
>>>
>>>             wrote:
>>>
>>>
>>>             On 27/09/16 21:59, neha gupta wrote:
>>>
>>>                    int l = soln.getLiteral("goals").getInt() ;
>>>
>>>                 "goals"  contain integer value but it gives me exception:
>>>
>>>                 Error converting typed value to a number.
>>>
>>>
>>>             Print soln.getLiteral("goals") so that we can see the lexical
>>>             form and type of the literal. Note that spaces are not
>>>             permitted
>>>             in integer lexical forms -- make sure there's no extra spaces
>>>             in your print.
>>>
>>>
>>>             Chris
>>>
>>>             --
>>>             "Always a BOM tomorrow."
>>>                Unsaid
>>>             /Babylon 5/
>>>
>>>             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)
>>>
>>>
>>>
>>>     --
>>>     "A facility for quotation covers the absence of original
>>>     thought."/Gaudy Night/
>>>
>>>
>>>     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: Typed value Exception

Posted by neha gupta <ne...@gmail.com>.
This does not show any result: (No error but empty output console)

int l = soln.getLiteral("score").getInt() ;

However, same query runs when I write:
 ResultSetFormatter.out(System.out, results, query);

On Wed, Sep 28, 2016 at 7:24 AM, Lorenz Buehmann <
buehmann@informatik.uni-leipzig.de> wrote:

> This is weird. If the query is wrong like you showed here, how can you
> get a parse exception?! And as Chris said,
>
> PRINT THE VALUE OF soln.getLiteral("goals") by Java and show us the output.
>
>
> On 28.09.2016 13:58, neha gupta wrote:
> > Here is the code, I have typed it so might have some mistakes.
> >
> >
> > OntModel model=ModelFactory.createOntologyModel();
> > InputStream in =FileManager.get().open("D://ont/soccer.owl");
> >             if (in==null) {
> >                 throw new IllegalArgumentException( "File: " +  " not
> > there");
> >             }           model.read(in,"");
> >              String
> > ns="http://www.semanticweb.org/neha/ontologies/2016/6/
> untitled-ontology-11#";
> >
> >               OntClass team = model.getOntClass(ns + "Team");
> > OntProperty goals=model.getOntProperty(ns+ "Goals");
> > OntProperty wins=model.getOntProperty(ns+ "Wins");
> >
> > //Goals and Wins are entered by admin, so I want to sum the newly
> > entered //goals with previous stored in ontology.
> > //This is why I need integer values from these properties.
> >
> > SELECT  *" +
> >                 " WHERE {  ?x rdf:type  ont:Team . ?x ont:Goals  ?goal
> > . ?x ont:Wins ?wins}  filter(?goal>10 && ?wins<?goal )  ";
> > //the query also gives error , not recognizing Filter.
> >
> > Query query = QueryFactory.create(queryString) ;
> >                  QueryExecution qexec =
> > QueryExecutionFactory.create(query, model);
> >                  ResultSet results = qexec.execSelect() ;
> >                  while(results.hasNext()){
> >                       QuerySolution soln = results.nextSolution() ;
> >  int lit = soln.getLiteral("goal").getInt() ;
> > int lit2=soln.getLiteral("wins").getInt() ;
> > System.out.println("goals"+lit);
> >
> > Inline image 2
> >
> >
> >
> >
> > On Wed, Sep 28, 2016 at 4:28 AM, Chris Dollin
> > <chris.dollin@epimorphics.com <ma...@epimorphics.com>>
> > wrote:
> >
> >     On 28/09/16 12:15, neha gupta wrote:
> >
> >         I just want to get the integer value from data property "Goals".
> >
> >
> >     I know. You said that. But you have ignored my suggestion.
> >
> >         //Goals is already a data property in my owl file and it has
> >         integer value.
> >
> >
> >     How do you know? Show us the data. Show us the code. Show us what
> >     soln.getLiteral("goals") is. Maybe it isn't the integer you think it
> >     is.
> >
> >         OntProperty goals=model.getOntProperty(ns+ "Goals");
> >
> >         How can I get this integer value for future arithmetic
> operations.
> >
> >         On Wed, Sep 28, 2016 at 12:11 AM, Chris Dollin
> >         <chris.dollin@epimorphics.com
> >         <ma...@epimorphics.com>
> >
> >             wrote:
> >
> >
> >             On 27/09/16 21:59, neha gupta wrote:
> >
> >                    int l = soln.getLiteral("goals").getInt() ;
> >
> >                 "goals"  contain integer value but it gives me exception:
> >
> >                 Error converting typed value to a number.
> >
> >
> >             Print soln.getLiteral("goals") so that we can see the lexical
> >             form and type of the literal. Note that spaces are not
> >             permitted
> >             in integer lexical forms -- make sure there's no extra spaces
> >             in your print.
> >
> >
> >             Chris
> >
> >             --
> >             "Always a BOM tomorrow."
> >                Unsaid
> >             /Babylon 5/
> >
> >             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)
> >
> >
> >
> >     --
> >     "A facility for quotation covers the absence of original
> >     thought."/Gaudy Night/
> >
> >
> >     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: Typed value Exception

Posted by Lorenz Buehmann <bu...@informatik.uni-leipzig.de>.
This is weird. If the query is wrong like you showed here, how can you
get a parse exception?! And as Chris said,

PRINT THE VALUE OF soln.getLiteral("goals") by Java and show us the output.


On 28.09.2016 13:58, neha gupta wrote:
> Here is the code, I have typed it so might have some mistakes.
>
>
> OntModel model=ModelFactory.createOntologyModel();
> InputStream in =FileManager.get().open("D://ont/soccer.owl");
>             if (in==null) {
>                 throw new IllegalArgumentException( "File: " +  " not
> there");
>             }           model.read(in,"");
>              String
> ns="http://www.semanticweb.org/neha/ontologies/2016/6/untitled-ontology-11#";
>
>               OntClass team = model.getOntClass(ns + "Team");
> OntProperty goals=model.getOntProperty(ns+ "Goals");
> OntProperty wins=model.getOntProperty(ns+ "Wins");
>
> //Goals and Wins are entered by admin, so I want to sum the newly
> entered //goals with previous stored in ontology.
> //This is why I need integer values from these properties.
>
> SELECT  *" +
>                 " WHERE {  ?x rdf:type  ont:Team . ?x ont:Goals  ?goal
> . ?x ont:Wins ?wins}  filter(?goal>10 && ?wins<?goal )  ";
> //the query also gives error , not recognizing Filter.
>
> Query query = QueryFactory.create(queryString) ;
>                  QueryExecution qexec =
> QueryExecutionFactory.create(query, model);
>                  ResultSet results = qexec.execSelect() ;
>                  while(results.hasNext()){
>                       QuerySolution soln = results.nextSolution() ;
>  int lit = soln.getLiteral("goal").getInt() ;
> int lit2=soln.getLiteral("wins").getInt() ;
> System.out.println("goals"+lit);
>
> Inline image 2
>
>
>
>
> On Wed, Sep 28, 2016 at 4:28 AM, Chris Dollin
> <chris.dollin@epimorphics.com <ma...@epimorphics.com>>
> wrote:
>
>     On 28/09/16 12:15, neha gupta wrote:
>
>         I just want to get the integer value from data property "Goals".
>
>
>     I know. You said that. But you have ignored my suggestion.
>
>         //Goals is already a data property in my owl file and it has
>         integer value.
>
>
>     How do you know? Show us the data. Show us the code. Show us what
>     soln.getLiteral("goals") is. Maybe it isn't the integer you think it
>     is.
>
>         OntProperty goals=model.getOntProperty(ns+ "Goals");
>
>         How can I get this integer value for future arithmetic operations.
>
>         On Wed, Sep 28, 2016 at 12:11 AM, Chris Dollin
>         <chris.dollin@epimorphics.com
>         <ma...@epimorphics.com>
>
>             wrote:
>
>
>             On 27/09/16 21:59, neha gupta wrote:
>
>                    int l = soln.getLiteral("goals").getInt() ;
>
>                 "goals"  contain integer value but it gives me exception:
>
>                 Error converting typed value to a number.
>
>
>             Print soln.getLiteral("goals") so that we can see the lexical
>             form and type of the literal. Note that spaces are not
>             permitted
>             in integer lexical forms -- make sure there's no extra spaces
>             in your print.
>
>
>             Chris
>
>             --
>             "Always a BOM tomorrow."                                 
>                Unsaid
>             /Babylon 5/
>
>             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)
>
>
>
>     -- 
>     "A facility for quotation covers the absence of original
>     thought."/Gaudy Night/
>
>
>     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: Typed value Exception

Posted by neha gupta <ne...@gmail.com>.
Here is the code, I have typed it so might have some mistakes.


OntModel model=ModelFactory.createOntologyModel();
InputStream in =FileManager.get().open("D://ont/soccer.owl");
            if (in==null) {
                throw new IllegalArgumentException( "File: " +  " not
there");
            }           model.read(in,"");
             String ns="
http://www.semanticweb.org/neha/ontologies/2016/6/untitled-ontology-11#";

              OntClass team = model.getOntClass(ns + "Team");
OntProperty goals=model.getOntProperty(ns+ "Goals");
OntProperty wins=model.getOntProperty(ns+ "Wins");

//Goals and Wins are entered by admin, so I want to sum the newly entered
//goals with previous stored in ontology.
//This is why I need integer values from these properties.

SELECT  *" +
                " WHERE {  ?x rdf:type  ont:Team . ?x ont:Goals  ?goal . ?x
ont:Wins ?wins}  filter(?goal>10 && ?wins<?goal )  ";
//the query also gives error , not recognizing Filter.

Query query = QueryFactory.create(queryString) ;
                 QueryExecution qexec = QueryExecutionFactory.create(query,
model);
                 ResultSet results = qexec.execSelect() ;
                 while(results.hasNext()){
                      QuerySolution soln = results.nextSolution() ;
 int lit = soln.getLiteral("goal").getInt() ;
int lit2=soln.getLiteral("wins").getInt() ;
System.out.println("goals"+lit);

[image: Inline image 2]




On Wed, Sep 28, 2016 at 4:28 AM, Chris Dollin <ch...@epimorphics.com>
wrote:

> On 28/09/16 12:15, neha gupta wrote:
>
>> I just want to get the integer value from data property "Goals".
>>
>
> I know. You said that. But you have ignored my suggestion.
>
> //Goals is already a data property in my owl file and it has integer value.
>>
>
> How do you know? Show us the data. Show us the code. Show us what
> soln.getLiteral("goals") is. Maybe it isn't the integer you think it
> is.
>
> OntProperty goals=model.getOntProperty(ns+ "Goals");
>>
>> How can I get this integer value for future arithmetic operations.
>>
>> On Wed, Sep 28, 2016 at 12:11 AM, Chris Dollin <
>> chris.dollin@epimorphics.com
>>
>>> wrote:
>>>
>>
>> On 27/09/16 21:59, neha gupta wrote:
>>>
>>>    int l = soln.getLiteral("goals").getInt() ;
>>>>
>>>> "goals"  contain integer value but it gives me exception:
>>>>
>>>> Error converting typed value to a number.
>>>>
>>>>
>>> Print soln.getLiteral("goals") so that we can see the lexical
>>> form and type of the literal. Note that spaces are not permitted
>>> in integer lexical forms -- make sure there's no extra spaces
>>> in your print.
>>>
>>>
>>> Chris
>>>
>>> --
>>> "Always a BOM tomorrow."                                     Unsaid
>>> /Babylon 5/
>>>
>>> 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)
>>>
>>>
>>
> --
> "A facility for quotation covers the absence of original thought."/Gaudy
> Night/
>
>
> 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: Typed value Exception

Posted by Chris Dollin <ch...@epimorphics.com>.
On 28/09/16 12:15, neha gupta wrote:
> I just want to get the integer value from data property "Goals".

I know. You said that. But you have ignored my suggestion.

> //Goals is already a data property in my owl file and it has integer value.

How do you know? Show us the data. Show us the code. Show us what
soln.getLiteral("goals") is. Maybe it isn't the integer you think it
is.

> OntProperty goals=model.getOntProperty(ns+ "Goals");
>
> How can I get this integer value for future arithmetic operations.
>
> On Wed, Sep 28, 2016 at 12:11 AM, Chris Dollin <chris.dollin@epimorphics.com
>> wrote:
>
>> On 27/09/16 21:59, neha gupta wrote:
>>
>>>    int l = soln.getLiteral("goals").getInt() ;
>>>
>>> "goals"  contain integer value but it gives me exception:
>>>
>>> Error converting typed value to a number.
>>>
>>
>> Print soln.getLiteral("goals") so that we can see the lexical
>> form and type of the literal. Note that spaces are not permitted
>> in integer lexical forms -- make sure there's no extra spaces
>> in your print.
>>
>>
>> Chris
>>
>> --
>> "Always a BOM tomorrow."                                     Unsaid
>> /Babylon 5/
>>
>> 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)
>>
>

-- 
"A facility for quotation covers the absence of original thought."/Gaudy Night/

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: Typed value Exception

Posted by neha gupta <ne...@gmail.com>.
I just want to get the integer value from data property "Goals".


//Goals is already a data property in my owl file and it has integer value.
OntProperty goals=model.getOntProperty(ns+ "Goals");

How can I get this integer value for future arithmetic operations.

On Wed, Sep 28, 2016 at 12:11 AM, Chris Dollin <chris.dollin@epimorphics.com
> wrote:

> On 27/09/16 21:59, neha gupta wrote:
>
>>   int l = soln.getLiteral("goals").getInt() ;
>>
>> "goals"  contain integer value but it gives me exception:
>>
>> Error converting typed value to a number.
>>
>
> Print soln.getLiteral("goals") so that we can see the lexical
> form and type of the literal. Note that spaces are not permitted
> in integer lexical forms -- make sure there's no extra spaces
> in your print.
>
>
> Chris
>
> --
> "Always a BOM tomorrow."                                     Unsaid
> /Babylon 5/
>
> 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: Typed value Exception

Posted by Chris Dollin <ch...@epimorphics.com>.
On 27/09/16 21:59, neha gupta wrote:
>   int l = soln.getLiteral("goals").getInt() ;
>
> "goals"  contain integer value but it gives me exception:
>
> Error converting typed value to a number.

Print soln.getLiteral("goals") so that we can see the lexical
form and type of the literal. Note that spaces are not permitted
in integer lexical forms -- make sure there's no extra spaces
in your print.


Chris

-- 
"Always a BOM tomorrow."                                     Unsaid /Babylon 5/

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)