Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8386609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T17:59:17+00:00 2026-06-09T17:59:17+00:00

i try to implement gcm from http://developer.android.com/guide/google/gcm/gs.html i can send regid to servlet but

  • 0

i try to implement gcm from http://developer.android.com/guide/google/gcm/gs.html
i can send regid to servlet but can’t get message form it.

Servlet:

if("send".equals(id))
        {
            deviceHolder.put(did, reGid);
            reGid = deviceHolder.get(did);
            if(reGid== null || "".equals(reGid)){
                System.out.println("device is not registered "+did);
            }else{
                Sender sender = new Sender(myApiKey);
                Message message = new Message.Builder()
                .collapseKey("1")
                .timeToLive(3)
                .delayWhileIdle(true)
                .addData("message", "message is created at builder")
                .build();

                Result result = sender.send(message, reGid, 5);
                System.out.println("result of message is "+ result);
            }
        }

GCMINtentService:

@Override
protected void onMessage(Context arg0, Intent arg1) {
Log.i(TAG, "new message= ");
Toast.makeText(getApplicationContext(), arg1.getStringExtra("message"),
Toast.LENGTH_SHORT).show();
}

at console:

A?u 07, 2012 4:37:08 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [servCloud] in context with path [/servletCloud]   threw exception [Servlet execution threw an exception] with root cause
java.lang.ClassNotFoundException: com.google.android.gcm.server.Sender
at   org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1711)
at    org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
at servCloud.doGet(servCloud.java:75)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

A?u 07, 2012 4:40:37 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading Context with name [/servletCloud] has started
A?u 07, 2012 4:40:38 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading Context with name [/servletCloud] is completed

How can i fix this problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T17:59:18+00:00Added an answer on June 9, 2026 at 5:59 pm

    Your servlet classpath should include the GCM server API. Make sure you have gcm-server.jar under the WEB-INF/lib folder inside your servlet war file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I try to implement the following code: <a href = http://www.google.com/ id=external>go to google</a>
I try to implement the following code: <a href = http://www.google.com/ id=external>go to google</a>
I try implement advance on my question form here: send parameter from view-model to
I try to implement the following code: <!DOCTYPE html> <html lang=en> <head> <meta http-equiv=Content-Type
I try to implement jcarousel gallery in this dummy article http://mybistrotableandchairs.com/hghg/ Setup feels ok
I try to implement a browser-like app. I want to let it can open
I had try to implement the send me log feature into my apps but
I try to implement simple server on python based on HTTPServer. How can i
I want to try to implement the Tetris Game using TDD. From what I've
I try to implement a Google +1 button in my website, but for some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.