apache / apache/netbeans

GradleConnectionException when using Run File on a Gradle project while another Gradle project is running

Open
#5,485 3 comments 0 reactions 0 assignees View on GitHub
Gradle kind:bug pending-response
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### Apache NetBeans version

Apache NetBeans 17 release candidate

### What happened

I attempted to run a File in another Gradle project by right-clicking on the file and selecting "Run File", I did this while I had another Gradle-based project running via the Run button on the toolbar.

The output window for the "Run File" action only showed:

JAVA_HOME="/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home"
cd /Users/scott/dev/Personal/LeetCode; /Users/scott/dev/gradle/bin/gradle --configure-on-demand -PrunClassName=s1524_sub_arrays_with_odd_sum.Solution -s -x check runSingle

and the file did not run. An icon in the NB status bar indicated there was an issue.

A org.gradle.tooling.GradleConnectionException has occurred. If you are running the [latest](https://netbeans.apache.org/download) version of NetBeans you can [report this](https://netbeans.apache.org/nb/report-issue), including a copy of your messages.log file as an attachment. The messages.log file is located in this folder.

I am using Gradle 8.0-rc-5 with NetBeans 17rc3 on JDK 17.

### How to reproduce

Run one Gradle-based project and while it is still running, choose "Run File" from the context menu of a file in another Gradle-based project.

### Did this work correctly in an earlier version?

No / Don't know

### Operating System

macOS 13.2

### JDK

OpenJDK 17.0.6

### Apache NetBeans packaging

Apache NetBeans binary zip

### Anything else

[messages.log](https://github.com/apache/netbeans/files/10726492/messages.log)

### Are you willing to submit a pull request?

Yes

### Code of Conduct

Yes

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure by running one Gradle-based project and choosing Run File in another, then inspect the attached messages.log and the GradleConnectionException output. Done means Run File completes successfully while the other Gradle project is still running.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
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.