You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "MartinBalin (via GitHub)" <gi...@apache.org> on 2025/08/04 15:37:31 UTC

[I] Error message after run of Gradle 9 project in VSNetBeans [netbeans]

MartinBalin opened a new issue, #8706:
URL: https://github.com/apache/netbeans/issues/8706

   ### Apache NetBeans version
   
   Apache NetBeans 27 latest release candidate
   
   ### What happened
   
   When testing Gradle 9 project loading from @mbien PR https://github.com/apache/netbeans/pull/8703 and its code base I've realized that project is loaded, can be run using F5 or code lense, but at the end Gradle prints error message to output which is ugly and hides that project was run OK.
   Steps: 
   
   1. Build VSNetBeans from `mbien:gradle9-fixes` as stated in [PR 8703](https://github.com/apache/netbeans/pull/8703)
   2. Run it in VSCode, create new Gradle Java project using command `Java: New project ...` command. It is the created as Gradle 9 project in gradle-wrapper.properties.
   3. Project si opened and loaded OK.
   4. Try to run it using F5 or Code Lense in VS Code. Project is run and right after its output, it prints Gradle error which can hide the fact project Run/Debug completed OK.
   ```
   JAVA_HOME="/Users/mbalin/.sdkman/candidates/java/21.0.6-graal"
   cd /Users/mbalin/development/gr-test2/app; ../gradlew --configure-on-demand -PrunClassName=org.yourcompany.yourproject.App -s '-PrunJvmArgs=-Dvisualvm.display.name=gr-test2%PID -Dvisualvm.id=1754321487125 -Dfile.encoding=UTF-8' -x check run
   Configuration on demand is an incubating feature.
   Calculating task graph as no cached configuration is available for tasks: run
   > Task :app:compileJava UP-TO-DATE
   > Task :app:processResources NO-SOURCE
   > Task :app:classes UP-TO-DATE
   
   > Task :app:run
   Hello World!
   
   [Incubating] Problems report is available at: file:///Users/mbalin/development/gr-test2/build/reports/problems/problems-report.html
   
   FAILURE: Build failed with an exception.
   
   * What went wrong:
   Configuration cache problems found in this build.
   
   1 problem was found storing the configuration cache.
   - Task `:app:run` of type `org.gradle.api.tasks.JavaExec`: cannot serialize object of type 'org.gradle.api.internal.project.DefaultProject', a subtype of 'org.gradle.api.Project', as these are not supported with the configuration cache.
     See https://docs.gradle.org/9.0.0/userguide/configuration_cache_requirements.html#config_cache:requirements:disallowed_types
   
   See the complete report at file:///Users/mbalin/development/gr-test2/build/reports/configuration-cache/bxnd0w8qtt4bcmeafim2dypss/60ha2871aj6t91ergssn1d5rh/configuration-cache-report.html
   ```
   You can see there is message from simple hello world
   ```
   > Task :app:run
   Hello World!
   ``` 
   followed by Gradle error. 
   Should be fixed.
   
   ### Language / Project Type / NetBeans Component
   
   Java Gradle project based
   
   ### How to reproduce
   
   See above for steps
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   macOS 15.5
   
   ### JDK
   
   JDK 21.0.6 GraalVM
   
   ### Apache NetBeans packaging
   
   Apache VSNetBeans for VSCode
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   No


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] Error message after run of Gradle 9 project in VSNetBeans [netbeans]

