I'm trying to return an arrayList from my mysql database to use in a GWT cellList, but I'm running into a serialization issue.
Type 'com.cbs.ioma.client.Order' was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be loaded. For security purposes, this type will not be serialized.: instance = Order [orderNumber=1001, orderer=test, assembler=1, dateCompleted=1969-12-31, dateSubmitted=1969-12-31, notes=rer, isComplete=false, type=erer]
I have a class Order, but when i try and change it to
public class Order implements java.io.Serializable
the program crashes and no error is message is displayed. I don't know a lot about serialization inside of GWT so how would I go about serializing a class to use in GWT? I have the correct function names in the service and serviceAync class I believe. thanks.
Edit: I'll add a little more here. I tried changing the order class to implement isSerializable and then I get this error
12:55:49.793 [ERROR] [ioma] Uncaught exception escaped
java.lang.ClassCastException: com.cbs.ioma.client.Order cannot be cast to java.lang.String at com.google.gwt.text.shared.SimpleSafeHtmlRenderer.render(SimpleSafeHtmlRenderer.java:1) at com.google.gwt.cell.client.AbstractSafeHtmlCell.render(AbstractSafeHtmlCell.java:80) at com.google.gwt.user.cellview.client.CellList.renderRowValues(CellList.java:527) at com.google.gwt.user.cellview.client.AbstractHasData$View.renderRowValues(AbstractHasData.java:337) at com.google.gwt.user.cellview.client.AbstractHasData$View.replaceAllChildren(AbstractHasData.java:239) at com.google.gwt.user.cellview.client.HasDataPresenter.resolvePendingState(HasDataPresenter.java:1351) at com.google.gwt.user.cellview.client.HasDataPresenter.access$3(HasDataPresenter.java:1062) at com.google.gwt.user.cellview.client.HasDataPresenter$2.execute(HasDataPresenter.java:984) at com.google.gwt.core.client.impl.SchedulerImpl$Task$.executeScheduled$(SchedulerImpl.java:50) at com.google.gwt.core.client.impl.SchedulerImpl.runScheduledTasks(SchedulerImpl.java:228) at com.google.gwt.core.client.impl.SchedulerImpl.flushFinallyCommands(SchedulerImpl.java:327) at com.google.gwt.core.client.impl.Impl.exit(Impl.java:266) at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:257) at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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(Unknown Source)
I'm not sure why it wants to cast a order to a string. I feel there is something fundamental about serialization I'm missing here, can someone point me in the right direction.