moberwasserlechner / vaadin-chartjs

Vaadin 8 wrapper for ChartJS v2.x library
MIT License
56 stars 35 forks source link

Use Vaadin Chartjs on a HA environment #42

Closed scipionyx closed 7 years ago

scipionyx commented 7 years ago

HI,

When trying to deploy an application on a HA environment, Vaadin-Chartjs configuration objects complain about non-serializable objects.

Caused by: org.springframework.core.serializer.support.SerializationFailedException: Failed to serialize object using DefaultSerializer; nested exception is java.io.NotSerializableException: com.byteowls.vaadin.chartjs.config.BarChartConfig
    at org.springframework.core.serializer.support.SerializingConverter.convert(SerializingConverter.java:68) ~[spring-core-4.3.6.RELEASE.jar:4.3.6.RELEASE]
    at org.springframework.core.serializer.support.SerializingConverter.convert(SerializingConverter.java:35) ~[spring-core-4.3.6.RELEASE.jar:4.3.6.RELEASE]
    at org.springframework.data.redis.serializer.JdkSerializationRedisSerializer.serialize(JdkSerializationRedisSerializer.java:90) ~[spring-data-redis-1.7.7.RELEASE.jar:na]
    ... 38 common frames omitted
Caused by: java.io.NotSerializableException: com.byteowls.vaadin.chartjs.config.BarChartConfig
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184) ~[na:1.8.0_121]
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548) ~[na:1.8.0_121]
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509) ~[na:1.8.0_121]
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432) ~[na:1.8.0_121]
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178) ~[na:1.8.0_121]
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348) ~[na:1.8.0_121]
    at java.util.HashMap.internalWriteEntries(HashMap.java:1784) ~[na:1.8.0_121]
    at java.util.HashMap.writeObject(HashMap.java:1362) ~[na:1.8.0_121]
    at sun.reflect.GeneratedMethodAccessor123.invoke(Unknown Source) ~[na:na]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121]
    at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1028) ~[na:1.8.0_121]
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496) ~[na:1.8.0_121]
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432) ~[na:1.8.0_121]
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178) ~[na:1.8.0_121]
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548) ~[na:1.8.0_121]
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509) ~[na:1.8.0_121]

Is the system prepared for view serialization ?

scipionyx commented 7 years ago

Fixed, tested on a deve environment, trying tonigh on a near production with 3 nodes. If it works there i will try to send a push request

scipionyx commented 7 years ago

Hi, I have just confirmed, the changes on the code have fixed the problem for a deployment on a HA environment using Docker nodes.

I need some help on pushing the changes, for some reason I don't have the permission for pull request

moberwasserlechner commented 7 years ago

Hi,

it looks like you just did create a branch (feature/feature_42) in your fork (scipionyx/vaadin-chartjs) but didn't pushed something there.

Please check where your remotes pointing to and push your commits to your feature branch.

git remote -v

After that github will let you create the PR.

moberwasserlechner commented 7 years ago

Please see the "How-To" for contributing: https://github.com/moberwasserlechner/vaadin-chartjs#fix-a-bug-or-create-a-new-feature