redhat-developer / redhat-developer/vscode-java

Project does not contain any main class after update to 1.26.0

Open
#3,467 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.3k
Forks
546
Avg merge
20h 1m
Merged PRs (30d)
11

Description

After update to 1.26.0 cannot run/debug java project using spring boot dashboard in vscode.
Downgraded to 1.25.1 works fine.

Environment
  • Operating System: Windows 11
  • JDK version: graalvm-jdk-17.0.8+9.1
  • Visual Studio Code version: 1.85.1
  • Java extension version: 1.26.0
Steps To Reproduce
  1. Update to 1.26.0
  2. Run java projects either from JAVA PROJECTS tab in EXPLORER or Spring boot dashboard.

Exception appears here - https://github.com/microsoft/java-debug/blob/f8da9e2e2f55a2cefaf658ae24154c784eaa113e/com.microsoft.java.debug.plugin/src/main/java/com/microsoft/java/debug/plugin/internal/ResolveMainClassHandler.java#L156

java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0 at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getType(LookupEnvironment.java:1725)

Current Result

Project does not contain any main class ..

Expected Result

Runs as before

Additional Informations

I have multiple projects configured with workspace file containing lauch configs

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with com.microsoft.java.debug.plugin/src/main/java/com/microsoft/java/debug/plugin/internal/ResolveMainClassHandler.java at line 156, then reproduce the failure from the Java Projects tab or Spring Boot dashboard using the reported environment. Trace why LookupEnvironment.getType returns no types after the 1.26.0 update, and verify that a project main class is detected and can be launched or debugged.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring-boot, typescript, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.