I have attached a server log. What is happening is:
1. I add the registered robot to a wave
2. The robot correctly receives the event and starts processing the
onWaveletSelfAdded method.
3. The robot gets to the submit call to create a new wave
4. Robot receives empty list from submit and throws a NullPointerException
at:
 Map<ParamsProperty, Object> data = jsonRpcResponse.getData();


On Fri, Apr 22, 2011 at 12:13 AM, Yuri Z <[email protected]> wrote:
>
> Did you try to check the server logs? Can you attach the outgoing jsons
and
> incoming?
>
> 2011/4/22 Patrick Jennings <[email protected]>
>
> > I am using the following method in my robot to process the list
> > of JsonRpcResponse objects
> > returned from a call to com.google.wave.api.AbstractRobot.submit:
> >
> > private String getParam(List<JsonRpcResponse> response, ParamsProperty
p) {
> > for(JsonRpcResponse jsonRpcResponse : response) {
> > Map<ParamsProperty, Object> data = jsonRpcResponse.getData();
> > String param = (String) data.get(p);
> > if(param != null)
> > return param;
> > }
> > return null;
> > }
> > (from:
> >
http://www.mail-archive.com/[email protected]/msg04969.html
> > )
> >
> > This is very useful since I can do something like:
> > String newwaveid = getParam(submit(newwave,
> > rpcserverurl), ParamsProperty.WAVE_ID);
> > to get back the id of the newly created wave from the WIAB server.
> >
> > This was working fine until a few days ago when I started getting
> > a NullPointerException
> > from the line:
> > Map<ParamsProperty, Object> data = jsonRpcResponse.getData();
> >
> > It seems that the submit call is now returning an empty
> > list of JsonRpcResponse objects.
> > Has anything changing in the last couple of days that could have caused
> > this?
> >
> > Any help would be greatly appreciated. I have to give a demo of my robot
> > tomorrow
> > so I am in desperate need of some assistance.
> >
> > Thank you,
> > Patrick Jennings
> >
Session[j2a3nGjoTfYiMZxF0G0u]: onMessage: 
{"sequenceNumber":2,"messageType":"ProtocolSubmitRequest","message":{"1":"mydomain.com/w+k9USFJM02oA/~/conv+root","2":{"1":{"1":117,"2":"F343C7BFD2540B2C5CD414587E872402F50363EE"},"2":"[email protected]","3":[{"1":"[email protected]"}],"4":[]},"3":"ch2"}}
Apr 21, 2011 8:21:13 PM 
org.waveprotocol.box.server.frontend.WaveViewSubscription submitRequest
INFO: Submit oustandinding on channel ch2
Apr 21, 2011 8:21:13 PM org.waveprotocol.box.server.waveserver.WaveServerImpl 
submitDelta
INFO: Submit to [WaveletName mydomain.com/w+k9USFJM02oA/mydomain.com/conv+root] 
by [email protected] @ 117 with 1 ops
2011-04-21 20:21:13.470:DBUG::REQUEST /search/ on 
org.eclipse.jetty.server.nio.SelectChannelConnector$2@5d8a2977
2011-04-21 20:21:13.470:DBUG::Got Session ID 1ol9e8vhwv3qdqpze9gcm40ot from 
cookie
2011-04-21 
20:21:13.470:DBUG::sessionManager=org.eclipse.jetty.server.session.HashSessionManager@5a9b774e
2011-04-21 
20:21:13.470:DBUG::session=org.eclipse.jetty.server.session.HashSessionManager$Session:1ol9e8vhwv3qdqpze9gcm40ot@1772912571
2011-04-21 
20:21:13.470:DBUG::servlet=org.waveprotocol.box.server.rpc.SearchServlet-1617922859
2011-04-21 20:21:13.470:DBUG::servlet holder= 
org.waveprotocol.box.server.rpc.SearchServlet-1617922859
2011-04-21 20:21:13.470:DBUG::chain= null
Apr 21, 2011 8:21:13 PM 
org.waveprotocol.box.server.robots.passive.RobotsGateway ensureScheduled
INFO: Enqueing robot: [email protected]
Apr 21, 2011 8:21:13 PM org.waveprotocol.box.server.rpc.SocketIOServerChannel 
sendMessageString
WARNING: Websocket is not connected
Apr 21, 2011 8:21:13 PM org.waveprotocol.box.server.waveserver.WaveServerImpl 
submitDelta
INFO: Submit result for [WaveletName 
mydomain.com/w+k9USFJM02oA/mydomain.com/conv+root] by [email protected] 
applied 1 ops at v: 117 t: 1303431673469
Session[j2a3nGjoTfYiMZxF0G0u]: sendMessage: [DATA]: 
{"messageType":"ProtocolSubmitResponse","sequenceNumber":2,"message":{"1":1,"3":{"1":118.0,"2":"F4D7787754E5B565DAAD35F622EF5D624FDFE29E"}}}
Apr 21, 2011 8:21:13 PM 
org.waveprotocol.box.server.frontend.WaveViewSubscription submitResponse
INFO: Submit resolved on channel ch2
Apr 21, 2011 8:21:13 PM org.waveprotocol.box.server.waveserver.WaveMap search
INFO: Search response to 'in:inbox': 2 results
2011-04-21 20:21:13.492:DBUG::RESPONSE /search/  200
Apr 21, 2011 8:21:13 PM org.waveprotocol.box.server.robots.passive.Robot process
INFO: [email protected]: sending events
Apr 21, 2011 8:21:13 PM 
org.waveprotocol.box.server.robots.passive.RobotConnector sendMessageBundle
INFO: Sending: 
{"events":[{"type":"WAVELET_SELF_ADDED","modifiedBy":"[email protected]","timestamp":0,"properties":{"blipId":"b+k9USFJM02oB"}}],"wavelet":{"creationTime":1303425064283,"lastModifiedTime":1303431673469,"version":118,"participants":["[email protected]","[email protected]"],"participantRoles":{"[email protected]":"FULL","[email protected]":"FULL"},"dataDocuments":{},"tags":[],"creator":"[email protected]","rootBlipId":"b+k9USFJM02oB","title":"","waveId":"mydomain.com!w+k9USFJM02oA","waveletId":"mydomain.com!conv+root","rootThread":{"id":"","location":-1,"blipIds":["b+k9USFJM02oB","b+GMoZdHKIj_A"]}},"blips":{"b+k9USFJM02oB":{"annotations":[],"elements":{"0":{"type":"LINE","properties":{}}},"blipId":"b+k9USFJM02oB","childBlipIds":[],"contributors":["[email protected]"],"creator":"[email protected]","content":"\nWhy
 is this not 
working?","lastModifiedTime":1303425069263,"parentBlipId":null,"version":38,"waveId":"mydomain.com!w+k9USFJM02oA","waveletId":"mydomain.com!conv+root","replyThreadIds":[],"threadId":""}},"threads":{},"robotAddress":"[email protected]"}
 to http://myrobotgadget.appspot.com/_wave/robot/jsonrpc
Apr 21, 2011 8:21:13 PM org.waveprotocol.box.server.rpc.SocketIOServerChannel 
sendMessageString
WARNING: Websocket is not connected
Session[j2a3nGjoTfYiMZxF0G0u]: sendMessage: [DATA]: 
{"messageType":"ProtocolWaveletUpdate","sequenceNumber":1,"message":{"1":"mydomain.com/w+k9USFJM02oA/~/conv+root","2":[],"3":{"1":118.0,"2":"F4D7787754E5B565DAAD35F622EF5D624FDFE29E"},"7":"ch2"}}
2011-04-21 20:21:13.793:DBUG::REQUEST /robot/rpc on 
org.eclipse.jetty.server.nio.SelectChannelConnector$2@65be7af
2011-04-21 
20:21:13.793:DBUG::sessionManager=org.eclipse.jetty.server.session.HashSessionManager@5a9b774e
2011-04-21 20:21:13.793:DBUG::session=null
2011-04-21 
20:21:13.793:DBUG::servlet=org.waveprotocol.box.server.robots.active.ActiveApiServlet-278604369
2011-04-21 20:21:13.793:DBUG::servlet holder= 
org.waveprotocol.box.server.robots.active.ActiveApiServlet-278604369
2011-04-21 20:21:13.793:DBUG::chain= null
Apr 21, 2011 8:21:13 PM 
org.waveprotocol.box.server.robots.dataapi.BaseApiServlet processOpsRequest
INFO: The message does not conform to OAuth
net.oauth.OAuthProblemException: timestamp_refused
        at 
net.oauth.SimpleOAuthValidator.validateTimestamp(SimpleOAuthValidator.java:218)
        at 
net.oauth.SimpleOAuthValidator.validateTimestampAndNonce(SimpleOAuthValidator.java:208)
        at 
net.oauth.SimpleOAuthValidator.validateMessage(SimpleOAuthValidator.java:147)
        at 
org.waveprotocol.box.server.robots.dataapi.BaseApiServlet.processOpsRequest(BaseApiServlet.java:105)
        at 
org.waveprotocol.box.server.robots.active.ActiveApiServlet.doPost(ActiveApiServlet.java:110)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at 
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:527)
        at 
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:423)
        at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
        at 
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:493)
        at 
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225)
        at 
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:930)
        at 
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:358)
        at 
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)
        at 
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:866)
        at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
        at 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:113)
        at org.eclipse.jetty.server.Server.handle(Server.java:347)
        at 
