I'm wondering why the B4J Serializator cannot serialize a Google Map Marker to Bytes but the B4i Serializator can serialize it.
For example if I have the following test code snippet:
Dim m As Marker
m=gmap.AddMarker(0,0,"D")
mqtt.Publish(mytopic, serializator.ConvertObjectToBytes(m))
I get the following exception in B4J but it works fine in B4I:
main._btnpublish_click (java line: 300)
java.lang.RuntimeException: Cannot serialize object: com.lynden.gmapsfx.javascript.object.Marker@50758e36
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeType(B4XSerializator.java:258)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeObject(B4XSerializator.java:224)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.WriteObject(B4XSerializator.java:104)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.ConvertObjectToBytes(B4XSerializator.java:62)
at com.praxsoft.b4j.BoatMate.main._btnpublish_click(main.java:300)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:90)
at anywheresoftware.b4a.BA$1.run(BA.java:215)
at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$147(WinApplication.java:177)
at java.lang.Thread.run(Thread.java:748)
For example if I have the following test code snippet:
Dim m As Marker
m=gmap.AddMarker(0,0,"D")
mqtt.Publish(mytopic, serializator.ConvertObjectToBytes(m))
I get the following exception in B4J but it works fine in B4I:
main._btnpublish_click (java line: 300)
java.lang.RuntimeException: Cannot serialize object: com.lynden.gmapsfx.javascript.object.Marker@50758e36
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeType(B4XSerializator.java:258)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.writeObject(B4XSerializator.java:224)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.WriteObject(B4XSerializator.java:104)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.ConvertObjectToBytes(B4XSerializator.java:62)
at com.praxsoft.b4j.BoatMate.main._btnpublish_click(main.java:300)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:90)
at anywheresoftware.b4a.BA$1.run(BA.java:215)
at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$147(WinApplication.java:177)
at java.lang.Thread.run(Thread.java:748)