You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by bu...@apache.org on 2003/09/08 15:09:36 UTC
DO NOT REPLY [Bug 22985] New: -
CookieManager.addCookieFromHeader NumberFormatException
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22985>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22985
CookieManager.addCookieFromHeader NumberFormatException
Summary: CookieManager.addCookieFromHeader NumberFormatException
Product: JMeter
Version: 1.9.1
Platform: Sun
OS/Version: Solaris
Status: NEW
Severity: Critical
Priority: Other
Component: HTTP
AssignedTo: jmeter-dev@jakarta.apache.org
ReportedBy: Cbaatz@irontree.biz
I am running a load test against a Oracle 9iAS application server with a
Struts front end and BC4J back end. As the test runs the following error
message appears several times in the log files:
09/08/2003 8:19:01 AM WARN - jmeter.protocol.http.sampler.HTTPSampler: For
input string: "" java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Long.parseLong(Unknown Source)
at java.lang.Long.parseLong(Unknown Source)
at java.text.DigitList.getLong(Unknown Source)
at java.text.DecimalFormat.parse(Unknown Source)
at java.text.SimpleDateFormat.subParse(Unknown Source)
at java.text.SimpleDateFormat.parse(Unknown Source)
at java.text.DateFormat.parse(Unknown Source)
at
org.apache.jmeter.protocol.http.control.CookieManager.addCookieFromHeader
(CookieManager.java:361)
at
org.apache.jmeter.protocol.http.sampler.HTTPSampler.saveConnectionCookies
(HTTPSampler.java:1085)
at org.apache.jmeter.protocol.http.sampler.HTTPSampler.sample
(HTTPSampler.java:962)
at org.apache.jmeter.protocol.http.sampler.HTTPSampler.sample
(HTTPSampler.java:445)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:277)
at java.lang.Thread.run(Unknown Source)
-- Also I am getting:
09/08/2003 8:03:12 AM WARN - jmeter.protocol.http.sampler.HTTPSampler: For
input string: "0907E2.0907E" java.lang.NumberFormatException: For input
string: "0907E2.0907E"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.FloatingDecimal.readJavaFormatString(Unknown Source)
at java.lang.Double.parseDouble(Unknown Source)
at java.text.DigitList.getDouble(Unknown Source)
at java.text.DecimalFormat.parse(Unknown Source)
at java.text.SimpleDateFormat.subParse(Unknown Source)
at java.text.SimpleDateFormat.parse(Unknown Source)
at java.text.DateFormat.parse(Unknown Source)
at
org.apache.jmeter.protocol.http.control.CookieManager.addCookieFromHeader
(CookieManager.java:361)
at
org.apache.jmeter.protocol.http.sampler.HTTPSampler.saveConnectionCookies
(HTTPSampler.java:1085)
at org.apache.jmeter.protocol.http.sampler.HTTPSampler.sample
(HTTPSampler.java:962)
at org.apache.jmeter.protocol.http.sampler.HTTPSampler.sample
(HTTPSampler.java:445)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:277)
at java.lang.Thread.run(Unknown Source)
I checked the source distribution and the exception is being raised from the
following spot in the code (lines 293-299 of CookieManager.java):
String key = nvp.substring(0,index);
if (key.equalsIgnoreCase("expires")) {
try {
String expires = nvp.substring(index+1);
Date date = dateFormat.parse(expires);
newCookie.setExpires(date.getTime());
} catch (ParseException pe) {}
This may be able to be fixed by either selectively catching the
NumberFormatException or just catching Exception, since it appears that when
there is an error you would like to do nothing.