JavaFx. Cannot deserialize PagedQuery's PageInfo at server side

27 views
Skip to first unread message

Y Borys

unread,
Mar 23, 2015, 4:01:00 PM3/23/15
to gran...@googlegroups.com
I am getting error at server side in PageInfo.readExternal method (PagedQuery with sort only, JavaFx client)
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
 firstResult
= (Integer)in.readObject();
 maxResults
= (Integer)in.readObject();
 
Object[] oorder = (Object[])in.readObject(); // Successfully: String['curentFirstName']
 
Object[] odesc = (Object[])in.readObject(); // Error :( supposed to be boolean[false] or [false]
....
Error
SEVERE: Servlet.service() for servlet [dispatcher] in context with path [/server] threw exception [java.lang.ClassCastException: [Z cannot be cast to [Ljava.lang.Object;] with root cause
java
.lang.ClassCastException: [Z cannot be cast to [Ljava.lang.Object;
 at org
.granite.tide.data.model.PageInfo.readExternal(PageInfo.java:88)
 at org
.granite.messaging.jmf.codec.std.impl.ObjectCodecImpl.decode(ObjectCodecImpl.java:177)
 at org
.granite.messaging.jmf.JMFDeserializer.readObject(JMFDeserializer.java:130)
 at org
.granite.messaging.jmf.codec.std.impl.ObjectArrayCodecImpl.readObjectArray0(ObjectArrayCodecImpl.java:215)
 
.....
Same server configuration works well (without this error) with similar flex application (except with AdvancedDataGrid, i described in another post - Flex PagedQuery does not perform sort with AdvancedDataGrid )

I use default TableViewSortAdapter to link tableView with PagedQuery
personQuery.setSortAdapter(new TableViewSortAdapter<Person>(personTable, Person.class));

Does anyone had similar problem?

GDS version 3.1.1.GA, jdk1.8.0_25, Windows 7x64.
Thanks

Y Borys

unread,
Mar 24, 2015, 11:39:12 AM3/24/15
to gran...@googlegroups.com
Actualy, i rebuild granite-client-javafx and granite-client-javafx-advanced libraries to OSGi bundles. Probably i used some old dependency libs.
Is any dependency libraries used in serialization-deserialization process? 

Y Borys

unread,
Mar 24, 2015, 1:20:30 PM3/24/15
to gran...@googlegroups.com
When i switch to AMF chanel - error in gone )))

serverSession.setChannelFactoryClass(AMFChannelFactory.class);

But anyway i will appreciate if someone can help with JMF serialization of primitive array (boolean array).
Reply all
Reply to author
Forward
0 new messages