Comments (8)
How large is your object ? If you serialize the same class with less data, does it work ?
from gwt-jackson.
Yeah it can be serialized before the object becomes larger, perhaps I have a reference issue?
from gwt-jackson.
Do you have a complete stack trace to find which serializer throw the exception ?
from gwt-jackson.
com.gwtplatform.dispatch.shared.ActionException: Unable to serialize request body. An unexpected error occurred.
at com.gwtplatform.dispatch.rest.client.DefaultRestRequestBuilderFactory.getSerializedValue(DefaultRestRequestBuilderFactory.java:271)
at com.gwtplatform.dispatch.rest.client.DefaultRestRequestBuilderFactory.buildBody(DefaultRestRequestBuilderFactory.java:195)
at com.gwtplatform.dispatch.rest.client.DefaultRestRequestBuilderFactory.build(DefaultRestRequestBuilderFactory.java:101)
at com.gwtplatform.dispatch.rest.client.RestDispatchCall.buildRequest(RestDispatchCall.java:123)
at com.gwtplatform.dispatch.rest.client.RestDispatchCall.doExecute(RestDispatchCall.java:64)
at com.gwtplatform.dispatch.client.DispatchCall.execute(DispatchCall.java:90)
at com.gwtplatform.dispatch.rest.client.RestDispatchAsync.execute(RestDispatchAsync.java:41)
at nz.co.doltech.ims.client.core.IncidentPresenter.saveIncident(IncidentPresenter.java:350)
at nz.co.doltech.ims.client.core.IncidentPresenter.saveIncident(IncidentPresenter.java:340)
at nz.co.doltech.ims.client.core.IncidentPresenter.onChangeSection(IncidentPresenter.java:584)
at nz.co.doltech.ims.client.application.review.ReviewPresenter.onChangeSection(ReviewPresenter.java:239)
at nz.co.doltech.ims.client.core.events.ChangeSectionEvent.dispatch(ChangeSectionEvent.java:89)
at nz.co.doltech.ims.client.core.events.ChangeSectionEvent.dispatch(ChangeSectionEvent.java:1)
at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
at com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40)
at com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193)
at com.google.web.bindery.event.shared.SimpleEventBus.fireEventFromSource(SimpleEventBus.java:96)
at com.gwtplatform.mvp.client.PresenterWidget.fireEvent(PresenterWidget.java:279)
at nz.co.doltech.ims.client.core.events.ChangeSectionEvent.fire(ChangeSectionEvent.java:52)
at nz.co.doltech.ims.client.core.IncidentPresenter.doReveal(IncidentPresenter.java:208)
at nz.co.doltech.ims.client.core.IncidentPresenter.access$2(IncidentPresenter.java:202)
at nz.co.doltech.ims.client.core.IncidentPresenter$1$1.onLoaded(IncidentPresenter.java:153)
at nz.co.doltech.ims.client.core.IncidentPresenter$4$1.onFinish(IncidentPresenter.java:327)
at nz.co.doltech.framework.module.client.dispatch.DispatchQueue.tryQueueFinished(DispatchQueue.java:322)
at nz.co.doltech.framework.module.client.dispatch.DispatchQueue.go(DispatchQueue.java:316)
at nz.co.doltech.framework.module.client.dispatch.DispatchQueue.go(DispatchQueue.java:278)
at nz.co.doltech.ims.client.core.IncidentPresenter$4.onRefreshed(IncidentPresenter.java:323)
at nz.co.doltech.ims.client.application.review.ReviewPresenter$3.onSuccess(ReviewPresenter.java:220)
at nz.co.doltech.ims.client.application.review.ReviewPresenter$3.onSuccess(ReviewPresenter.java:1)
at com.gwtplatform.dispatch.client.DispatchCall.onExecuteSuccess(DispatchCall.java:161)
at com.gwtplatform.dispatch.client.DispatchCall.onExecuteSuccess(DispatchCall.java:173)
at com.gwtplatform.dispatch.rest.client.RestDispatchCall.onExecuteSuccess(RestDispatchCall.java:80)
at com.gwtplatform.dispatch.rest.client.RestDispatchCall.onResponseReceived(RestDispatchCall.java:116)
at com.gwtplatform.dispatch.rest.client.RestDispatchCall.access$0(RestDispatchCall.java:110)
at com.gwtplatform.dispatch.rest.client.RestDispatchCall$1.onResponseReceived(RestDispatchCall.java:100)
at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:259)
at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:412)
at sun.reflect.GeneratedMethodAccessor179.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:284)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:356)
at sun.reflect.GeneratedMethodAccessor170.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
at java.lang.Thread.run(Thread.java:722)
Caused by: com.github.nmorel.gwtjackson.client.exception.JsonSerializationException: java.lang.StringIndexOutOfBoundsException: String index out of range: -17
at com.github.nmorel.gwtjackson.client.JsonSerializationContext.traceError(JsonSerializationContext.java:403)
at com.github.nmorel.gwtjackson.client.JsonSerializationContext.traceError(JsonSerializationContext.java:419)
at com.github.nmorel.gwtjackson.client.AbstractObjectMapper.write(AbstractObjectMapper.java:121)
at com.gwtplatform.dispatch.rest.client.serialization.JsonSerialization.serialize(JsonSerialization.java:63)
at com.gwtplatform.dispatch.rest.client.DefaultRestRequestBuilderFactory.serialize(DefaultRestRequestBuilderFactory.java:157)
at com.gwtplatform.dispatch.rest.client.DefaultRestRequestBuilderFactory.getSerializedValue(DefaultRestRequestBuilderFactory.java:269)
... 60 more
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -17
at java.lang.String.charAt(String.java:658)
at com.github.nmorel.gwtjackson.client.utils.Base64.encode(Base64.java:99)
at com.github.nmorel.gwtjackson.client.ser.array.PrimitiveByteArrayJsonSerializer.doSerialize(PrimitiveByteArrayJsonSerializer.java:52)
at com.github.nmorel.gwtjackson.client.ser.array.PrimitiveByteArrayJsonSerializer.doSerialize(PrimitiveByteArrayJsonSerializer.java:1)
at com.github.nmorel.gwtjackson.client.JsonSerializer.serialize(JsonSerializer.java:60)
at com.github.nmorel.gwtjackson.client.ser.bean.BeanPropertySerializer.serialize(BeanPropertySerializer.java:60)
at com.github.nmorel.gwtjackson.client.ser.bean.AbstractBeanJsonSerializer.serializeObject(AbstractBeanJsonSerializer.java:214)
at com.github.nmorel.gwtjackson.client.ser.bean.AbstractBeanJsonSerializer.serializeInternally(AbstractBeanJsonSerializer.java:153)
at com.github.nmorel.gwtjackson.client.ser.bean.AbstractBeanJsonSerializer.doSerialize(AbstractBeanJsonSerializer.java:88)
at com.github.nmorel.gwtjackson.client.JsonSerializer.serialize(JsonSerializer.java:60)
at com.github.nmorel.gwtjackson.client.ser.IterableJsonSerializer.doSerialize(IterableJsonSerializer.java:92)
at com.github.nmorel.gwtjackson.client.ser.IterableJsonSerializer.doSerialize(IterableJsonSerializer.java:1)
at com.github.nmorel.gwtjackson.client.JsonSerializer.serialize(JsonSerializer.java:60)
at com.github.nmorel.gwtjackson.client.ser.bean.BeanPropertySerializer.serialize(BeanPropertySerializer.java:60)
at com.github.nmorel.gwtjackson.client.ser.bean.AbstractBeanJsonSerializer.serializeObject(AbstractBeanJsonSerializer.java:214)
at com.github.nmorel.gwtjackson.client.ser.bean.AbstractBeanJsonSerializer.serializeInternally(AbstractBeanJsonSerializer.java:153)
at com.github.nmorel.gwtjackson.client.ser.bean.AbstractBeanJsonSerializer.doSerialize(AbstractBeanJsonSerializer.java:88)
at com.github.nmorel.gwtjackson.client.JsonSerializer.serialize(JsonSerializer.java:60)
at com.github.nmorel.gwtjackson.client.JsonSerializer.serialize(JsonSerializer.java:41)
at com.github.nmorel.gwtjackson.client.AbstractObjectMapper.write(AbstractObjectMapper.java:114)
... 63 more
from gwt-jackson.
Oh you have byte[] fields in your object ?
Can you try the last snapshot please ? Should be 0.6.3-SNAPSHOT
.
I got a pull request a few days ago about it
from gwt-jackson.
Right, yeah I do actually. Kk will try it now.
from gwt-jackson.
That fixed this issue! Thanks :)
from gwt-jackson.
I am getting this error however, do you know what could be causing this?
com.gwtplatform.dispatch.shared.ActionException: Unsupported Media Type
at com.gwtplatform.dispatch.rest.client.DefaultRestResponseDeserializer.deserialize(DefaultRestResponseDeserializer.java:49)
at com.gwtplatform.dispatch.rest.client.RestDispatchCall.onResponseReceived(RestDispatchCall.java:114)
at com.gwtplatform.dispatch.rest.client.RestDispatchCall.access$0(RestDispatchCall.java:110)
at com.gwtplatform.dispatch.rest.client.RestDispatchCall$1.onResponseReceived(RestDispatchCall.java:100)
at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:259)
at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:412)
at sun.reflect.GeneratedMethodAccessor140.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:284)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:356)
at sun.reflect.GeneratedMethodAccessor132.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
at java.lang.Thread.run(Thread.java:722)
from gwt-jackson.
Related Issues (20)
- No source code is available for type com.fasterxml.jackson.databind.ObjectMapper; did you forget to inherit a required module? HOT 3
- Support for java.util.Optional HOT 1
- Expected a string but was BEGIN_OBJECT at line 1 column 2 HOT 1
- Please REVERT the dependency on Jackson 2.9.*, Jackson 2.9.* is NOT compatible with GWT. HOT 2
- Support for @JsonCreator(mode = Mode.DELEGATING)
- Custom deserializer compilation error
- Getter returning Optional<T> of nullable T causing compilation error HOT 2
- GWT 2.6.1 + GwtJackson 0.15.3 HOT 3
- JsonSerializationContext.Builder override not working as expected
- Error:GWT Compiler: No source code is available for type com.fasterxml.jackson.annotation.JsonTypeInfo.As; did you forget to inherit a required module?
- JsonTypeInfo defaultImpl attribute not working HOT 1
- Update jackson dependency to 2.9.8
- Update javapoet dependency to 1.11.1
- Support for JsonFormat.Feature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE
- Annotations on Java8 default interface are ignored HOT 1
- Can't figure out the stackoverflow I am getting
- More (de)serialization customization (JsonFilter or equivalent)
- Double.NaN / NEGATIVE_INFINITY / POSITIVE_INFINITY - Numeric values must be finite, but was
- Many compile problems
- I want to deserialize a property with any type of value.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gwt-jackson.