Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vaadin Flow Spreadsheet brakes serialization #6612

Closed
AndriiRevaEpicor opened this issue Sep 5, 2024 · 3 comments
Closed

Vaadin Flow Spreadsheet brakes serialization #6612

AndriiRevaEpicor opened this issue Sep 5, 2024 · 3 comments
Labels
known issue Known issue that can't be easily fixed refactor Internal improvement requires new major This would be a breaking change vaadin-spreadsheet wontfix This will not be worked on

Comments

@AndriiRevaEpicor
Copy link

AndriiRevaEpicor commented Sep 5, 2024

Description

When we want to use Session replication using by Vaadin along with kubernetes-kit and Vaadin Flow Spreadsheet then the issue will occur that SpreadsheetHandlerImpl.java doesn't serializable.

Added link to a test project which help to reproduce this issue.

Stacktrace which describe the issue was added to the project and here as well. (non_serializable_issue_logs.txt)

Expected outcome

I'd like to expect that Vaadin Flow Spreadsheet is fully serializable that I can use it along with Session replication.

Minimal reproducible example

@Route
public class MainView extends VerticalLayout {

    private transient final Spreadsheet spreadsheet = new Spreadsheet();

    public MainView() {
        this.add(this.spreadsheet);
    }
}

Steps to reproduce

  1. Run application with two VM options to make sure that serializable logs shows: --add-opens java.base/java.io=ALL-UNNAMED -Dsun.io.serialization.extendedDebugInfo=true
  2. Check application logs and make sure that stacktrace the same as I attached to this github issue - (non_serializable_issue_logs.txt).

Environment

Vaadin version(s): 24.4.11
Kubernetes Kit version: 2.2.2
OS: Windows 11

Browsers

Issue is not browser related

@AndriiRevaEpicor AndriiRevaEpicor changed the title Vaadin Spreadsheet Flow brakes serialization Vaadin Flow Spreadsheet brakes serialization Sep 5, 2024
@sissbruecker
Copy link
Contributor

That is a know limitation of the component: https://vaadin.com/docs/latest/components/spreadsheet#limitations

@TatuLund
Copy link
Contributor

TatuLund commented Sep 6, 2024

I did some exploration on this. By introducing Serializable wrappers for the classes maintained in Spreadsheet state such as cell reference and cell range, making WeakHashMaps transients, Workbook etc. It could be possible to make it work. It may introduce breaking change. Especially that Workbook being transient and lost during serialization, so there should be a new API to set provider function for it or some other approach.

But Workbook being transient means that the burden for the user of Spreadsheet is not significantly different of making the whole Spreadsheet transient and re-create if is null after serialization.

@yuriy-fix yuriy-fix added requires new major This would be a breaking change refactor Internal improvement known issue Known issue that can't be easily fixed vaadin-spreadsheet labels Sep 12, 2024
@TatuLund TatuLund added the wontfix This will not be worked on label Feb 12, 2025
@TatuLund
Copy link
Contributor

I am proposing to close this ticket as wontfix, as the problem is tackled with UnserializableComponentWrapper included in Kubernetes Kit version 2.4.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
known issue Known issue that can't be easily fixed refactor Internal improvement requires new major This would be a breaking change vaadin-spreadsheet wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

4 participants