Skip to content

Exception when shutting down server #73

@Artur-

Description

@Artur-

Describe the bug
Whenever the server (Jetty) is shut down, the following is reported in the platform build:

java.lang.IllegalStateException: Cannot access state in VaadinSession or UI without locking the session.
    at com.vaadin.flow.server.VaadinSession.checkHasLock (VaadinSession.java:575)
    at com.vaadin.flow.server.VaadinSession.checkHasLock (VaadinSession.java:589)
    at com.vaadin.flow.internal.StateTree.checkHasLock (StateTree.java:432)
    at com.vaadin.flow.internal.StateTree.beforeClientResponse (StateTree.java:362)
    at com.vaadin.flow.component.UI.beforeClientResponse (UI.java:1281)
    at com.vaadin.flow.component.avatar.AvatarGroup.lambda$setClientItems$2f364bb9$2 (AvatarGroup.java:527)
    at com.vaadin.flow.internal.StateNode.runWhenAttached (StateNode.java:895)
    at com.vaadin.flow.component.avatar.AvatarGroup.setClientItems (AvatarGroup.java:526)
    at com.vaadin.flow.component.avatar.AvatarGroup.setItems (AvatarGroup.java:510)
    at com.vaadin.collaborationengine.CollaborationAvatarGroup.refreshItems (CollaborationAvatarGroup.java:248)
    at com.vaadin.collaborationengine.CollaborationAvatarGroup.lambda$setTopic$93c5f580$1 (CollaborationAvatarGroup.java:160)
    at com.vaadin.collaborationengine.PresenceManager.removeRegistration (PresenceManager.java:248)
    at java.util.LinkedHashMap$LinkedValues.forEach (LinkedHashMap.java:655)
    at com.vaadin.collaborationengine.PresenceManager.resetEntries (PresenceManager.java:259)
    at com.vaadin.collaborationengine.PresenceManager.onConnectionDeactivate (PresenceManager.java:194)
    at java.util.Arrays$ArrayList.forEach (Arrays.java:4204)
    at com.vaadin.flow.shared.Registration.lambda$combine$938b0efe$1 (Registration.java:84)
    at com.vaadin.collaborationengine.EventUtil.fireEvents (EventUtil.java:60)
    at com.vaadin.collaborationengine.TopicConnection.deactivate (TopicConnection.java:558)
    at com.vaadin.collaborationengine.TopicConnection.deactivateAndClose (TopicConnection.java:548)
    at com.vaadin.collaborationengine.TopicConnectionRegistration.remove (TopicConnectionRegistration.java:95)
    at com.vaadin.collaborationengine.CollaborationEngine.clearConnections (CollaborationEngine.java:322)
    at com.vaadin.collaborationengine.CollaborationEngine.lambda$configure$19d34419$1 (CollaborationEngine.java:264)
    at com.vaadin.flow.server.VaadinService.lambda$destroy$6 (VaadinService.java:2079)
    at java.util.concurrent.ConcurrentHashMap$KeySetView.forEach (ConcurrentHashMap.java:4709)
    at java.util.Collections$SetFromMap.forEach (Collections.java:5708)
    at com.vaadin.flow.server.VaadinService.destroy (VaadinService.java:2079)
    at com.vaadin.flow.server.VaadinServlet.destroy (VaadinServlet.java:628)
    at org.eclipse.jetty.servlet.ServletHolder.destroyInstance (ServletHolder.java:455)
    at org.eclipse.jetty.servlet.ServletHolder.doStop (ServletHolder.java:432)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.stop (AbstractLifeCycle.java:132)
    at org.eclipse.jetty.servlet.ServletHandler.doStop (ServletHandler.java:282)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.stop (AbstractLifeCycle.java:132)

To Reproduce
Run vaadin-platform-test in https://github.com/vaadin/platform

Expected behavior
Nothing illegal is done during shutdown

Versions
- Vaadin version: 24 beta 5
- Collaboration Engine version: 6.0.0.beta1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions