Git Product home page Git Product logo

gwt-streamer's Issues

Serialization is not capable to handle recursive structures

What steps will reproduce the problem?
Here is the simplest form of recursion:
ParentBean parent = new ParentBean();
ChildBean child = new ChildBean();
parent.setChild(child);
child.setParent(parent);
String buffer = Streamer.get().toString(parent);

StackOverflow exception occurs.

What is the expected output? What do you see instead?
Expecting parent bean can be serialized and deserialized without exception


What version of the product are you using? On what operating system?
1.0.1 , mac, Chrome browser

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 2 Mar 2013 at 2:11

Error Serializing Arrays with Null Values

What steps will reproduce the problem?
1. Create class A with an array of Strings
2. Create an object of A populating an array where at least one of the strings 
is null
3. Serialize the object on the client

What is the expected output? What do you see instead?
SEVERE: (TypeError) : Cannot read property 'length' of null
com.google.gwt.core.client.JavaScriptException: (TypeError) : Cannot read 
property 'length' of null
    at Unknown.wrap_4_g$(Exceptions.java:36)
    at Unknown.$length_13_g$(String.java:758)
    at Unknown.length__I__devirtual$_1_g$(String.java:757)
    at Unknown.getBytesUtf8_0_g$(String.java:457)
    at Unknown.$getBytes_1_g$(String.java:679)
    at Unknown.getBytes_Ljava_lang_String___B__devirtual$_0_g$(String.java:677)
    at Unknown.writeString_1_g$(Base64PackedStreamFactory.java:202)
    at Unknown.writeString_2_g$(WriteContext.java:250)
    at Unknown.writeObject_16_g$(SimpleArrayStreamers.java:255)
    at Unknown.writeObject_4_g$(WriteContext.java:129)
    at Unknown.writeObjectData_0_g$(StructStreamer.java:46)
    at Unknown.writeObject_2_g$(StructStreamer.java:21)
    at Unknown.writeObject_4_g$(WriteContext.java:129)
    at Unknown.writeObjectData_1_g$(CollectionStreamer.java:38)
    at Unknown.writeObject_5_g$(CollectionStreamer.java:16)
    at Unknown.writeObject_4_g$(WriteContext.java:129)
    at Unknown.writeObjectData_0_g$(StructStreamer.java:46)
    at Unknown.writeObject_2_g$(StructStreamer.java:21)
    at Unknown.writeObject_4_g$(WriteContext.java:129)
    at Unknown.writeObject_1_g$(Streamer.java:259)
    at Unknown.toString_38_g$(Streamer.java:215)
    at Unknown.onSuccess_4_g$(IDocsServiceCacheImpl.java:85)
    at Unknown.onSuccess_5_g$(IDocsServiceCacheImpl.java:83)
    at Unknown.onResponseReceived_0_g$(RequestCallbackAdapter.java:232)
    at Unknown.fireOnResponseReceived_0_g$(Request.java:250)
    at Unknown.onReadyStateChange_0_g$(RequestBuilder.java:412)
    at Unknown.anonymous(XMLHttpRequest.java:329)
    at Unknown.apply_0_g$(Impl.java:247)
    at Unknown.entry0_0_g$(Impl.java:299)
    at Unknown.anonymous(Impl.java:72)


What version of the product are you using? On what operating system?
2.0.0

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 17 Apr 2015 at 8:27

Base64PackedStreamFactory writeString method val param is null throw java.lang.NullPointerException

java.lang.NullPointerException
    at com.googlecode.gwtstreamer.client.impl.Base64PackedStreamFactory$Base64Writer.writeString(Base64PackedStreamFactory.java:199)
    at com.googlecode.gwtstreamer.client.impl.WriteContext.writeString(WriteContext.java:250)
    at com.efounder.gwt.streamer.JResponseObjectStreamer.writeObject(JResponseObjectStreamer.java:30)
    at com.googlecode.gwtstreamer.client.impl.WriteContext.writeObject(WriteContext.java:129)
    at com.googlecode.gwtstreamer.client.Streamer.writeObject(Streamer.java:259)
    at com.googlecode.gwtstreamer.client.Streamer.toString(Streamer.java:215)

Original issue reported on code.google.com by [email protected] on 28 Feb 2015 at 9:25

Usage in GWT client causes build failures

What steps will reproduce the problem?
1. Add gwt-streamer to project/build.
2. Use in GWT client code.

results in failure to build because gwt-streamer uses types not in GWT JRE 
emulation.

So how can one use this in GWT at all?

[ERROR] Errors in 
'jar:file:/C:/Users/david.hoffer/.m2/repository/gwt-streamer/gwt-streamer/1.0/gw
t-streamer-1.0.jar!/com/nkdata/gwt/streamer/client/StreamerFactory.java'
[INFO]          [ERROR] Line 71: No source code is available for type 
java.util.Properties; did you forget to inherit a required module?
[INFO]          [ERROR] Line 78: The method forName(String) is undefined for 
the type Class
[INFO]          [ERROR] Line 85: The method forName(String) is undefined for 
the type Class
[INFO]          [ERROR] Line 86: The method newInstance() is undefined for the 
type Class<capture#7-of ?>
[INFO]          [ERROR] Line 107: The method forName(String) is undefined for 
the type Class
[INFO]          [ERROR] Line 128: The method forName(String) is undefined for 
the type Class
[INFO]          [ERROR] Line 135: The method forName(String) is undefined for 
the type Class
[INFO]          [ERROR] Line 136: The method newInstance() is undefined for the 
type Class<capture#13-of ?>
[INFO]          [ERROR] Line 147: The method forName(String) is undefined for 
the type Class


Original issue reported on code.google.com by [email protected] on 19 Oct 2012 at 5:33

In environments with multiples classloaders may provoke ClassCastException during de-serialization

Some frameworks/servers may resolve Streamer class with the underlying 
classloader during application startup. I don't know why the application 
context classloader loads business classes again instead of delegate to 
underlying classloader. Streamers in shared cache read a server classloader's 
version of class while an application requires them to be loaded with 
application context classloader.

Reference: http://www.28im.com/java/a905853.html.

TODO: review initialization part, remove all shared static attributes, change 
singleton nature to prototype.

Original issue reported on code.google.com by [email protected] on 29 Jan 2015 at 11:06

CustomStreamer throw Exception

1. create a custom Streamer Class
2. regist into config
StreamerConfig config = ...
config.registerStreamer( MyObject.class, new MyCustomStreamer() );
...
Streamer.applyConfig(config);
3. throw exception at runtime, error message following:

TreeMap Caused by: java.lang.ClassCastException: java.lang.Class cannot be cast 
to java.lang.Comparable

because :

private SortedMap<Class<?>,Streamer> registeredStreamers = new 
TreeMap<Class<?>,Streamer>();

TreeMap's key must be Comparable, but Class<?> is not comparable!

instead of 
 private SortedMap<Class<?>,Streamer> registeredStreamers = new TreeMap<Class<?>,Streamer>();

with

private Map<Class<?>, Streamer> registeredStreamers = new 
LinkedHashMap<Class<?>, Streamer>();

fix issues

Original issue reported on code.google.com by [email protected] on 27 Feb 2015 at 3:15

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.