Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The "O" variable is the operations sent over the wire, declared in <code>com.google.web.bindery.requestfactory.shared.messages.RequestMessage</code>. An operation is described in <code>com.google.web.bindery.requestfactory.shared.messages.OperationMessage</code>- it represents a set or operations to perform on entities prior to persisting them (as opposed to <code>com.google.web.bindery.requestfactory.shared.messages.InvocationMessage</code>, which represents the service operations).</p> <p>For that null pointer to occur there, the entire RequestMessage seems to need to be null - there was no object to read the "O" property from - the JsonSplittable was created somehow without underlying data.</p> <p>I don't see a way that can happen in tracing the code that is called to deserialize the message from the client to a RequestMessage instance, with one exception - if a JSON string is sent instead of an object. This makes no sense, at least with any default setup.</p> <hr> <p>From the updated posts, it turns out that the JsonSplittable was created wrapping a string instead of a Json object, which gives us the NPE. From this, we only know that some string is being deserialized, but the server thinks that it should be an object instead, and so is trying (and failing) to read sub-properties. Now, trying to figure out what property we are reading is proving difficult from just a stack trace, as it could be reading any sub-property to prepare it to be accessed as a bean. The id property was a likely candidate, as it should be sent as a String->Long, but if the server was expecting some other type, it would try to deserialize it as jsonobject->object.</p> <p>That other operations that don't send an object to the server work correctly seems to corroborate this. I'm still suspecting that something is going wrong here (or that the stack trace has changed, or the property it gets stuck on has changed) - figuring out which property is it currently trying to read will be important to solving this.</p> <pre><code>java.lang.NullPointerException at com.google.web.bindery.autobean.vm.impl.JsonSplittable.isNull(JsonSplittable.java:248) at com.google.web.bindery.autobean.shared.impl.AbstractAutoBean.getOrReify(AbstractAutoBean.java:235) at com.google.web.bindery.autobean.vm.impl.ProxyAutoBean.getOrReify(ProxyAutoBean.java:229) at com.google.web.bindery.autobean.vm.impl.BeanMethod$2.invoke(BeanMethod.java:73) </code></pre> <p>The last frame here is where the getter is actually being invoked, try to break on the exception to read some values and learn a few things:</p> <ul> <li>is this still happening from getOperations, and is the property still "O" that is being invoked on a string? Assuming so,</li> <li>What is the string in the JsonSplittable that is being treated as an object? With the request string, this doesn't make sense to be anything but the only object in the O array (or the "UPDATE" string->enum).</li> </ul> <hr> <p>Some other questions I asked, were answered</p> <p>Can you post the message body that is being sent over the wire? This should be available as <code>jsonRequestString</code> in <code>com.google.web.bindery.requestfactory.server.RequestFactoryServlet.doPost(HttpServletRequest, HttpServletResponse)</code>, which is in your stack trace, or view the text using a tool like Firebug or Chrome Inspector. Can you also share how you create/setup the RequestFactory instance? If you were using a custom transport, it is possible (though seems absurd) that the data might be being sent wrong somehow.</p> <p>And finally, do any RF calls work? If they all fail, this too points to a configuration problem of some kind. If this is the only one, then maybe the message will have something that sheds a little light on the issue.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload