Trying to use livereload but always need to compile

hi. i’m trying to use live-reload
i’ve download jetbrains, jdk,
install hotswap agent
launched jetty:run from intellij in debug launcher
enabled auto compile as well as compile even with application running
i get the log

HOTSWAP AGENT: 10:02:20.082 INFO (org.hotswap.agent.config.PluginRegistry) - Plugin 'org.hotswap.agent.plugin.jetty.JettyPlugin' initialized in ClassLoader 'WebAppClassLoader{2118050088}@7e3ee128'.
HOTSWAP AGENT: 10:02:20.083 ERROR (org.hotswap.agent.plugin.jetty.JettyPlugin) - Unable to load ContextHandler class from contextHandler o.e.j.m.p.MavenWebAppContext@27d73d22{/,[file:///C:/Dev/VaadinApp/src/main/webapp/],STARTING}{file:///C:/Dev/VaadinApp/src/main/webapp/} classloader

but after a while i get

HOTSWAP AGENT: 10:02:22.398 INFO (org.hotswap.agent.watch.nio.TreeWatcherNIO) - Registering directory C:\Dev\VaadinApp\target\classes 
HOTSWAP AGENT: 10:02:22.399 INFO (org.hotswap.agent.config.PluginRegistry) - Plugin 'org.hotswap.agent.plugin.vaadin.VaadinPlugin' initialized in ClassLoader 'WebAppClassLoader{2118050088}@7e3ee128'.
HOTSWAP AGENT: 10:02:22.400 INFO (org.hotswap.agent.plugin.vaadin.VaadinIntegration) - class org.hotswap.agent.plugin.vaadin.VaadinIntegration initialized for servlet com.vaadin.flow.server.VaadinServlet@5b29d699

when i press save, i see auto make run and log being updated
HOTSWAP AGENT: 10:08:31.031 INFO (org.hotswap.agent.plugin.vaadin.VaadinIntegration) - Updating route 'MainForm' to class org.example.MainView
but not changes are being refresh
only when i click Recompile i get annoying message in intellij
“some classes have been changed, reload classes?”
but then in the logs i see
HOTSWAP AGENT: 10:19:02.166 ERROR (org.hotswap.agent.plugin.jdk.JdkPlugin) - classReload() exception class java.io.ObjectStreamClass$Caches$1 cannot be cast to class java.util.Map (java.io.ObjectStreamClass$Caches$1 and java.util.Map are in module java.base of loader ‘bootstrap’).

HOTSWAP AGENT: 10:19:02.166 ERROR (org.hotswap.agent.plugin.jdk.JdkPlugin) - classReload() exception class java.io.ObjectStreamClass$Caches$1 cannot be cast to class java.util.Map (java.io.ObjectStreamClass$Caches$1 and java.util.Map are in module java.base of loader 'bootstrap').
HOTSWAP AGENT: 10:19:02.167 ERROR (org.hotswap.agent.plugin.jdk.JdkPlugin) - classReload() exception No such field java.beans.Introspector.declaredMethodCache on null.
HOTSWAP AGENT: 10:19:03.271 INFO (org.hotswap.agent.plugin.vaadin.VaadinIntegration) - Live reload triggered

is this how it meant to work?

Hi Elhanan.
I give this a try, what I did was the following:

  1. I downloaded and installed the JBR (vanilla) from here
  2. I downloaded the latest release of Hotswap agent jar from here and I placed the jar in the directory <JBR-install-directory>/lib/hotswap (I had to create the folder “hotswap” because it didn’t exist)
  3. I configured my IDE (in my case it was Eclipse) to use that JDK.
  4. I configured my run configuration so it added the following JVM parameters: -XX:+AllowEnhancedClassRedefinition -XX:HotswapAgent=fatjar
  5. I started my Vaadin 24 app (by executing mvn jetty:run), and I saw the following messages at the beginning of the log:
HOTSWAP AGENT: 15:56:08.573 INFO (org.hotswap.agent.HotswapAgent) - Loading Hotswap agent {1.4.2-SNAPSHOT} - unlimited runtime class redefinition.
HOTSWAP AGENT: 15:56:08.807 INFO (org.hotswap.agent.config.PluginRegistry) - Discovered plugins: [WatchResources, ClassInitPlugin, AnonymousClassPatch, Hotswapper, JdkPlugin, Hibernate, HibernateJakarta, Hibernate3, Hibernate3JPA, Spring, SpringBoot, Jersey1, Jersey2, Jetty, Tomcat, ZK, Logback, Log4j2, MyFaces, Mojarra, Omnifaces, ELResolver, WildFlyELResolver, OsgiEquinox, Owb, OwbJakarta, Proxy, WebObjects, Weld, WeldJakarta, JBossModules, ResteasyRegistry, Deltaspike, GlassFish, Weblogic, Vaadin, Wicket, CxfJAXRS, FreeMarker, Undertow, MyBatis, IBatis, JacksonPlugin, Idea, Thymeleaf, Velocity]
Starting HotswapAgent '/Library/Java/JavaVirtualMachines/jbr-17.0.10-osx-aarch64-b829.27/Contents/Home/lib/hotswap/hotswap-agent.jar'
[INFO] Scanning for projects...
...
  1. I see “Java live reload available: HotswapAgent” in my Vaadin dev gizmo at the bottom right.

image

  1. I added a new method in my class, and I saw some errors in the log, but the application restarted and I was able to see the changes in the browser

Did you do something different?

Regards.

1 Like

well… i download jbr directly from interllij , and initially i used agent 1.4.1 now i’m using the snapshot version, everything else as you said:
while i’m not seeing the life reload message in the log tab, i am seeing this:

In my case I see the following:

image

So that means that in your case hotswapagent is not properly configured.

How are you launching the application? by running the main Application class or by using maven? … did you add the -XX:+AllowEnhancedClassRedefinition -XX:HotswapAgent=fatjar parameters to the JVM?

The first line that I see in the log is the following:

HOTSWAP AGENT: 10:07:36.538 INFO (org.hotswap.agent.HotswapAgent) - Loading Hotswap agent {1.4.2-SNAPSHOT} - unlimited runtime class redefinition.

Are you also observing something like that in your log?

Regards

this is the full log

C:\Users\User\.jdks\jbr_jcef-17.0.10-windows-x64-b1087.23\bin\java.exe -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:53961,suspend=y,server=n -Dmaven.multiModuleProjectDirectory=C:\Dev\VaadinApp -Djansi.passthrough=true -XX:+AllowEnhancedClassRedefinition -XX:HotswapAgent=fatjar -Dvaadin.liveReloadQuietTime=2000 "-Xlog:redefine+class*=info" "-Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2023.1\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2023.1\plugins\maven\lib\maven3\bin\m2.conf" "-Dmaven.ext.class.path=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2023.1\plugins\maven\lib\maven-event-listener.jar" -javaagent:C:\Users\User\AppData\Local\JetBrains\IdeaIC2023.1\captureAgent\debugger-agent.jar -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2023.1\plugins\maven\lib\maven3\boot\plexus-classworlds-2.6.0.jar;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2023.1\plugins\maven\lib\maven3\boot\plexus-classworlds.license;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2023.1\lib\idea_rt.jar" org.codehaus.classworlds.Launcher -Didea.version=2023.1.6 jetty:run
Connected to the target VM, address: '127.0.0.1:53961', transport: 'socket'
HOTSWAP AGENT: 09:43:52.948 INFO (org.hotswap.agent.HotswapAgent) - Loading Hotswap agent {1.4.2-SNAPSHOT} - unlimited runtime class redefinition.
HOTSWAP AGENT: 09:43:53.210 INFO (org.hotswap.agent.config.PluginRegistry) - Discovered plugins: [WatchResources, ClassInitPlugin, AnonymousClassPatch, Hotswapper, JdkPlugin, Hibernate, HibernateJakarta, Hibernate3, Hibernate3JPA, Spring, SpringBoot, Jersey1, Jersey2, Jetty, Tomcat, ZK, Logback, Log4j2, MyFaces, Mojarra, Omnifaces, ELResolver, WildFlyELResolver, OsgiEquinox, Owb, OwbJakarta, Proxy, WebObjects, Weld, WeldJakarta, JBossModules, ResteasyRegistry, Deltaspike, GlassFish, Weblogic, Vaadin, Wicket, CxfJAXRS, FreeMarker, Undertow, MyBatis, IBatis, JacksonPlugin, Idea, Thymeleaf, Velocity]
Starting HotswapAgent 'C:\Users\User\.jdks\jbr_jcef-17.0.10-windows-x64-b1087.23\lib\hotswap\hotswap-agent.jar'
[INFO] Scanning for projects...
[INFO] 
[INFO] -----------------------< org.example:VaadinApp >------------------------
[INFO] Building My Application 1.0-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO] 
[INFO] >>> jetty-maven-plugin:11.0.14:run (default-cli) > test-compile @ VaadinApp >>>
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ VaadinApp ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- vaadin-maven-plugin:24.3.6:prepare-frontend (default) @ VaadinApp ---
[INFO] The globally installed Node.js version 10.15.3 is older than the required minimum version 18.0.0. Using Node.js from C:\Users\User\.vaadin.
[INFO] Reflections took 838 ms to scan 89 urls, producing 2207 keys and 12065 values
[INFO] Copying frontend resources from jar files ...
[INFO] Visited 89 resources. Took 170 ms.
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ VaadinApp ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ VaadinApp ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Dev\VaadinApp\src\test\resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ VaadinApp ---
[INFO] No sources to compile
[INFO] 
[INFO] <<< jetty-maven-plugin:11.0.14:run (default-cli) < test-compile @ VaadinApp <<<
[INFO] 
[INFO] 
[INFO] --- jetty-maven-plugin:11.0.14:run (default-cli) @ VaadinApp ---
[INFO] Configuring Jetty for project: My Application
[INFO] Classes = C:\Dev\VaadinApp\target\classes
[INFO] Context path = /
[INFO] Tmp directory = C:\Dev\VaadinApp\target\tmp
[INFO] web.xml file = null
[INFO] Webapp directory = C:\Dev\VaadinApp\src\main\webapp
[INFO] Web defaults = org/eclipse/jetty/webapp/webdefault.xml
[INFO] Web overrides =  none
[INFO] jetty-11.0.14; built: 2023-02-22T23:41:48.575Z; git: 4601fe8dd805ce75b69c64466c115a162586641b; jvm 17.0.10+1-b1087.23
HOTSWAP AGENT: 09:44:12.137 INFO (org.hotswap.agent.config.PluginRegistry) - Plugin 'org.hotswap.agent.plugin.jetty.JettyPlugin' initialized in ClassLoader 'WebAppClassLoader{1810953994}@6bf0f70a'.
HOTSWAP AGENT: 09:44:12.138 ERROR (org.hotswap.agent.plugin.jetty.JettyPlugin) - Unable to load ContextHandler class from contextHandler o.e.j.m.p.MavenWebAppContext@2abedbbd{/,[file:///C:/Dev/VaadinApp/src/main/webapp/],STARTING}{file:///C:/Dev/VaadinApp/src/main/webapp/} classloader
[INFO] Initializing AtmosphereFramework
HOTSWAP AGENT: 09:44:13.269 INFO (org.hotswap.agent.config.PluginRegistry) - Plugin 'org.hotswap.agent.plugin.jackson.JacksonPlugin' initialized in ClassLoader 'WebAppClassLoader{1810953994}@6bf0f70a'.
[main] INFO com.vaadin.base.devserver.startup.DevModeStartupListener - Starting dev-mode updaters in C:\Dev\VaadinApp folder.
[main] INFO com.vaadin.flow.server.frontend.scanner.FullDependenciesScanner - Visited 108 classes. Took 45 ms.
[main] INFO com.vaadin.flow.server.frontend.BundleValidationUtil - Checking if a development mode bundle build is needed
[main] INFO com.vaadin.flow.server.frontend.BundleValidationUtil - A development mode bundle build is not needed
[ForkJoinPool.commonPool-worker-8] INFO com.vaadin.flow.server.frontend.TaskCopyFrontendFiles - Copying frontend resources from jar files ...
[INFO] Session workerName=node0
HOTSWAP AGENT: 09:44:14.596 INFO (org.hotswap.agent.plugin.vaadin.VaadinPlugin) - Initialized Vaadin plugin
[main] INFO com.vaadin.flow.server.startup.ServletDeployer - Automatically deploying Vaadin servlet with name com.vaadin.flow.server.startup.ServletDeployer to /*
[main] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereHandler com.vaadin.flow.server.communication.PushAtmosphereHandler mapped to context-path: /*
[main] INFO org.atmosphere.cpr.AtmosphereFramework - Installed the following AtmosphereInterceptor mapped to AtmosphereHandler com.vaadin.flow.server.communication.PushAtmosphereHandler
[main] INFO org.atmosphere.cpr.AtmosphereFramework - Atmosphere is using org.atmosphere.util.VoidAnnotationProcessor for processing annotation
[main] INFO org.atmosphere.util.ForkJoinPool - Using ForkJoinPool  java.util.concurrent.ForkJoinPool. Set the org.atmosphere.cpr.broadcaster.maxAsyncWriteThreads to -1 to fully use its power.
[main] INFO org.atmosphere.cpr.AtmosphereFramework - Installed WebSocketProtocol org.atmosphere.websocket.protocol.SimpleHttpProtocol 
[main] INFO org.atmosphere.container.JSR356AsyncSupport - JSR 356 Mapping path /VAADIN/push
[main] INFO org.atmosphere.cpr.AtmosphereFramework - Installing Default AtmosphereInterceptors
[main] INFO org.atmosphere.cpr.AtmosphereFramework - 	org.atmosphere.interceptor.CorsInterceptor : CORS Interceptor Support
[main] INFO org.atmosphere.cpr.AtmosphereFramework - 	org.atmosphere.interceptor.CacheHeadersInterceptor : Default Response's Headers Interceptor
[main] INFO org.atmosphere.cpr.AtmosphereFramework - 	org.atmosphere.interceptor.PaddingAtmosphereInterceptor : Browser Padding Interceptor Support
[main] INFO org.atmosphere.cpr.AtmosphereFramework - 	org.atmosphere.interceptor.AndroidAtmosphereInterceptor : Android Interceptor Support
[main] INFO org.atmosphere.cpr.AtmosphereFramework - 	org.atmosphere.interceptor.HeartbeatInterceptor : Heartbeat Interceptor Support
[main] INFO org.atmosphere.cpr.AtmosphereFramework - 	org.atmosphere.interceptor.SSEAtmosphereInterceptor : SSE Interceptor Support
[main] INFO org.atmosphere.cpr.AtmosphereFramework - 	org.atmosphere.interceptor.JSONPAtmosphereInterceptor : JSONP Interceptor Support
[main] INFO org.atmosphere.cpr.AtmosphereFramework - 	org.atmosphere.interceptor.JavaScriptProtocol : Atmosphere JavaScript Protocol
[main] INFO org.atmosphere.cpr.AtmosphereFramework - 	org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor : org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor
[main] INFO org.atmosphere.cpr.AtmosphereFramework - 	org.atmosphere.interceptor.OnDisconnectInterceptor : Browser disconnection detection
[main] INFO org.atmosphere.cpr.AtmosphereFramework - 	org.atmosphere.interceptor.IdleResourceInterceptor : org.atmosphere.interceptor.IdleResourceInterceptor
[main] INFO org.atmosphere.cpr.AtmosphereFramework - Set org.atmosphere.cpr.AtmosphereInterceptor.disableDefaults to disable them.
[main] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor CORS Interceptor Support with priority FIRST_BEFORE_DEFAULT 
[main] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor Default Response's Headers Interceptor with priority AFTER_DEFAULT 
[main] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor Browser Padding Interceptor Support with priority AFTER_DEFAULT 
[main] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor Android Interceptor Support with priority AFTER_DEFAULT 
[main] INFO org.atmosphere.interceptor.HeartbeatInterceptor - HeartbeatInterceptor configured with padding value 'X', client frequency 0 seconds and server frequency 60 seconds
[main] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor Heartbeat Interceptor Support with priority AFTER_DEFAULT 
[main] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor SSE Interceptor Support with priority AFTER_DEFAULT 
[main] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor JSONP Interceptor Support with priority AFTER_DEFAULT 
[main] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor Atmosphere JavaScript Protocol with priority AFTER_DEFAULT 
[main] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor org.atmosphere.interceptor.WebSocketMessageSuspendInterceptor with priority AFTER_DEFAULT 
[main] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor Browser disconnection detection with priority AFTER_DEFAULT 
[main] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor org.atmosphere.interceptor.IdleResourceInterceptor with priority BEFORE_DEFAULT 
[main] INFO org.atmosphere.cpr.AtmosphereFramework - Using EndpointMapper class org.atmosphere.util.DefaultEndpointMapper
[main] INFO org.atmosphere.cpr.AtmosphereFramework - Using BroadcasterCache: org.atmosphere.cache.UUIDBroadcasterCache
[main] INFO org.atmosphere.cpr.AtmosphereFramework - Default Broadcaster Class: org.atmosphere.cpr.DefaultBroadcaster
[main] INFO org.atmosphere.cpr.AtmosphereFramework - Broadcaster Shared List Resources: false
[main] INFO org.atmosphere.cpr.AtmosphereFramework - Broadcaster Polling Wait Time 100
[main] INFO org.atmosphere.cpr.AtmosphereFramework - Shared ExecutorService supported: true
[main] INFO org.atmosphere.cpr.AtmosphereFramework - Messaging ExecutorService Pool Size unavailable - Not instance of ThreadPoolExecutor
[main] INFO org.atmosphere.cpr.AtmosphereFramework - Async I/O Thread Pool Size: 200
[main] INFO org.atmosphere.cpr.AtmosphereFramework - Using BroadcasterFactory: org.atmosphere.cpr.DefaultBroadcasterFactory
[main] INFO org.atmosphere.cpr.AtmosphereFramework - Using AtmosphereResurceFactory: org.atmosphere.cpr.DefaultAtmosphereResourceFactory
[main] INFO org.atmosphere.cpr.AtmosphereFramework - Using WebSocketProcessor: org.atmosphere.websocket.DefaultWebSocketProcessor
[main] INFO org.atmosphere.cpr.AtmosphereFramework - Invoke AtmosphereInterceptor on WebSocket message true
[main] INFO org.atmosphere.cpr.AtmosphereFramework - HttpSession supported: true
[main] INFO org.atmosphere.cpr.AtmosphereFramework - Atmosphere is using DefaultAtmosphereObjectFactory for dependency injection and object creation
[main] INFO org.atmosphere.cpr.AtmosphereFramework - Atmosphere is using async support: org.atmosphere.container.JSR356AsyncSupport running under container: jetty/11.0.14 using jakarta.servlet/3.0 and jsr356/WebSocket API
[main] INFO org.atmosphere.cpr.AtmosphereFramework - Atmosphere Framework 3.0.3.slf4jvaadin2 started.
[main] INFO org.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereInterceptor  Track Message Size Interceptor using | with priority BEFORE_DEFAULT 
HOTSWAP AGENT: 09:44:14.793 INFO (org.hotswap.agent.watch.nio.TreeWatcherNIO) - Registering directory C:\Dev\VaadinApp\target\classes 
HOTSWAP AGENT: 09:44:14.796 INFO (org.hotswap.agent.config.PluginRegistry) - Plugin 'org.hotswap.agent.plugin.vaadin.VaadinPlugin' initialized in ClassLoader 'WebAppClassLoader{1810953994}@6bf0f70a'.
HOTSWAP AGENT: 09:44:14.797 INFO (org.hotswap.agent.plugin.vaadin.VaadinIntegration) - class org.hotswap.agent.plugin.vaadin.VaadinIntegration initialized for servlet com.vaadin.flow.server.VaadinServlet@5466a819
[main] INFO com.vaadin.flow.server.DefaultDeploymentConfiguration - 
Vaadin is running in DEVELOPMENT mode - do not use for production deployments.
[INFO] Started o.e.j.m.p.MavenWebAppContext@2abedbbd{/,[file:///C:/Dev/VaadinApp/src/main/webapp/, jar:file:///C:/Users/User/.m2/repository/com/vaadin/vaadin-menu-bar-flow/24.3.6/vaadin-menu-bar-flow-24.3.6.jar!/META-INF/resources, jar:file:///C:/Users/User/.m2/repository/com/vaadin/vaadin-flow-components-base/24.3.6/vaadin-flow-components-base-24.3.6.jar!/META-INF/resources, jar:file:///C:/Users/User/.m2/repository/com/vaadin/vaadin-date-picker-flow/24.3.6/vaadin-date-picker-flow-24.3.6.jar!/META-INF/resources, jar:file:///C:/Users/User/.m2/repository/com/vaadin/vaadin-time-picker-flow/24.3.6/vaadin-time-picker-flow-24.3.6.jar!/META-INF/resources, jar:file:///C:/Users/User/.m2/repository/com/vaadin/vaadin-grid-flow/24.3.6/vaadin-grid-flow-24.3.6.jar!/META-INF/resources, jar:file:///C:/Users/User/.m2/repository/com/vaadin/vaadin-combo-box-flow/24.3.6/vaadin-combo-box-flow-24.3.6.jar!/META-INF/resources, jar:file:///C:/Users/User/.m2/repository/com/vaadin/flow-push/24.3.6/flow-push-24.3.6.jar!/META-INF/resources, jar:file:///C:/Users/User/.m2/repository/com/vaadin/vaadin-text-field-flow/24.3.6/vaadin-text-field-flow-24.3.6.jar!/META-INF/resources, jar:file:///C:/Users/User/.m2/repository/com/vaadin/vaadin-renderer-flow/24.3.6/vaadin-renderer-flow-24.3.6.jar!/META-INF/resources, jar:file:///C:/Users/User/.m2/repository/com/vaadin/flow-dnd/24.3.6/flow-dnd-24.3.6.jar!/META-INF/resources, jar:file:///C:/Users/User/.m2/repository/com/vaadin/vaadin-map-flow/24.3.6/vaadin-map-flow-24.3.6.jar!/META-INF/resources, jar:file:///C:/Users/User/.m2/repository/com/vaadin/vaadin-grid-pro-flow/24.3.6/vaadin-grid-pro-flow-24.3.6.jar!/META-INF/resources, jar:file:///C:/Users/User/.m2/repository/com/vaadin/vaadin-button-flow/24.3.6/vaadin-button-flow-24.3.6.jar!/META-INF/resources, jar:file:///C:/Users/User/.m2/repository/com/vaadin/vaadin-messages-flow/24.3.6/vaadin-messages-flow-24.3.6.jar!/META-INF/resources, jar:file:///C:/Users/User/.m2/repository/com/vaadin/vaadin-select-flow/24.3.6/vaadin-select-flow-24.3.6.jar!/META-INF/resources, jar:file:///C:/Users/User/.m2/repository/com/vaadin/vaadin-context-menu-flow/24.3.6/vaadin-context-menu-flow-24.3.6.jar!/META-INF/resources, jar:file:///C:/Users/User/.m2/repository/com/vaadin/vaadin-virtual-list-flow/24.3.6/vaadin-virtual-list-flow-24.3.6.jar!/META-INF/resources, jar:file:///C:/Users/User/.m2/repository/com/vaadin/flow-client/24.3.6/flow-client-24.3.6.jar!/META-INF/resources, jar:file:///C:/Users/User/.m2/repository/com/vaadin/vaadin-cookie-consent-flow/24.3.6/vaadin-cookie-consent-flow-24.3.6.jar!/META-INF/resources],AVAILABLE}{file:///C:/Dev/VaadinApp/src/main/webapp/}
[INFO] Started ServerConnector@b867869{HTTP/1.1, (http/1.1)}{0.0.0.0:8080}
[INFO] Started Server@ce2eaa7{STARTING}[11.0.14,sto=0] @22536ms
[INFO] Automatic redeployment disabled, see 'mvn jetty:help' for more redeployment options
[ForkJoinPool.commonPool-worker-8] INFO com.vaadin.flow.server.frontend.TaskCopyFrontendFiles - Visited 20 resources. Took 564 ms.

this is my maven config
(i’ve commented out the webappConfig part because intellij kept complaining it’s invalid and i found it super annoying, and i still don’t know why i need that, but it doesn’t make a difference with regards to live reload

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.example</groupId>
    <artifactId>VaadinApp</artifactId>
    <version>1.0-SNAPSHOT</version>
    <name>My Application</name>
    <packaging>war</packaging>

    <properties>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <failOnMissingWebXml>false</failOnMissingWebXml>
        <vaadin.version>24.3.6</vaadin.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-bom</artifactId>
                <type>pom</type>
                <scope>import</scope>
                <version>${vaadin.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>com.vaadin</groupId>
            <!-- Replace artifactId with vaadin-core to use only free components -->
            <artifactId>vaadin</artifactId>
        </dependency>

        <!-- Added to provide logging output as Flow uses -->
        <!-- the unbound SLF4J no-operation (NOP) logger implementation -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
        </dependency>

        <dependency>
            <groupId>jakarta.servlet</groupId>
            <artifactId>jakarta.servlet-api</artifactId>
            <version>6.0.0</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <defaultGoal>jetty:run</defaultGoal>
        <plugins>
            <plugin>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>11.0.14</version>
                <configuration>
                    <!--
                    Configures automatic reload of Jetty server
                    (with 2 second timeout) when new classes are compiled 
                    (e.g. by IDEs).
                    Should be disabeld when using a proper live reload system,
                    such as JRebel.
                    If using IntelliJ IDEA with autocompilation, this
                    might cause lots of unnecessary compilations in the
                    background. Consider using "0" and trigger restart manually
                    by hitting enter.
                    -->
<!--                    <scan>2</scan>-->
                    <!-- Use war output directory to get the webpack files -->
<!--                    <webAppConfig>-->
<!--                        <allowDuplicateFragmentNames>true</allowDuplicateFragmentNames>-->
<!--                    </webAppConfig>-->
                </configuration>
            </plugin>

            <!--
                Take care of synchronizing java dependencies and imports in
                package.json and main.js files.
                It also creates webpack.config.js if not exists yet.
            -->
            <plugin>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-maven-plugin</artifactId>
                <version>${vaadin.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-frontend</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>3.3.2</version>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <!-- Production mode is activated using -Pproduction -->
            <id>production</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.vaadin</groupId>
                        <artifactId>vaadin-maven-plugin</artifactId>
                        <version>${vaadin.version}</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>build-frontend</goal>
                                </goals>
                                <phase>compile</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>

update i switch to jetty maven plugin 11.0.20 and that got rid of the intelij error, but i still have the same state with livereload

@mmlopez As you have the setup there, could you try with latest Vaadin version? You are on a pretty old version, maybe something has regressed recently :man_shrugging: I have been enjoying JRebel lately.

nope, still nothing…

i went through your versions, and it last worked on 24.3.0 , from 24.3.1 i got that message…
could this have been the commit that did it?

So it indeed looks like a rather recent regression. Skimmed the change and that is potential candidate at least. Would you file a bug report here: Issues · vaadin/flow · GitHub

1 Like

I created a new project from the latest archetype and with the same setup I see the same as you:

So yes, it seems a recent regression.