org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:594)
        at 
org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1059)
        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:764)
        at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:217)
        at 
org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:424)
        at 
org.eclipse.jetty.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:506)
        at 
org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:436)
        at java.lang.Thread.run(Thread.java:662)
2011-04-21 20:21:13.798:DBUG::RESPONSE /robot/rpc  401
Apr 21, 2011 8:21:13 PM 
org.waveprotocol.box.server.robots.passive.RobotConnector sendMessageBundle
INFO: Failed to receive a response from 
http://myrobotgadget.appspot.com/_wave/robot/jsonrpc
com.google.wave.api.robot.RobotConnectionException: Robot fetch http failure: 
http://myrobotgadget.appspot.com/_wave/robot/jsonrpc: 500
        at 
com.google.wave.api.robot.RobotConnectionUtil.validateAndReadResponse(RobotConnectionUtil.java:49)
        at 
com.google.wave.api.robot.RobotConnectionUtil.validateAndReadResponse(RobotConnectionUtil.java:69)
        at 
com.google.wave.api.robot.HttpRobotConnection.fetch(HttpRobotConnection.java:111)
        at 
com.google.wave.api.robot.HttpRobotConnection.postJson(HttpRobotConnection.java:80)
        at 
org.waveprotocol.box.server.robots.passive.RobotConnector.sendMessageBundle(RobotConnector.java:78)
        at 
