我成功運行我的應用程序和註冊的設備我的服務器上,所以我得到「1裝置(S)的註冊」和「發送消息」按鈕。但是,當我在「發送消息」點擊按鈕,我得到以下錯誤:GCM HTTP狀態500 - Servlet.init()-Notification未送交─
我使用Tomcat和Android示例項目所講述的位置: http://developer.android.com/google/gcm/server.html
HTTP Status 500 - Servlet.init() for servlet SendAllMessagesServlet threw exception
type Exception report
message Servlet.init() for servlet SendAllMessagesServlet threw exception
description The server encountered an internal error that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet.init() for servlet SendAllMessagesServlet threw exception
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1852)
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.lang.Thread.run(Unknown Source)
root cause
java.lang.IllegalArgumentException: argument cannot be null
com.google.android.gcm.server.Sender.nonNull(Sender.java:553)
com.google.android.gcm.server.Sender.<init>(Sender.java:88)
com.google.android.gcm.demo.server.SendAllMessagesServlet.newSender(SendAllMessagesServlet.java:62)
com.google.android.gcm.demo.server.SendAllMessagesServlet.init(SendAllMessagesServlet.java:53)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1852)
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.lang.Thread.run(Unknown Source)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.41 logs.
請可以有人幫忙請