Error when using Infinity

12 views
Skip to first unread message

PaulV

unread,
Mar 8, 2009, 6:03:47 PM3/8/09
to Persevere
Hi;

I am getting the following error when I try and use a dojo store
linked to a dojo FilteringSelect. When I click the drop-down arrow of
the filtering select, it causes a GET to be sent to persevere, which
has the following header ...

Range: items=0-Infinity


On the console I see the following error ...

js>java.lang.NumberFormatException: For input string: "Infinity"
at java.lang.NumberFormatException.forInputString
(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:447)
at java.lang.Integer.parseInt(Integer.java:497)
at org.persvr.remote.Client$IndividualRequest.getIndexRange(Unknown
Source)
at org.persvr.remote.JSONSerializer$Serialization.requestObject
(Unknown Source)
at org.persvr.remote.JSONSerializer$Serialization.getValueString
(Unknown Source)
at org.persvr.remote.JSONSerializer$Serialization.getValueString
(Unknown Source)
at org.persvr.remote.JavaScriptSerializer.serialize(Unknown Source)
at org.persvr.data.RestMethod$9.call(Unknown Source)
at org.persvr.remote.DataSerializer.serialize(Unknown Source)
at org.persvr.remote.PersevereFilter.doFilter(Unknown Source)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1115)

Any ideas?

Paul

Kris Zyp

unread,
Mar 9, 2009, 9:52:00 AM3/9/09
to persevere...@googlegroups.com
Paul,
This was fixed in Dojo 1.3 (which is currently in beta, and almost ready
for release), so that is will properly format such a page request in the
proper range unit format required by RFC 2616. I can also "fix" this in
Persevere (handle Infinity in the Range header, even though it is not
really allowed). Just checked in a fix for it on the server...
Thanks,
Kris

PaulV

unread,
Mar 9, 2009, 2:50:40 PM3/9/09
to Persevere
Thats great Kris; thanks for being so responsive, and I think you
absolutely have the right approach to standards: of strict adherence
when transmitting but tolerating others that don't on receiving --- it
generally leads to better coexistence.

Thanks;
Paul
Reply all
Reply to author
Forward
0 new messages