Build / Deployment Vaadin25 fails

Hi there,

i switched to v25 but when i build with my old pom and deploy it, i get the following error during startup at server:Running project in development mode with no access to folder ‘C:.…’.

Looks like it tries to start in devmode.

I have build with mvn clean package, but i think i have an error in my pom. Does some one has an idea whats missing or is wrong? I need to clean this up i think, there are probably some plugins etc which are not necassary.

  </dependencies>

    <build>
        <finalName>portal</finalName>
        <defaultGoal>spring-boot:run</defaultGoal>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>

            <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>
        </plugins>
    </build>

    <profiles>
        <profile>
            <!-- Production mode is activated using -Pproduction -->
            <id>production</id>
            <dependencies>
                <!-- Exclude development dependencies from production -->
                <dependency>
                    <groupId>com.vaadin</groupId>
                    <artifactId>vaadin-core</artifactId>
                    <version>${vaadin.version}</version>
                    <exclusions>
                        <exclusion>
                            <groupId>com.vaadin</groupId>
                            <artifactId>vaadin-dev</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>com.vaadin</groupId>
                            <artifactId>vaadin-dev-server</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>com.vaadin</groupId>
                            <artifactId>hilla-dev</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
            </dependencies>
            <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>
                                <configuration>
                                    <forceProductionBuild>true</forceProductionBuild>
                                    <optimizeBundle>false</optimizeBundle>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- Spring Boot Repackage -->
                    <plugin>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>repackage</id>
                                <goals>
                                    <goal>repackage</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

Can you share the build logs?

Just a couple of notes:

  • Since Vaadin 25, dev dependencies are excluded by default, and you need to configure them as optional (How to upgrade Vaadin applications)
  • The Maven package is intended to build a production artifact without the need for a dedicated profile. Just configure the build-frontend goal execution for the Vaadin Maven plugin in the main build section (in your example basically replace prepare-frontend with build-frontend) How to create a production build in Vaadin Flow

I have changed it to build-frontend but still get an error see below

Summary

Failed to execute goal com.vaadin:vaadin-maven-plugin:25.0.3:build-frontend (default) on project webapp: null: MojoFailureException: InvocationTargetException: Could not execute build-frontend goal: Error occured during goal execution: nullPlease run Maven with the -e switch (or Gradle with the --stacktrace switch), to learn the full stack trace. StackOverflowError → [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.vaadin:vaadin-maven-plugin:25.0.3:build-frontend (default) on project webapp: null
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:333)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
at java.lang.reflect.Method.invoke (Method.java:580)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:255)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:201)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:361)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:314)
Caused by: org.apache.maven.plugin.MojoFailureException
at com.vaadin.flow.plugin.maven.FlowModeAbstractMojo.execute (FlowModeAbstractMojo.java:359)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
at java.lang.reflect.Method.invoke (Method.java:580)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:255)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:201)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:361)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:314)
Caused by: java.lang.reflect.InvocationTargetException
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:118)
at java.lang.reflect.Method.invoke (Method.java:580)
at com.vaadin.flow.plugin.maven.FlowModeAbstractMojo.execute (FlowModeAbstractMojo.java:352)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
at java.lang.reflect.Method.invoke (Method.java:580)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:255)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:201)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:361)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:314)
Caused by: org.apache.maven.plugin.MojoFailureException: Could not execute build-frontend goal
at com.vaadin.flow.plugin.maven.BuildFrontendMojo.executeInternal (BuildFrontendMojo.java:181)
at com.vaadin.hilla.maven.BuildFrontendMojo.executeInternal (BuildFrontendMojo.java:85)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
at java.lang.reflect.Method.invoke (Method.java:580)
at com.vaadin.flow.plugin.maven.FlowModeAbstractMojo.execute (FlowModeAbstractMojo.java:352)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
at java.lang.reflect.Method.invoke (Method.java:580)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:255)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:201)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:361)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:314)
Caused by: com.vaadin.flow.server.frontend.ExecutionFailedException: Error occured during goal execution: nullPlease run Maven with the -e switch (or Gradle with the --stacktrace switch), to learn the full stack trace.
at com.vaadin.flow.plugin.base.BuildFrontendUtil.runNodeUpdater (BuildFrontendUtil.java:388)
at com.vaadin.flow.plugin.maven.BuildFrontendMojo.executeInternal (BuildFrontendMojo.java:179)
at com.vaadin.hilla.maven.BuildFrontendMojo.executeInternal (BuildFrontendMojo.java:85)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
at java.lang.reflect.Method.invoke (Method.java:580)
at com.vaadin.flow.plugin.maven.FlowModeAbstractMojo.execute (FlowModeAbstractMojo.java:352)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
at java.lang.reflect.Method.invoke (Method.java:580)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:255)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:201)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:361)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:314)
Caused by: java.lang.StackOverflowError
at java.lang.StringUTF16$CharsSpliterator.tryAdvance (StringUTF16.java:1228)
at java.util.stream.IntPipeline.forEachWithCancel (IntPipeline.java:163)
at java.util.stream.AbstractPipeline.copyIntoWithCancel (AbstractPipeline.java:527)
at java.util.stream.AbstractPipeline.copyInto (AbstractPipeline.java:513)
at java.util.stream.AbstractPipeline.wrapAndCopyInto (AbstractPipeline.java:499)
at java.util.stream.FindOps$FindOp.evaluateSequential (FindOps.java:150)
at java.util.stream.AbstractPipeline.evaluate (AbstractPipeline.java:234)
at java.util.stream.IntPipeline.findFirst (IntPipeline.java:552)
at java.text.DecimalFormatSymbols.findNonFormatChar (DecimalFormatSymbols.java:854)
at java.text.DecimalFormatSymbols.initialize (DecimalFormatSymbols.java:833)
at java.text.DecimalFormatSymbols. (DecimalFormatSymbols.java:115)
at sun.util.locale.provider.DecimalFormatSymbolsProviderImpl.getInstance (DecimalFormatSymbolsProviderImpl.java:85)
at java.text.DecimalFormatSymbols.getInstance (DecimalFormatSymbols.java:183)
at sun.util.locale.provider.NumberFormatProviderImpl.getInstance (NumberFormatProviderImpl.java:185)
at sun.util.locale.provider.NumberFormatProviderImpl.getNumberInstance (NumberFormatProviderImpl.java:151)
at java.text.NumberFormat.getInstance (NumberFormat.java:979)
at java.text.NumberFormat.getInstance (NumberFormat.java:965)
at java.text.NumberFormat.getNumberInstance (NumberFormat.java:518)
at java.util.Scanner.useLocale (Scanner.java:1278)
at java.util.Scanner. (Scanner.java:547)
at java.util.Scanner. (Scanner.java:773)
at com.vaadin.flow.internal.StringUtil.removeComments (StringUtil.java:100)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:207)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)
at com.vaadin.flow.server.frontend.CssBundler.inlineImports (CssBundler.java:210)
at com.vaadin.flow.server.frontend.CssBundler.lambda$inlineImports$0 (CssBundler.java:228)
at java.util.regex.Matcher.replaceAll (Matcher.java:1304)

