25.3.5/25.3.6 breaks dev-mode startup probably because of copilot

Bumping from Vaadin 25.3.5 → 25.3.6 (just the version bump, nothing else changed) breaks application startup in dev mode (both mvn spring-boot:run and running as a Spring Boot app from the IDE, devtools restart). Reverting back to 25.3.5 fixes it immediately — no other changes needed.

Environment: Spring Boot 4.2.0, Java 21.0.13.1, embedded Tomcat 11.0.27, plain Java project (no Kotlin dependency anywhere in our own POM).

Relevant part of the stack trace:
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: URL
  [jar:file:/.../com/vaadin/copilot/25.3.6/copilot-25.3.6.jar!/com/vaadin/copilot/shaded/kotlin/cli/common/arguments/K2JVMCompilerArguments.class]
      at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.scanCandidateComponents(ClassPathScanningCandidateComponentProvider.java:504)
      ...
      at com.vaadin.flow.spring.VaadinServletContextInitializer.findClassesForDevMode(VaadinServletContextInitializer.java:672)
      at com.vaadin.flow.spring.VaadinServletContextInitializer$DevModeServletContextListener.failFastContextInitialized(VaadinServletContextInitializer.java:587)
  Caused by: java.lang.NoClassDefFoundError: kotlin/enums/EnumEntries
      at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
      ...
      at org.springframework.core.type.classreading.MergedAnnotationReadingVisitor.visitEnum(MergedAnnotationReadingVisitor.java:111)
      ...
  Caused by: java.lang.ClassNotFoundException: kotlin.enums.EnumEntries
      at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)

Looking at the full release notes for platform 25.3.6, I found the likely trigger — under Copilot 25.3.5 (pulled in by 25.3.6’s BOM):

Features

  • Added Kotlin support for addCall as a trailing lambda to improve API ergonomics.

So, as our project has no real Kotlin stdlib on the classpath, Spring’s classpath scan (triggered by Vaadin’s own dev-mode class discovery) fails trying to read that class’s annotation metadata.

Is this a known issue already?

Cheers
Mojo

Hi Mojo,

Thank you very much for your feedback, it was not a known issue and it may have been introduced fixing another one.

From 25.3.6

We are now investigating and fixing asap.

In the meantime a quick question,

Do you have vaadin-allowed-pakages property setup? If you have it, restricing it to only addons packages could be a temporal workaround. So nott having com.vaadin.*

Thanks again for your feedback!
Will be back with news

Rgds,
Miguel

Hi Miguel,

thanks for your fast response :+1:

Yes, I have vaadin.allowed-packages property in use, and already thought changing it as a workaround, but just wanted to wait for now to check with the forum.

I am not in such hurry as this update AFAIK it is not about security issues, so I can still wait a bit without problems.

Looking forward to the update :slight_smile:

Cheers
Mojo

1 Like

Just a little “Thanks”

that was fast work, 25.3.7 has resolved that issue :+1:

Cheers
Mojo

Good to know that the fix worked on your end, I was going to share the release here but you already noticed :slight_smile:

Thanks again for your feedback and watch, it is so important and useful to us to have vaadiners out there! :muscle:

Rgds,
Miguel

1 Like