i am trying to parse data by splitting the response string from app engine by using below code.
Resonse string: "29(0.001)"
Code:
String[] strToken = token.split("\\p{Punct}", 2);
String metricId = strToken[0];
String time = strToken[1];
double metricTime;
if (!time.contains(")")) {
metricTime = Double.parseDouble(time);
} else {
int end = time.indexOf(")");
metricTime = Double.parseDouble(time.substring(0, end));
}
its working fine in developer mode. but when i deployed to google app engine.. i am geting different exceptions in different browsers.
Chrome Exception:
com.google.gwt.core.client.JavaScriptException: (TypeError): Cannot call method 'indexOf' of undefined
Unknown.Gxb(Unknown Source)
Unknown.Exb(Unknown Source)
Unknown.byb(Unknown Source)
...................................
...................................
Mozilla Firefox Exception:
com.google.gwt.core.client.JavaScriptException: (TypeError): n is undefined
stack: Oxb([object Object],[object Object])@http://5.shoutdo-prod.appspot.com/aaspaas/CAC7AD49C2D216DF99E0311CE11EEE33.cache.html:2823
Mxb([object Object],0)@http://5.shoutdo-prod.appspot.com/aaspaas/CAC7AD49C2D216DF99E0311CE11EEE33.cache.html:2857
jyb([object Object],[object Object])@http://5.shoutdo-prod.appspot.com/aaspaas/CAC7AD49C2D216DF99E0311CE11EEE33.cache.html:2593
nyb([object Object])@http://5.shoutdo-prod.appspot.com/aaspaas/CAC7AD49C2D216DF99E0311CE11EEE33.cache.html:2949
mib([object Object],[object Array])@http://5.shoutdo-prod.appspot.com/aaspaas/CAC7AD49C2D216DF99E0311CE11EEE33.cache.html:1953
Fjb([object Object],null,"{\"S\":[true],\"O\":[{\"T\":\"KsTvcMuLmDum0vzmDgOhzEcoRq8=\",\"P\":{\"startTimeStamp\":\"1353570969965\",\"userId\":\"xyz501@gmail.com\",\"payload\":\"29(0.0)-1(0.0)-31(0.849)-31(0.749)-21(5.053)-21(0.348)-5(0.002)-1(1.497)-47(1.866)-48(0.074)-85(0.047)-54(0.829)-40(0.688)-1(0.258)-4.......................................................
fileName: http://5.shoutdo-prod.appspot.com/aaspaas/CAC7AD49C2D216DF99E0311CE11EEE33.cache.html
lineNumber: 2823
Unknown.Oxb(Unknown Source)
Unknown.Mxb(Unknown Source)
Unknown.jyb(Unknown Source)
Unknown.nyb(Unknown Source)
Unknown.mib(Unknown Source)
Unknown.Fjb(Unknown Source)
Unknown.ijb(Unknown Source)
Unknown.mhb(Unknown Source)
Unknown.fn(Unknown Source)
Unknown.Jn(Unknown Source)
Unknown.anonymous(Unknown Source)
Unknown.af(Unknown Source)
Unknown.df(Unknown Source)
Unknown.anonymous(Unknown Source)
Unknown.anonymous(Unknown Source)
Can any one please explain my fault.?
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/tkRQXg5unU8J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
No comments:
Post a Comment