Please help me how to move my data to the cloud

64 views
Skip to first unread message

Nandar Wai Yee

unread,
Oct 14, 2011, 2:05:14 PM10/14/11
to google-a...@googlegroups.com




Hello Masters,

I want a solution for my problem....

             The problem is that ..how to move my data to the cloud.
              I built an application.
              It is ok in local ...no error....it can show the result without any difficulty.
              But  after i deployed my application to the web,  my application can't work well as in local.
              I mean, when i put an input to the  input box, then i pressed calculate button, the result cannot be shown.
              How can i change which part of the code and where?
              I am waiting forward ur reply.

with best regards,






Greg

unread,
Oct 18, 2011, 5:11:11 PM10/18/11
to Google App Engine
Please post the error message you get when you press the calculate
button. You can find this in the log, which is in the admin dashboard.

Without this information, no-one can help you.

Cheers
Greg.

Nandar Wai Yee

unread,
Dec 1, 2011, 2:03:38 AM12/1/11
to google-a...@googlegroups.com
hello
Sorry for my late reply coz of my exam ....
My project hasn't any error message ...this is very strange for me
But I wanna to show  u my link to test ....i uploaded my project to Google App Engine....

http://hz-uak-app.appspot.com/

Please check my link ..pls
in ewb.xml, i set session-enable=true ...
but i didn't get answer ...:(  i don't know what i'm wrong ...
Waiting ur reply


--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.




--
Yours,












Abhishek Mathur

unread,
Dec 1, 2011, 5:06:18 AM12/1/11
to google-a...@googlegroups.com
Hi ,

Please go to your application dashboard on GAE and on the left hand  side you will see a link to your logs. You can have a look at the logs there and if you find any error you can post it here.

--Thanks
Abhishek

Nandar Wai Yee

unread,
Dec 3, 2011, 8:23:02 AM12/3/11
to google-a...@googlegroups.com
  I saw the following errors in the Logs...:(
  1. 2011-12-01 13:32:56.097 /bmiHistoryCalculate 500 180ms 0kb Mozilla/5.0 (Windows NT 6.0; WOW64) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.121 Safari/535.2
    129.234.230.69 - - [01/Dec/2011:13:32:56 -0800] "POST /bmiHistoryCalculate HTTP/1.1" 500 0 "http://hz-uak-app.appspot.com/save_login" "Mozilla/5.0 (Windows NT 6.0; WOW64) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.121 Safari/535.2" "hz-uak-app.appspot.com" ms=181 cpu_ms=47 api_cpu_ms=0 cpm_usd=0.001359 instance=00c61b117c3bee08d2ece9b139d1e4c70d8e77
  2. W 2011-12-01 13:32:56.093
    /bmiHistoryCalculate
    java.lang.NumberFormatException: For input string: "1,8"
    	at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1248)
    	at java.lang.Float.parseFloat(Float.java:439)
    	at ndwy.exercise.uak.controller.BMIHistoryCalculateServlet.doPost(BMIHistoryCalculateServlet.java:31)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
    	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
    	at com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:97)
    	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    	at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35)
    	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    	at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
    	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
    	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
    	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
    	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
    	at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:249)
    	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    	at org.mortbay.jetty.Server.handle(Server.java:326)
    	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
    	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
    	at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76)
    	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
    	at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:135)
    	at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:392)
    	at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:449)
    	at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:455)
    	at com.google.tracing.TraceContext.runInContext(TraceContext.java:695)
    	at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:333)
    	at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:325)
    	at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:453)
    	at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:162)
    	at java.lang.Thread.run(Thread.java:679)
    
nandar





Nandar Wai Yee

unread,
Dec 16, 2011, 3:07:09 AM12/16/11
to google-a...@googlegroups.com
I wrote the source code as follows in dopost function that is in  one of the servlet classes
...............................

protected void doPost(HttpServletRequest req, HttpServletResponse resp)
            throws ServletException, IOException {
        Float fw=Float.parseFloat(req.getParameter("frmWeight"));
        Float fh=Float.parseFloat(req.getParameter("frmHeight"));
        Float bmi=(float)0;
        String type=req.getParameter("frmType");
        if(type.equals("lb/inches")){
            bmi=(fw*(float)703)/(fh*fh);
        }else if(type.equals("kg/m")){
            bmi=fw/(fh*fh);
        }
        String status=new String();
        if(bmi<=(float)18.5) status="Underweight";
        else if(bmi>(float)18.5 && bmi<=(float)24.9) status="Normal";
        else if(bmi>(float)25 && bmi<=(float)29.9) status="Overweight";
        else if(bmi>=(float)30 ) status="Obese";
       
        BMI myB=new BMI();
        myB.setBmi(bmi);
        myB.setHeight(fh);
        myB.setHistDate(new Date());
        myB.setUnit(type);
        myB.setWeight(fw);
        myB.setWeightStatus(status);
        myB.setPersonName((String)req.getSession().getAttribute("loginPKey"));
       
        BMIJDO myBmiJDO=new BMIJDO();
        myBmiJDO.saveNewEmployer(myB);
        List<BMI> l=myBmiJDO.getAll((String)req.getSession().getAttribute("loginPKey"));
        req.setAttribute("bmisize","1");
        req.setAttribute("histList",l);
        RequestDispatcher r=req.getRequestDispatcher("jsp/bmi_history.jsp");
        r.forward(req, resp);
.............................................

-->> it works ok in local
*** But i got the error message ...Numberformat exception when i  press the calculate button  (the  project is already deploymented to GAE )
I got that error in the log as u said
with regards,
:)
--
Yours,








André Pankraz

unread,
Dec 16, 2011, 3:20:47 AM12/16/11
to google-a...@googlegroups.com
Hi...allways catch an exception around constructs like Float.parseFloat(...)

The user could input wrong data that cannot be parsed into a Float, like your provided example 1,8.
1.8 (with dot) should work.

Nandar Wai Yee

unread,
Dec 18, 2011, 6:50:48 AM12/18/11
to google-a...@googlegroups.com
10Q
:)
i'm now ok for the NumberFormatException error ...
my error message changed from critical stage to warning & inform stage..
now i'm trying to solve that error ....
btw, i haven't  got the result when i pressed calculate button till now  although there is no  error...:(

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/0ZOy8ZF_7AAJ.

To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.



--
Yours,








Reply all
Reply to author
Forward
0 new messages