microsoft / microsoft/vscode-java-pack
Since upgrading to Java 16 app launch fails due to the same class being present in multiple Maven modules/projects
@testforstephen is already working on this.
Since Aug 9, 2021.
- Dominant language
- TypeScript
- Stars
- 352
- Forks
- 166
- Avg merge
- 17h 47m
- Merged PRs (30d)
- 32
Description
Since upgrading to Java 16, launching Spring Boot applications fails. I am using a multi-module Maven project with multiple Sprint Boot apps in it. Each for example defines the test RabbitMqConfig class. And when I run any of the apps (even if it is one not having/using such a RabbitMqConfig class), I get the following error in .log:
!ENTRY org.eclipse.jdt.ls.core 1 0 2021-08-01 13:09:57.689
!MESSAGE >> workspace/executeCommand vscode.java.resolveMainClass
!ENTRY org.eclipse.jdt.ls.core 1 0 2021-08-01 13:09:59.988
!MESSAGE >> java/buildWorkspace (incremental)
!ENTRY org.eclipse.jdt.ls.core 4 0 2021-08-01 13:09:59.995
!MESSAGE Error occured while building workspace. Details:
message: The type RabbitMqConfig is already defined; code: 0; resource: /.../app1/src/test/java/com/example/config/RabbitMqConfig.java;
message: The type RabbitMqConfig is already defined; code: 0; resource: /.../app2/src/test/java/com/example/config/RabbitMqConfig.java;
message: The type RabbitMqConfig is already defined; code: 0; resource: /.../app3/src/test/java/com/example/config/RabbitMqConfig.java;
message: The type RabbitMqConfig is already defined; code: 0; resource: /.../app4/src/test/java/com/example/config/RabbitMqConfig.java;
message: The type RabbitMqConfig is already defined; code: 0; resource: /.../app5/src/test/java/com/example/config/RabbitMqConfig.java;
This happens regardless if I want to launch app 1-5 or other appX that is not using RabbitMQ.
Environment:
-
VS Code Version:
Version: 1.58.2 Commit: c3f126316369cd610563c75b1b1725e0679adfb3 Date: 2021-07-14T22:09:06.581Z (2 wks ago) Electron: 12.0.13 Chrome: 89.0.4389.128 Node.js: 14.16.0 V8: 8.9.255.25-electron.0 OS: Darwin x64 19.6.0 -
Extension Version: v0.80.0
-
JDK Type & Version: openjdk 16.0.1
-
OS Type & Version: Mac Catalina
Expected Behavior:
launch Spring Boot app
Actual Behavior:
Popup saying:
Build failed, do you want to continue?
Source: Debugger for java (Extension)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.