-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Server.stop()
and WebInfConfiguration.deconfigure()
can throw a ClosedFileSystemException
when restoring the original base resource
#10134
Comments
I don't think setting the Resource Base back to the original on deconfigure is needed anymore. Another workaround (until I can test this) is to bind the ResourceFactory resourceFactory = ResourceFactory.of(server); // bound to server lifecycle |
@mvysny If I test your See https://github.com/joakime/vaadin-boot/commits/fix/joakime-main I get a clean build + test with no visible error. |
OK, I was able to replicate. |
What I've learned so far. This is an embedded Jetty scenario. It looks something like this ... CLASSPATH=$APP_HOME/lib/testapp-12.0-SNAPSHOT.jar \
$APP_HOME/lib/vaadin-boot-12.0-SNAPSHOT.jar \
$APP_HOME/lib/jetty-slf4j-impl-12.0.0.jar \
$APP_HOME/lib/vaadin-core-24.1.3.jar \
$APP_HOME/lib/annotations-23.1.0.jar \
$APP_HOME/lib/jetty-ee10-websocket-jakarta-server-12.0.0.jar \
$APP_HOME/lib/jetty-ee10-annotations-12.0.0.jar \
$APP_HOME/lib/jetty-ee10-plus-12.0.0.jar \
$APP_HOME/lib/jetty-ee10-webapp-12.0.0.jar \
$APP_HOME/lib/jetty-ee10-websocket-servlet-12.0.0.jar \
$APP_HOME/lib/jetty-ee10-servlet-12.0.0.jar \
$APP_HOME/lib/jetty-session-12.0.0.jar \
$APP_HOME/lib/jetty-xml-12.0.0.jar \
$APP_HOME/lib/vaadin-core-internal-24.1.3.jar \
$APP_HOME/lib/flow-lit-template-24.1.4.jar \
$APP_HOME/lib/flow-html-components-24.1.4.jar \
$APP_HOME/lib/flow-data-24.1.4.jar \
$APP_HOME/lib/flow-dnd-24.1.4.jar \
$APP_HOME/lib/vaadin-confirm-dialog-flow-24.1.3.jar \
$APP_HOME/lib/vaadin-dev-24.1.3.jar \
$APP_HOME/lib/vaadin-dev-bundle-24.1.3.jar \
$APP_HOME/lib/vaadin-dev-server-24.1.4.jar \
$APP_HOME/lib/flow-server-24.1.4.jar \
$APP_HOME/lib/jetty-security-12.0.0.jar \
$APP_HOME/lib/jetty-websocket-core-server-12.0.0.jar \
$APP_HOME/lib/jetty-server-12.0.0.jar \
$APP_HOME/lib/jetty-ee10-websocket-jakarta-client-12.0.0.jar \
$APP_HOME/lib/jetty-ee10-websocket-jakarta-common-12.0.0.jar \
$APP_HOME/lib/jetty-websocket-core-client-12.0.0.jar \
$APP_HOME/lib/jetty-client-12.0.0.jar \
$APP_HOME/lib/jetty-websocket-core-common-12.0.0.jar \
$APP_HOME/lib/jetty-http-12.0.0.jar \
$APP_HOME/lib/jetty-alpn-client-12.0.0.jar \
$APP_HOME/lib/jetty-io-12.0.0.jar \
$APP_HOME/lib/jetty-jndi-12.0.0.jar \
$APP_HOME/lib/jetty-util-12.0.0.jar \
$APP_HOME/lib/ph-css-7.0.0.jar \
$APP_HOME/lib/flow-push-24.1.4.jar \
$APP_HOME/lib/atmosphere-runtime-3.0.3.slf4jvaadin1.jar \
$APP_HOME/lib/license-checker-1.12.3.jar \
$APP_HOME/lib/directory-watcher-0.18.0.jar \
$APP_HOME/lib/ph-commons-11.0.1.jar \
$APP_HOME/lib/oshi-core-6.4.1.jar \
$APP_HOME/lib/slf4j-api-2.0.7.jar \
$APP_HOME/lib/open-8.5.0.jar \
$APP_HOME/lib/jakarta.websocket-api-2.1.1.jar \
$APP_HOME/lib/flow-commons-upload-24.1.4.jar \
$APP_HOME/lib/commons-io-2.11.0.jar \
$APP_HOME/lib/flow-client-24.1.4.jar \
$APP_HOME/lib/vaadin-lumo-theme-24.1.3.jar \
$APP_HOME/lib/vaadin-material-theme-24.1.3.jar \
$APP_HOME/lib/vaadin-accordion-flow-24.1.3.jar \
$APP_HOME/lib/vaadin-avatar-flow-24.1.3.jar \
$APP_HOME/lib/vaadin-upload-flow-24.1.3.jar \
$APP_HOME/lib/vaadin-app-layout-flow-24.1.3.jar \
$APP_HOME/lib/vaadin-button-flow-24.1.3.jar \
$APP_HOME/lib/vaadin-checkbox-flow-24.1.3.jar \
$APP_HOME/lib/vaadin-combo-box-flow-24.1.3.jar \
$APP_HOME/lib/vaadin-custom-field-flow-24.1.3.jar \
$APP_HOME/lib/vaadin-date-time-picker-flow-24.1.3.jar \
$APP_HOME/lib/vaadin-date-picker-flow-24.1.3.jar \
$APP_HOME/lib/vaadin-details-flow-24.1.3.jar \
$APP_HOME/lib/vaadin-time-picker-flow-24.1.3.jar \
$APP_HOME/lib/vaadin-select-flow-24.1.3.jar \
$APP_HOME/lib/vaadin-side-nav-flow-24.1.3.jar \
$APP_HOME/lib/vaadin-dialog-flow-24.1.3.jar \
$APP_HOME/lib/vaadin-form-layout-flow-24.1.3.jar \
$APP_HOME/lib/vaadin-field-highlighter-flow-24.1.3.jar \
$APP_HOME/lib/vaadin-grid-flow-24.1.3.jar \
$APP_HOME/lib/vaadin-icons-flow-24.1.3.jar \
$APP_HOME/lib/vaadin-virtual-list-flow-24.1.3.jar \
$APP_HOME/lib/vaadin-list-box-flow-24.1.3.jar \
$APP_HOME/lib/vaadin-login-flow-24.1.3.jar \
$APP_HOME/lib/vaadin-messages-flow-24.1.3.jar \
$APP_HOME/lib/vaadin-ordered-layout-flow-24.1.3.jar \
$APP_HOME/lib/vaadin-progress-bar-flow-24.1.3.jar \
$APP_HOME/lib/vaadin-radio-button-flow-24.1.3.jar \
$APP_HOME/lib/vaadin-notification-flow-24.1.3.jar \
$APP_HOME/lib/vaadin-menu-bar-flow-24.1.3.jar \
$APP_HOME/lib/vaadin-context-menu-flow-24.1.3.jar \
$APP_HOME/lib/vaadin-renderer-flow-24.1.3.jar \
$APP_HOME/lib/vaadin-split-layout-flow-24.1.3.jar \
$APP_HOME/lib/vaadin-tabs-flow-24.1.3.jar \
$APP_HOME/lib/vaadin-text-field-flow-24.1.3.jar \
$APP_HOME/lib/jakarta.servlet-api-6.0.0.jar \
$APP_HOME/lib/jakarta.websocket-client-api-2.1.1.jar \
$APP_HOME/lib/jakarta.annotation-api-2.1.1.jar \
$APP_HOME/lib/asm-commons-9.5.jar \
$APP_HOME/lib/asm-tree-9.5.jar \
$APP_HOME/lib/asm-9.5.jar \
$APP_HOME/lib/throw-if-servlet3-1.0.2.jar \
$APP_HOME/lib/gwt-elemental-2.8.2.vaadin2.jar \
$APP_HOME/lib/jackson-annotations-2.15.2.jar \
$APP_HOME/lib/jackson-databind-2.15.2.jar \
$APP_HOME/lib/jackson-core-2.15.2.jar \
$APP_HOME/lib/jsoup-1.16.1.jar \
$APP_HOME/lib/gentyref-1.2.0.vaadin1.jar \
$APP_HOME/lib/commons-compress-1.23.0.jar \
$APP_HOME/lib/httpclient-4.5.14.jar \
$APP_HOME/lib/commons-codec-1.15.jar \
$APP_HOME/lib/vaadin-flow-components-base-24.1.3.jar \
$APP_HOME/lib/commons-lang3-3.12.0.jar \
$APP_HOME/lib/javaparser-core-3.25.3.jar \
$APP_HOME/lib/jakarta.transaction-api-2.0.1.jar \
$APP_HOME/lib/httpcore-4.4.16.jar \
$APP_HOME/lib/commons-logging-1.2.jar \
$APP_HOME/lib/nimbus-jose-jwt-9.31.jar \
$APP_HOME/lib/jcip-annotations-1.0.0.jar \
$APP_HOME/lib/jsr305-3.0.2.jar \
$APP_HOME/lib/jna-platform-5.13.0.jar \
$APP_HOME/lib/jna-5.13.0.jar \
$APP_HOME/resources/
exec java -classpath $CLASSPATH com.example.Main "$@" Once started, a
Upon startup the various WebApp Configurations run and the eventual base resource becomes a Combined Resource of ...
Later, when the
The We should also validate the reference counting going on. |
Server.stop()
and WebInfConfiguration.deconfigure()
can throw a ClosedFileSystemException
when restoring the original base resource
The changes in PR #10147 seem to address this. But more testing needs to occur with how |
Thank you so much for digging into this this deep 🙏 |
Issue was fixed in ad5c298 |
Jetty version(s)
Jetty 12.0.0.beta3
Java version/vendor
(use: java -version)
openjdk version "17.0.7" 2023-04-18
OS type/version
Ubuntu 23.04 x86-64
Description
Creating a resource via
webAppContext.getResourceFactory().newResource(URL)
causes that context to fail to stop/close, with the following exception:Workaround is to use
ResourceFactory.root()
, but this kind of factory never releases the resources until the JDK terminates, so this is not really a viable workaround.How to reproduce?
Thank you 👍
The text was updated successfully, but these errors were encountered: