skip to Main Content

After upgrading to VS Code 1.93.1 (october 2024), VS code started failing to generate MapStruct Mappers for my Java application with the following error :

Error occured while building workspace. Details: 
 message: No implementation was created for xxxMapper due to having a problem in the erroneous element java.util.ArrayList. Hint: this often means that some other annotation processor was supposed to process the erroneous element. You can also enable MapStruct verbose mode by setting -Amapstruct.verbose=true as a compilation argument.

I’m using Maven with Lombok 1.18.30 and MapStruct 1.5.5.Final. Command line compilation works just fine, the issue arises only when building using the VS Code IDE.

Below is my maven annotationProcessorPaths configuration.

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>${maven-compiler-plugin.version}</version>
            <configuration>
                <annotationProcessorPaths>
                    <path>
                        <groupId>org.projectlombok</groupId>
                        <artifactId>lombok</artifactId>
                        <version>${lombok.version}</version>
                    </path>
                    <path>
                        <groupId>org.projectlombok</groupId>
                        <artifactId>lombok-mapstruct-binding</artifactId>
                        <version>${lombok.mapstruct.binding.version}</version>
                    </path>
                    <path>
                        <groupId>org.mapstruct</groupId>
                        <artifactId>mapstruct-processor</artifactId>
                        <version>${mapstruct.version}</version>
                    </path>
                </annotationProcessorPaths>
            </configuration>
        </plugin>

2

Answers


  1. Chosen as BEST ANSWER

    The issue does not come from the VS Code update itself, but from the Language Support for Java(TM) by Red Hat plugin update, version 1.36.

    Rolling back the Language Support for Java(TM) plugin to previous version (1.35.1) solves the issue.

    I've reported the issue here : https://github.com/redhat-developer/vscode-java/issues/3843


  2. rolled back to v1.35.1
    but still getting the issue

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search