You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Paul Libbrecht <pa...@activemath.org> on 2003/01/24 11:48:52 UTC
NumberFormat exception when building iterator ?
Hi,
The following jelly snippet provides me a
java.lang.NumberFormatException but works... it's kind of weird, the
error sort of means that evaluateAsIterator of a StringTokenizer
actually requires to convert the string being tokenized into a double...
<j:set var="blop" value="the value of blop"/>
<util:tokenize var="blop-cut" delim=" ">${blop}</util:tokenize>
<j:forEach items="${blop-cut}" var="token">
<log:info>Found word "${token}"</log:info>
</j:forEach>
Paul
Re: NumberFormat exception when building iterator ?
Posted by di...@multitask.com.au.
It's because of the use of '-' in the variable names. Jexl doesn't like
it.
--
dIon Gillard, Multitask Consulting
Blog: http://www.freeroller.net/page/dion/Weblog
Work: http://www.multitask.com.au
Paul Libbrecht <pa...@activemath.org> wrote on 24/01/2003 09:48:52 PM:
>
> Hi,
>
> The following jelly snippet provides me a
> java.lang.NumberFormatException but works... it's kind of weird, the
> error sort of means that evaluateAsIterator of a StringTokenizer
> actually requires to convert the string being tokenized into a double...
>
> <j:set var="blop" value="the value of blop"/>
> <util:tokenize var="blop-cut" delim=" ">${blop}</util:tokenize>
> <j:forEach items="${blop-cut}" var="token">
> <log:info>Found word "${token}"</log:info>
> </j:forEach>
>
> Paul
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
> ForwardSourceID:NT000A79DE
[jelly] NumberFormat exception when building iterator ?
Posted by Paul Libbrecht <pa...@activemath.org>.
OK,
I guess we're all victim of email-clients auto-fills, I never filled
Jakarta list, I'll try to pay attention...
And here we are with the appropriate jelly header.
Paul
Le Vendredi, 24 janv 2003, à 13:58 Europe/Berlin, James Mitchell a
écrit :
>> The following jelly snippet provides me a
>> java.lang.NumberFormatException but works... it's kind of weird, the
>> error sort of means that evaluateAsIterator of a StringTokenizer
>> actually requires to convert the string being tokenized into
>> a double...
>>
>> <j:set var="blop" value="the value of blop"/>
>> <util:tokenize var="blop-cut" delim=" ">${blop}</util:tokenize>
>> <j:forEach items="${blop-cut}" var="token">
>> <log:info>Found word "${token}"</log:info>
>> </j:forEach>
>>
>> Paul
Re: [jelly][jexl] Re: NumberFormat exception when building iterator ?
Posted by Paul Libbrecht <pa...@activemath.org>.
Well the test case was there... but as someone (Martin Cooper, or Dion)
pointed out, the "-" in the variable name "blop-cut" mistook Jexl...
and that is perfectly understandable... it tries to convert blop (i.e.
the string "the value of blop") and cut (which is undefined) to numbers
so as to perform the minus operation. This is in-line with Java way of
acting...
Paul
Here's the case again (without expects... sorry... have never written a
jellyUnit yet):
<j:set var="blop" value="the value of blop"/>
<util:tokenize var="blop-cut" delim=" ">${blop}</util:tokenize>
<j:forEach items="${blop-cut}" var="token">
<log:info>Found word "${token}"</log:info>
</j:forEach>
Le Mardi, 28 janv 2003, à 14:39 Europe/Berlin, James Strachan a écrit :
> Is this still an issue for you? I can investigate further if you like.
> Providing a patch to a JellyUnit test case that demonstrates the issue
> would
> help enormously.
Re: [jelly][jexl] Re: NumberFormat exception when building iterator ?
Posted by James Strachan <ja...@yahoo.co.uk>.
Paul
Is this still an issue for you? I can investigate further if you like.
Providing a patch to a JellyUnit test case that demonstrates the issue would
help enormously.
James
-------
http://radio.weblogs.com/0112098/
----- Original Message -----
From: "Paul Libbrecht" <pa...@activemath.org>
To: "Jakarta Commons Users List" <co...@jakarta.apache.org>
Sent: Friday, January 24, 2003 1:10 PM
Subject: [jelly][jexl] Re: NumberFormat exception when building iterator ?
Noh, it was a jelly, or presumably jexl problem.
Paul
Le Vendredi, 24 janv 2003, à 14:05 Europe/Berlin, Henri Yandell a écrit
:
> I deleted the email :) Was it Lang-based or was that just an example?
>
>
> On Fri, 24 Jan 2003, James Mitchell wrote:
>
>> Do me a favor (or 2) , please.
>>
>> 1. Change your contact info for this list to "Jakarta
>> Commons User" instead of "Jakarta List". There are
>> many lists at "Jakarta" and my (and many others)
>> email client shows "Jakarta List"....it is quite
>> annoying since I am subscribed to about 8 "Jakarta
>> Lists".
>>
>> 2. When sending to commons, it is most polite to prefix
>> your message with tags (ie. [project]).
>>
>> So your you subject line might have been:
>>
>> RE: [Lang] NumberFormat exception when building iterator ?
>>
>>
>>
>>
>> --
>> James Mitchell
>> Software Engineer/Struts Evangelist
>> http://www.open-tools.org/
>>
>> "The man who does not read good books has no advantage over the man
>> who
>> cannot read them."
>> - Mark Twain (1835-1910)
>>
>>
>>
>>
>>
>>
>>
>>> -----Original Message-----
>>> From: Paul Libbrecht [mailto:paul@activemath.org]
>>> Sent: Friday, January 24, 2003 5:49 AM
>>> To: Jakarta List
>>> Subject: NumberFormat exception when building iterator ?
>>>
>>>
>>>
>>> Hi,
>>>
>>> The following jelly snippet provides me a
>>> java.lang.NumberFormatException but works... it's kind of weird, the
>>> error sort of means that evaluateAsIterator of a StringTokenizer
>>> actually requires to convert the string being tokenized into
>>> a double...
>>>
>>> <j:set var="blop" value="the value of blop"/>
>>> <util:tokenize var="blop-cut" delim=" ">${blop}</util:tokenize>
>>> <j:forEach items="${blop-cut}" var="token">
>>> <log:info>Found word "${token}"</log:info>
>>> </j:forEach>
>>>
>>> Paul
>>>
>>>
>>> --
>>> To unsubscribe, e-mail:
>>> <mailto:commons-user-> unsubscribe@jakarta.apache.org>
>>> For
>>> additional commands,
>>> e-mail: <ma...@jakarta.apache.org>
>>>
>>>
>>
>>
>> --
>> To unsubscribe, e-mail:
>> <ma...@jakarta.apache.org>
>> For additional commands, e-mail:
>> <ma...@jakarta.apache.org>
>>
>>
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
[jelly][jexl] Re: NumberFormat exception when building iterator ?
Posted by Paul Libbrecht <pa...@activemath.org>.
Noh, it was a jelly, or presumably jexl problem.
Paul
Le Vendredi, 24 janv 2003, à 14:05 Europe/Berlin, Henri Yandell a écrit
:
> I deleted the email :) Was it Lang-based or was that just an example?
>
>
> On Fri, 24 Jan 2003, James Mitchell wrote:
>
>> Do me a favor (or 2) , please.
>>
>> 1. Change your contact info for this list to "Jakarta
>> Commons User" instead of "Jakarta List". There are
>> many lists at "Jakarta" and my (and many others)
>> email client shows "Jakarta List"....it is quite
>> annoying since I am subscribed to about 8 "Jakarta
>> Lists".
>>
>> 2. When sending to commons, it is most polite to prefix
>> your message with tags (ie. [project]).
>>
>> So your you subject line might have been:
>>
>> RE: [Lang] NumberFormat exception when building iterator ?
>>
>>
>>
>>
>> --
>> James Mitchell
>> Software Engineer/Struts Evangelist
>> http://www.open-tools.org/
>>
>> "The man who does not read good books has no advantage over the man
>> who
>> cannot read them."
>> - Mark Twain (1835-1910)
>>
>>
>>
>>
>>
>>
>>
>>> -----Original Message-----
>>> From: Paul Libbrecht [mailto:paul@activemath.org]
>>> Sent: Friday, January 24, 2003 5:49 AM
>>> To: Jakarta List
>>> Subject: NumberFormat exception when building iterator ?
>>>
>>>
>>>
>>> Hi,
>>>
>>> The following jelly snippet provides me a
>>> java.lang.NumberFormatException but works... it's kind of weird, the
>>> error sort of means that evaluateAsIterator of a StringTokenizer
>>> actually requires to convert the string being tokenized into
>>> a double...
>>>
>>> <j:set var="blop" value="the value of blop"/>
>>> <util:tokenize var="blop-cut" delim=" ">${blop}</util:tokenize>
>>> <j:forEach items="${blop-cut}" var="token">
>>> <log:info>Found word "${token}"</log:info>
>>> </j:forEach>
>>>
>>> Paul
>>>
>>>
>>> --
>>> To unsubscribe, e-mail:
>>> <mailto:commons-user-> unsubscribe@jakarta.apache.org>
>>> For
>>> additional commands,
>>> e-mail: <ma...@jakarta.apache.org>
>>>
>>>
>>
>>
>> --
>> To unsubscribe, e-mail:
>> <ma...@jakarta.apache.org>
>> For additional commands, e-mail:
>> <ma...@jakarta.apache.org>
>>
>>
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
RE: NumberFormat exception when building iterator ?
Posted by James Mitchell <jm...@apache.org>.
I'm not sure. Guess I'm not familiar with that particular project.
--
James Mitchell
Software Engineer/Struts Evangelist
http://www.open-tools.org/
"The man who does not read good books has no advantage over the man who
cannot read them."
- Mark Twain (1835-1910)
> -----Original Message-----
> From: Henri Yandell [mailto:bayard@generationjava.com]
> Sent: Friday, January 24, 2003 8:06 AM
> To: Jakarta Commons Users List
> Subject: RE: NumberFormat exception when building iterator ?
>
>
>
> I deleted the email :) Was it Lang-based or was that just an example?
>
> Hen
>
> On Fri, 24 Jan 2003, James Mitchell wrote:
>
> > Do me a favor (or 2) , please.
> >
> > 1. Change your contact info for this list to "Jakarta
> > Commons User" instead of "Jakarta List". There are
> > many lists at "Jakarta" and my (and many others)
> > email client shows "Jakarta List"....it is quite
> > annoying since I am subscribed to about 8 "Jakarta
> > Lists".
> >
> > 2. When sending to commons, it is most polite to prefix
> > your message with tags (ie. [project]).
> >
> > So your you subject line might have been:
> >
> > RE: [Lang] NumberFormat exception when building iterator ?
> >
> >
> >
> >
> > --
> > James Mitchell
> > Software Engineer/Struts Evangelist
> > http://www.open-tools.org/
> >
> > "The man who does not read good books has no advantage over
> the man who
> > cannot read them."
> > - Mark Twain (1835-1910)
> >
> >
> >
> >
> >
> >
> >
> > > -----Original Message-----
> > > From: Paul Libbrecht [mailto:paul@activemath.org]
> > > Sent: Friday, January 24, 2003 5:49 AM
> > > To: Jakarta List
> > > Subject: NumberFormat exception when building iterator ?
> > >
> > >
> > >
> > > Hi,
> > >
> > > The following jelly snippet provides me a
> > > java.lang.NumberFormatException but works... it's kind of
> weird, the
> > > error sort of means that evaluateAsIterator of a StringTokenizer
> > > actually requires to convert the string being tokenized into
> > > a double...
> > >
> > > <j:set var="blop" value="the value of blop"/>
> > > <util:tokenize var="blop-cut" delim=" ">${blop}</util:tokenize>
> > > <j:forEach items="${blop-cut}" var="token">
> > > <log:info>Found word "${token}"</log:info>
> > > </j:forEach>
> > >
> > > Paul
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > > <mailto:commons-user-> unsubscribe@jakarta.apache.org>
> > > For
> > > additional commands,
> > > e-mail: <ma...@jakarta.apache.org>
> > >
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:commons-user-> unsubscribe@jakarta.apache.org>
> > For
> additional commands,
> e-mail: <ma...@jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
> <mailto:commons-user-> unsubscribe@jakarta.apache.org>
> For
> additional commands,
> e-mail: <ma...@jakarta.apache.org>
>
>
RE: NumberFormat exception when building iterator ?
Posted by Henri Yandell <ba...@generationjava.com>.
I deleted the email :) Was it Lang-based or was that just an example?
Hen
On Fri, 24 Jan 2003, James Mitchell wrote:
> Do me a favor (or 2) , please.
>
> 1. Change your contact info for this list to "Jakarta
> Commons User" instead of "Jakarta List". There are
> many lists at "Jakarta" and my (and many others)
> email client shows "Jakarta List"....it is quite
> annoying since I am subscribed to about 8 "Jakarta
> Lists".
>
> 2. When sending to commons, it is most polite to prefix
> your message with tags (ie. [project]).
>
> So your you subject line might have been:
>
> RE: [Lang] NumberFormat exception when building iterator ?
>
>
>
>
> --
> James Mitchell
> Software Engineer/Struts Evangelist
> http://www.open-tools.org/
>
> "The man who does not read good books has no advantage over the man who
> cannot read them."
> - Mark Twain (1835-1910)
>
>
>
>
>
>
>
> > -----Original Message-----
> > From: Paul Libbrecht [mailto:paul@activemath.org]
> > Sent: Friday, January 24, 2003 5:49 AM
> > To: Jakarta List
> > Subject: NumberFormat exception when building iterator ?
> >
> >
> >
> > Hi,
> >
> > The following jelly snippet provides me a
> > java.lang.NumberFormatException but works... it's kind of weird, the
> > error sort of means that evaluateAsIterator of a StringTokenizer
> > actually requires to convert the string being tokenized into
> > a double...
> >
> > <j:set var="blop" value="the value of blop"/>
> > <util:tokenize var="blop-cut" delim=" ">${blop}</util:tokenize>
> > <j:forEach items="${blop-cut}" var="token">
> > <log:info>Found word "${token}"</log:info>
> > </j:forEach>
> >
> > Paul
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:commons-user-> unsubscribe@jakarta.apache.org>
> > For
> > additional commands,
> > e-mail: <ma...@jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
RE: NumberFormat exception when building iterator ?
Posted by James Mitchell <jm...@apache.org>.
Do me a favor (or 2) , please.
1. Change your contact info for this list to "Jakarta
Commons User" instead of "Jakarta List". There are
many lists at "Jakarta" and my (and many others)
email client shows "Jakarta List"....it is quite
annoying since I am subscribed to about 8 "Jakarta
Lists".
2. When sending to commons, it is most polite to prefix
your message with tags (ie. [project]).
So your you subject line might have been:
RE: [Lang] NumberFormat exception when building iterator ?
--
James Mitchell
Software Engineer/Struts Evangelist
http://www.open-tools.org/
"The man who does not read good books has no advantage over the man who
cannot read them."
- Mark Twain (1835-1910)
> -----Original Message-----
> From: Paul Libbrecht [mailto:paul@activemath.org]
> Sent: Friday, January 24, 2003 5:49 AM
> To: Jakarta List
> Subject: NumberFormat exception when building iterator ?
>
>
>
> Hi,
>
> The following jelly snippet provides me a
> java.lang.NumberFormatException but works... it's kind of weird, the
> error sort of means that evaluateAsIterator of a StringTokenizer
> actually requires to convert the string being tokenized into
> a double...
>
> <j:set var="blop" value="the value of blop"/>
> <util:tokenize var="blop-cut" delim=" ">${blop}</util:tokenize>
> <j:forEach items="${blop-cut}" var="token">
> <log:info>Found word "${token}"</log:info>
> </j:forEach>
>
> Paul
>
>
> --
> To unsubscribe, e-mail:
> <mailto:commons-user-> unsubscribe@jakarta.apache.org>
> For
> additional commands,
> e-mail: <ma...@jakarta.apache.org>
>
>