The problem was, that i had a reference of a file itself

so a file like my.css i had @import(/mycss.css)

that stopped the build process.

But now my theme doesnt get loaded. In console i see that lumo.css cant be found (404) looks like a Spring security blocking. I am testing whats going on

If it’s 404 is it not Spring Security that blocks; it would be a 401 or 403.
Can you show how you load the Lumo css?

Also, can you please share the structure of your CSS?
Based on the stack trace, it seems there’s an infinite loop while resolving CSS imports.
Could it be that you have cyclic references in your CSS?
Anyway, this is something that Flow should detect and avoid. It may deserve a ticket on the Fow GH repo if you can provide a reproducer.

i have now added /lumo/** into vaadinSecurityFilterChain and the 404 disappeared and the Page looks like it should.

   private static final String[] PUBLIC_ENDPOINTS = {
            "/images/**", "/img/**", "/fonts/**", "/css/**", "/js/**",
            "/font-awesome/**", "/favicon.ico", "/robots.txt", "/error",
            "/VAADIN/**",
            "/styles.css",
            "/lumo/**",
            "/?v-r=heartbeat*"
    };

....

http.authorizeHttpRequests(auth -> auth
                        .requestMatchers(Arrays.stream(PUBLIC_ENDPOINTS)
                                .map(path -> PathPatternRequestMatcher.withDefaults().matcher(HttpMethod.GET, path))
                                .toArray(PathPatternRequestMatcher[]::new)).permitAll()
....

Regarding the cycle i think it can be reproduced if you add

into a css file an import to its own. For example

style.css
@import (‘./components/vaadin-upload.css’);

and in this vaadin-upload.css you also
@import url(‘./components/vaadin-upload.css’);
so this file imports itself

Side question: Aren’t you using VaadinSecurityConfigurer? It handles Lumo path by default?

Not yet. Because the App is stateless currently (will be changed in the future)

Sure, but I wanted to see the real use case that caused the loop, just to be sure if it was a valid css

Sorry dont get it, what excatly you need. The error dissapperared as soon as i removed the import @import url(‘./components/vaadin-upload.css’); in the file ‘./components/vaadin-upload.css’

That was not an intent to have the import in its own file

For the record, even though this is mostly a project issue, I created a GH ticket Infinite loop in CSSBundler when stylesheets mistakenly have cyclic imports · Issue #23237 · vaadin/flow · GitHub.

1 Like