org.waveprotocol.box.server.robots.passive.Robot.process(Robot.java:275)
        at org.waveprotocol.box.server.robots.passive.Robot.run(Robot.java:222)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
Apr 21, 2011 8:21:13 PM org.waveprotocol.box.server.robots.passive.Robot process
INFO: [email protected]: received operations
Apr 21, 2011 8:21:13 PM 
org.waveprotocol.box.server.robots.passive.RobotsGateway ensureScheduled
INFO: Enqueing robot: [email protected]
2011-04-21 20:21:20.029:DBUG::REQUEST /search/ on 
org.eclipse.jetty.server.nio.SelectChannelConnector$2@5d8a2977
2011-04-21 20:21:20.029:DBUG::Got Session ID 1ol9e8vhwv3qdqpze9gcm40ot from 
cookie
2011-04-21 
20:21:20.029:DBUG::sessionManager=org.eclipse.jetty.server.session.HashSessionManager@5a9b774e
2011-04-21 
20:21:20.029:DBUG::session=org.eclipse.jetty.server.session.HashSessionManager$Session:1ol9e8vhwv3qdqpze9gcm40ot@1772912571
2011-04-21 
20:21:20.029:DBUG::servlet=org.waveprotocol.box.server.rpc.SearchServlet-1617922859
2011-04-21 20:21:20.029:DBUG::servlet holder= 
org.waveprotocol.box.server.rpc.SearchServlet-1617922859
2011-04-21 20:21:20.029:DBUG::chain= null
Apr 21, 2011 8:21:20 PM org.waveprotocol.box.server.waveserver.WaveMap search
INFO: Search response to 'in:inbox': 2 results
2011-04-21 20:21:20.041:DBUG::RESPONSE /search/  200
2011-04-21 20:21:30.032:DBUG::REQUEST /search/ on 
org.eclipse.jetty.server.nio.SelectChannelConnector$2@5d8a2977
2011-04-21 20:21:30.032:DBUG::Got Session ID 1ol9e8vhwv3qdqpze9gcm40ot from 
cookie
2011-04-21 
20:21:30.032:DBUG::sessionManager=org.eclipse.jetty.server.session.HashSessionManager@5a9b774e
2011-04-21 
20:21:30.032:DBUG::session=org.eclipse.jetty.server.session.HashSessionManager$Session:1ol9e8vhwv3qdqpze9gcm40ot@1772912571
2011-04-21 
20:21:30.032:DBUG::servlet=org.waveprotocol.box.server.rpc.SearchServlet-1617922859
2011-04-21 20:21:30.033:DBUG::servlet holder= 
org.waveprotocol.box.server.rpc.SearchServlet-1617922859
2011-04-21 20:21:30.033:DBUG::chain= null
Apr 21, 2011 8:21:30 PM org.waveprotocol.box.server.waveserver.WaveMap search
INFO: Search response to 'in:inbox': 2 results
2011-04-21 20:21:30.044:DBUG::RESPONSE /search/  200
IDLE SCEP@1796929467    [d=false,io=1,w=true,rb=false,wb=false]
IDLE SCEP@230967917     [d=false,io=1,w=true,rb=false,wb=false]
2011-04-21 20:21:40.025:DBUG::REQUEST /search/ on 
org.eclipse.jetty.server.nio.SelectChannelConnector$2@5d8a2977
2011-04-21 20:21:40.026:DBUG::Got Session ID 1ol9e8vhwv3qdqpze9gcm40ot from 
cookie
2011-04-21 
20:21:40.026:DBUG::sessionManager=org.eclipse.jetty.server.session.HashSessionManager@5a9b774e
2011-04-21 
20:21:40.026:DBUG::session=org.eclipse.jetty.server.session.HashSessionManager$Session:1ol9e8vhwv3qdqpze9gcm40ot@1772912571
2011-04-21 
20:21:40.026:DBUG::servlet=org.waveprotocol.box.server.rpc.SearchServlet-1617922859
2011-04-21 20:21:40.026:DBUG::servlet holder= 
org.waveprotocol.box.server.rpc.SearchServlet-1617922859
2011-04-21 20:21:40.026:DBUG::chain= null
Apr 21, 2011 8:21:40 PM org.waveprotocol.box.server.waveserver.WaveMap search
INFO: Search response to 'in:inbox': 2 results
2011-04-21 20:21:40.040:DBUG::RESPONSE /search/  200
2011-04-21 20:21:49.665:DBUG::EOF org.eclipse.jetty.io.EofException
2011-04-21 20:21:50.024:DBUG::REQUEST /search/ on 
org.eclipse.jetty.server.nio.SelectChannelConnector$2@5d8a2977
2011-04-21 20:21:50.024:DBUG::Got Session ID 1ol9e8vhwv3qdqpze9gcm40ot from 
cookie
2011-04-21 
20:21:50.024:DBUG::sessionManager=org.eclipse.jetty.server.session.HashSessionManager@5a9b774e
2011-04-21 
20:21:50.025:DBUG::session=org.eclipse.jetty.server.session.HashSessionManager$Session:1ol9e8vhwv3qdqpze9gcm40ot@1772912571
2011-04-21 
20:21:50.025:DBUG::servlet=org.waveprotocol.box.server.rpc.SearchServlet-1617922859
2011-04-21 20:21:50.025:DBUG::servlet holder= 
org.waveprotocol.box.server.rpc.SearchServlet-1617922859
2011-04-21 20:21:50.025:DBUG::chain= null
Apr 21, 2011 8:21:50 PM org.waveprotocol.box.server.waveserver.WaveMap search
INFO: Search response to 'in:inbox': 2 results
2011-04-21 20:21:50.039:DBUG::RESPONSE /search/  200
2011-04-21 20:22:00.022:DBUG::REQUEST /search/ on 
org.eclipse.jetty.server.nio.SelectChannelConnector$2@5d8a2977
2011-04-21 20:22:00.022:DBUG::Got Session ID 1ol9e8vhwv3qdqpze9gcm40ot from 
cookie
2011-04-21 
20:22:00.023:DBUG::sessionManager=org.eclipse.jetty.server.session.HashSessionManager@5a9b774e
2011-04-21 
20:22:00.023:DBUG::session=org.eclipse.jetty.server.session.HashSessionManager$Session:1ol9e8vhwv3qdqpze9gcm40ot@1772912571
2011-04-21 
20:22:00.023:DBUG::servlet=org.waveprotocol.box.server.rpc.SearchServlet-1617922859
2011-04-21 20:22:00.023:DBUG::servlet holder= 
org.waveprotocol.box.server.rpc.SearchServlet-1617922859
2011-04-21 20:22:00.023:DBUG::chain= null
Apr 21, 2011 8:22:00 PM org.waveprotocol.box.server.waveserver.WaveMap search
INFO: Search response to 'in:inbox': 2 results
2011-04-21 20:22:00.033:DBUG::RESPONSE /search/  200


Reply via email to