Vaadin 24.4.x not generating Endpoints

Hello everyone,

recently I have tried to migrate my vaadin 23.3.x application to version 24.4.x. While migrating I followed the migration guide profusely and completed every single step (aside from adding the vaadin BOM, because I don’t want to lock spring boot starter into a specific version). After multiple tries of clean install (production and no production profile) I keep running into the same error:

error during build:
[ERROR] Could not resolve "../../generated/XXXEndpoint" from "src/main/frontend/src/lit/XXX-component.ts"
[ERROR] file: C:/Users/XXX/IdeaProjects/XXX/XXX-frontend/src/main/frontend/src/lit/XXX-component.ts
[ERROR]     at getRollupError (file:///C:/Users/XXX/IdeaProjects/XXXXXX-frontend/node_modules/rollup/dist/es/shared/parseAst.js:396:41)

When i check the folder generated in my frontend directory it only generates vaadin specific files but no generated Endpoints:
image

Every Single Endpoint has the correct @Endpoint annotation imported from com.vaadin.hilla:

@Endpoint
@Validated
@PermitAll
@PreAuthorize("hasAuthority('" + Berechtigung.ENDPOINTS_XXX + "')")
public class XXXEndpoint implements XXXEndpoint {

pom.xml (some blocks were omitted due to largeness):

<dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-spring-boot-starter</artifactId>
            <version>${vaadin.version}</version>
        </dependency>
<build>

        <defaultGoal>spring-boot:run</defaultGoal>
        <finalName>${project.artifactId}</finalName>

        <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>
<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>
                    </exclusions>
                </dependency>
            </dependencies>

            <build>
                <plugins>
                    <plugin>
                        <dependencies>
                            <dependency>
                                <groupId>org.springframework</groupId>
                                <artifactId>spring-context</artifactId>
                                <version>6.1.10</version>
                            </dependency>
                        </dependencies>
                        <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>
                        <configuration>
                            <!-- To always force an optimized production bundle build set this configuration to 'true' -->
                            <forceProductionBuild>true</forceProductionBuild>
                            <!-- To have reproducible build by running 'npm ci' -->
                            <ciBuild>false</ciBuild>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
</profiles>

Does someone have any idea why Endpoints are not being generated? If any information is missing just tell me and I will add more code or other needed information.

cheers, james

Disclaimer: no hilla expert

From my understanding: Endpoint is deprecated and should not be used like since 2.2? It’s called BrowserCallable - this might already be the problem

But there is also the possibility of version mismatches. I would highly highly encourage to use the Vaadin BOM. The latest version should not manage spring dependencies - this was by accident and is removed. If you are still worried, ensure you have spring boot dependency management before the Vaadin BOM so that Maven’s dependency resolution prioritizes spring.

1 Like

Thank you very much for you suggestion. I have implemented the new Annotation @BrowserCallable as well as the Vaadin BOM. Unfortunately the same problem persists :confused:

Could you try compiling the project and then running mvn vaadin:generate to see if that can force the generation or not?

1 Like