-
Notifications
You must be signed in to change notification settings - Fork 350
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
Redhat.java update to version 0.30.0 broke launching/debugging of Spring boot-apps #402
Comments
most likely this is caused by runtime dependencies now being flagged to be seen by the test dependencies only. The debugger should ensure runtime dependencies are added to the runtime classpath |
@fabferri @kdvolder looks like my change of removing test scope classpath, see #399 microsoft/java-debug#202, please add snakeyaml first if it blocks you, I am looking for the reasons.
|
Removing test scope classpath actually sounds like the right thing to do. Having test dependencies on the runtime classpath can also break apps (especially in spring boot where autoconfiguration can easily pick up on the presence of certain things on the classpath and autmatically configure them for use in the app. However, I suspect that maybe the classpath that vscode-java-debug is using is actually the classpath meant to be used by Java compiler. So it is actually a compile-time classpath, not the classpath that should be used to launch an app. The compile time classpath is different (typically smaller than) the runtime classpath. The fact that test dependencies where there before was wrong i.m.o, and that it actually made my simple app run is more of an 'accident'. (Two wrongs kind of making things work, because one mistake compensated and fixed the problem caused by another... completely by luck/chance). |
@kdvolder seems we has missed some run-time scope class-entries, thank you very much for noticing us: maven.pomderived=true |
@fbricon not sure whether the following logic is right, the isOnlyVisibleByTests will mark runtime scopes test, is it expected?
|
@andxu yes, runtime dependencies are seen by the test code, in Maven. Hence the test flag |
@fbricon, could you please take a look at my code fix? |
Close the issue since hotfix is released |
An simple boot app, which was running just fine before suddenly stopped launching properly right after the
redhat.java
extension was updated to version 0.30.0.The error looks to me like there's something wrong (missing) from the app's runtime classpath. This cause the app to not properly boot up.
Environment
493869ee8e8a846b0855873886fc79d480d342de
x64
Steps To Reproduce
cd hello-world-service
andcode .
.Current Result
Error:
Expected Result
App starts succesfully. E.g. you can compare to what supposed to happen by running the app from commandline:
The text was updated successfully, but these errors were encountered: