Note that there are some explanatory texts on larger screens.

plurals
  1. POGwt serialization
    primarykey
    data
    text
    <p>I have a class <code>Data</code> which implements <code>Serializable</code> interface. This class has such fields</p> <pre><code> private boolean q = false; private String a = ""; private List&lt;Someclass&gt; m = Collections.emptyList(); private List&lt;Object[]&gt; d = Collections.emptyList(); </code></pre> <p>Values assigned to these members are default values. Class <code>Someclass</code> also implements <code>Serializable</code> and it has such columns</p> <pre><code> private Types sqlType; private int columnWidth; private String columnName; </code></pre> <p><code>Types</code> is an enum which also implements serializable.</p> <p>In <code>Data</code> class I have <code>List&lt;Object[]&gt; d</code> in which I will save data fethced from database through jdbc(when iterating <code>ResultSet</code> i use <code>getObject()</code> method). I use such construction, because it can run any query(query's structure is not known). In <code>List&lt;Someclass&gt; m</code> I hold metada of query. So when I try to fetch rows with simple query I get</p> <pre><code>com.google.gwt.user.client.rpc.SerializationException: Type '[Ljava.lang.Object;' 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 = [Ljava.lang.Object;@127053a9 </code></pre> <p>Why it occures? All my transfer objects are serializable.</p> <p><strong>edit</strong> Ok, <code>Object</code> is not Serializable so it can not be passed to and returned from the server. But what I should use in this case. Generics will not help me, because I don't know the type at compile time</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.
 

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