Posted by "matthiasblaesing (via GitHub)" <gi...@apache.org>.
matthiasblaesing commented on issue #8706:
URL: https://github.com/apache/netbeans/issues/8706#issuecomment-3165332537

   > Then, the message is a result of `NetBeansRunSinglePlugin.configureJavaExec` calling `JavaExec.setStandardInput` - without that, the `config cache` error does not appear. I've traced this back to [7e5e8f3](https://github.com/apache/netbeans/commit/7e5e8f34848c0b5fcffe2b2db883566f28c573a9) by [@matthiasblaesing](https://github.com/matthiasblaesing) (?). See the cache report attached as zip (html inside).
   
   The change in 7e5e8f3 just added a guard to the `setStandardInput` call, that caught `RuntimeException` and let the build pass instead of failing it because the stream could not be set. The setting of the standard input stream existed for 6 years already:
   
   https://github.com/apache/netbeans/commit/547263d8aded8c3341fe4b29c84272b0c9d84a8d
   
   It slightly changed of the next few years though.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] Error message after run of Gradle 9 project in VSNetBeans [netbeans]

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on issue #8706:
URL: https://github.com/apache/netbeans/issues/8706#issuecomment-3151290813

   sounds like this is coming from https://docs.gradle.org/9.0.0/release-notes.html#configuration-cache-improvements


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] Error message after run of Gradle 9 project in VSNetBeans [netbeans]

Posted by "sdedic (via GitHub)" <gi...@apache.org>.
sdedic commented on issue #8706:
URL: https://github.com/apache/netbeans/issues/8706#issuecomment-3154751115

   Well, I am not sure if it is an improvement. First, it happens for Gradle 8.5 project too (wrapper configured to use G 8.5, debugger shows the actual runtime classes from G 8.5 distribution).
   
   Then, the message is a result of `NetBeansRunSinglePlugin.configureJavaExec` calling `JavaExec.setStandardInput` - without that, the `config cache` error does not appear. I've traced this back to 7e5e8f3  by @matthiasblaesing (?).
   
   Last, I've during debugging I've tried to repeatedly run a gradle project from NB IDE (Run action on project node). But our `NetBeansRunSinglePlugin` was applied only **the first time**, subsequent runs did not apply our plugin at all - all settings were apparently loaded from the cache.
   I wonder if we **really** want so much caching for IDE purposes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] Error message after run of Gradle 9 project in VSNetBeans [netbeans]

Posted by "sdedic (via GitHub)" <gi...@apache.org>.
sdedic commented on issue #8706:
URL: https://github.com/apache/netbeans/issues/8706#issuecomment-3157683006

   Here's a dump for Martin's original report: seems that even an implicit reference in an anonymous class passed to `je.getJvmArgumentProviders().add()` is a problem; see zipped HTML
   
   [configuration-cache-report2.zip](https://github.com/user-attachments/files/21612876/configuration-cache-report2.zip)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] Error message after run of Gradle 9 project in VSNetBeans [netbeans]

Posted by "sdedic (via GitHub)" <gi...@apache.org>.
sdedic commented on issue #8706:
URL: https://github.com/apache/netbeans/issues/8706#issuecomment-3157911391

   OK, let's forget the report with the InputStream; seems it was a leftover from early experiments with the original report, cannot reproduce it any more with a clean environment.
   Why the error does not appear in "plain" netbeans IDE may be simple; vscode passes `-Dfile.encoding` JVM arg, which is not much configurable in the Netbeans IDE, so this style is not used - so the thing could escape unnoticed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [I] Error message after run of Gradle 9 project in VSNetBeans [netbeans]

Posted by "sdedic (via GitHub)" <gi...@apache.org>.
sdedic commented on issue #8706:
URL: https://github.com/apache/netbeans/issues/8706#issuecomment-3165342280

   >
   > The change in [7e5e8f3](https://github.com/apache/netbeans/commit/7e5e8f34848c0b5fcffe2b2db883566f28c573a9) just added a guard to the `setStandardInput` call, that caught `RuntimeException` and let the build pass instead of failing it because the stream could not be set. The setting of the standard input stream existed for 6 years already:
   > 
   > [547263d](https://github.com/apache/netbeans/commit/547263d8aded8c3341fe4b29c84272b0c9d84a8d)
   > 
   > It slightly changed of the next few years though.
   
   @matthiasblaesing  sorry for false alarm; it (almost for sure) turned out that the InputStream error I was experiencing was a result of experiments while trying to pinpoint the source. Just discard the whole InputStream issue discussion. Thanks & sorry.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists