Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MapStruct mapper generation error after upgrading to 1.36 #3843

Closed
nicolasriousset opened this issue Nov 5, 2024 · 3 comments
Closed

MapStruct mapper generation error after upgrading to 1.36 #3843

nicolasriousset opened this issue Nov 5, 2024 · 3 comments

Comments

@nicolasriousset
Copy link

Hi,

After upgrading Language Support for Java(TM) to version 1.36, visual studio code started failing to generate MapStruct Mappers 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.

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

Below is my maven annotationProcessorPaths configuration. I can try and provide a basic application to reproduce the issue, if it helps.

                <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>

Best regards,

Nicolas

@nicolasriousset
Copy link
Author

nicolasriousset commented Nov 5, 2024

I wonder if the issue could have been introduced by this fix : #3833

@rgrunber
Copy link
Member

rgrunber commented Nov 5, 2024

This is a duplicate of #3836 . #3833 just updated the name of the file to better reflect what it is. We've been running off the latest Lombok for some time now.

@rgrunber rgrunber closed this as completed Nov 5, 2024
@vijb20
Copy link

vijb20 commented Nov 28, 2024

el problema esta en que las librerias de lombok del editor con respecto al proyecto son diferentes
para el caso de vscode se debe cambiar la version del lombok por la de tu proyecto en la siguiente ruta

C:\Users\jvjara.vscode\extensions\redhat.java-1.36.0-win32-x64\lombok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants