adessoSE / wicked-charts

Beautiful and interactive javascript charts for Java-based web applications.
Apache License 2.0
91 stars 48 forks source link

chartjs-wrapper-3.1 - Color class does not implement serialisable #175

Closed pvidhey9 closed 5 years ago

pvidhey9 commented 5 years ago

Currently using chart-js-wrapper version 3.1.0 in which the Color class does not implement serialisable

As a workaround, I extended the color class and implemented serialisable. The application runs fine in sequential manner. But in browser, on clicking back button, wicket application throws an error requesting for Parent color class to implement serialisable. Any suggestions for workaround? Or it would be great if you could release the latest version of the chart-js.wrapper with the changes. Any timeline specified? Really appreciate if you could help in this

RgbColorSerial is my local class that extends serialisable Error log: java.lang.RuntimeException: Could not deserialize object from byte[] at org.apache.wicket.serialize.java.JavaSerializer.deserialize(JavaSerializer.java:143) Caused by: java.io.InvalidClassException: com.alcatel.ngna.optical.gui.network.statistics.charts.RgbColorSerial; no valid constructor

maximAtanasov commented 5 years ago

Hello @pvidhey9, this issue has already been fixed in the latest snapshot release. It would be great if you could try it out and see if you still have issues. How to use it for both Maven and Gradle is specified at the bottom of our Readme.

pvidhey9 commented 5 years ago

Hi @maximAtanasov Thanks for the immediate response. You mentioned at the bottom to import the latest SNAPSHOT release(3.2.0), but it looks like it is not available in the maven repo. Also am using wicket 6 in my application, and the snapshot refers to wicket8. And I believe Color class is part of chartjs-wrapper package if am sure. Am I missing something here? If so,how do I get the corresponding change?

maximAtanasov commented 5 years ago

The snapshot is available at the following repo: https://oss.jfrog.org/artifactory/oss-snapshot-local. You should be able to use in your pom by addidng the following to the repositories block:

<repository>
      <id>snapshots-repo</id>
      <name>snapshots</name>
      <url>https://oss.jfrog.org/artifactory/oss-snapshot-local</url>
</repository>

Have a look at this page for an example: https://maven.apache.org/guides/mini/guide-multiple-repositories.html.

You can then just add the dependency like this:

<dependency>
  <groupId>de.adesso.wicked-charts</groupId>
  <artifactId>wicked-charts-wicket6</artifactId>
  <version>3.2.0-SNAPSHOT</version>
  <type>pom</type>
</dependency>

Hope this helps.

pvidhey9 commented 5 years ago

My bad for missing out on the repo, Thanks so much for pointing to the right one! This really helps 👍

pvidhey9 commented 5 years ago

Will import and check the same in my application and get back to you about the status!

maximAtanasov commented 5 years ago

@pvidhey9 I will close this issue if the problem has been resolved for you :)