Copilot not working with Quarkus and IntelliJ

Hello,
I’m hoping someone in this forum has figured out how to run Vaadin copilot with Quarkus.

Here are the versions I’m using:

  • IntelliJ IDEA 2024.3.5 (Ultimate Edition)
  • Vaadin plugin 1.4.10 (with plus subscription)
  • graalvm64-21.0.2
  • Quarkus 3.21.1
  • Vaadin 24.7.0

To recreate run this quarkus cli command:
quarkus create app --maven -o=quarkus-vaadin --extension=com.vaadin:vaadin-quarkus-extension org.acme:vaadin-with-quarkus:1.0.0

I’ve tried running it with the IntelliJ debug and with quarkus dev.

Thanks
MD

Hi!

Did you get anything to work or did it stop on startup?

I tested with a fresh project (24.7.1) and to me it worked to “some extent”. I tried: open the visual editor part, dragged a new component to the layout. There seems to be some issue with reloading the content after changes (kind of gets stuck, but after reload the changes appeared). Got also this stacktrace that might be related:

2025-04-15 15:15:18,885 WARN  [com.vaa.cop.cus.CustomComponents] (vert.x-eventloop-thread-0) Class org.acme.example.MainView not found: java.lang.ClassNotFoundException: org.acme.example.MainView
        at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:542)
        at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:517)
        at java.base/java.lang.Class.forName0(Native Method)
        at java.base/java.lang.Class.forName(Class.java:462)
        at java.base/java.lang.Class.forName(Class.java:453)
        at com.vaadin.copilot.customcomponent.CustomComponents.isCustomComponent(CustomComponents.java:85)
        at com.vaadin.copilot.customcomponent.CustomComponents.isCustomComponent(CustomComponents.java:70)
        at com.vaadin.copilot.customcomponent.CustomComponentHelper.lambda$generateResponse$0(CustomComponentHelper.java:50)
        at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:196)
        at java.base/java.util.AbstractList$RandomAccessSpliterator.forEachRemaining(AbstractList.java:722)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:570)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:560)
        at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:265)
        at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:636)
        at com.vaadin.copilot.customcomponent.CustomComponentHelper.generateResponse(CustomComponentHelper.java:51)
        at com.vaadin.copilot.ProjectFileHandler.handleMessage(ProjectFileHandler.java:102)
        at com.vaadin.copilot.CopilotSession.handleMessageSync(CopilotSession.java:139)
        at com.vaadin.copilot.CopilotSession.handleMessage(CopilotSession.java:114)
        at com.vaadin.copilot.Copilot.handleMessage(Copilot.java:62)
        at com.vaadin.base.devserver.DebugWindowConnection.onMessage(DebugWindowConnection.java:336)
        at com.vaadin.flow.server.communication.PushHandler.handleDebugWindowMessage(PushHandler.java:669)
        at com.vaadin.flow.server.communication.PushHandler.callWithServiceAndSession(PushHandler.java:237)
        at com.vaadin.flow.server.communication.PushHandler.onMessage(PushHandler.java:645)
        at com.vaadin.flow.server.communication.PushAtmosphereHandler.onMessage(PushAtmosphereHandler.java:90)
        at com.vaadin.flow.server.communication.PushAtmosphereHandler.onRequest(PushAtmosphereHandler.java:79)

Hi Matti,
You are seeing the same issue I am. It will alter the source document but will not dynamically load it.

It seems to be different problem than this JNA dependency conflict reported here earlier.

It would be useful to file bug ticket in that repository with some further details in it so that problem can be reproduced and debugged.

The biggest problem is that Quarkus live reload works by restarting the app after an HTTP request comes and this means a full page reload. So the page refresh that Copilot triggers never works as expected. So Copilot should have special treatment of Quarkus, like hook into Quarkus reload, but the remaining problem is to disable application restart.

I filed a feature request about this: [FEATURE] Add Quarkus support · Issue #131 · vaadin/copilot · GitHub

But first the class loader issue needs to be fixed [BUG] Classloader conflict with Quarkus · Issue #132 · vaadin/copilot · GitHub