KKitForma.

Language

EnglishEnglishTürkçeTurkishTool unavailable · open catalogDeutschGermanTool unavailable · open catalogEspañolSpanishTool unavailable · open catalogFrançaisFrenchTool unavailable · open catalogPortuguêsPortugueseTool unavailable · open catalogItalianoItalianTool unavailable · open catalogNederlandsDutchTool unavailable · open catalogPolskiPolishTool unavailable · open catalogРусскийRussianTool unavailable · open catalogУкраїнськаUkrainianTool unavailable · open catalogSvenskaSwedishTool unavailable · open catalogNorskNorwegianTool unavailable · open catalogDanskDanishTool unavailable · open catalogSuomiFinnishTool unavailable · open catalogČeštinaCzechTool unavailable · open catalogRomânăRomanianTool unavailable · open catalogΕλληνικάGreekTool unavailable · open catalogالعربيةArabicTool unavailable · open catalogעבריתHebrewTool unavailable · open catalogفارسیPersianTool unavailable · open catalogاردوUrduTool unavailable · open catalogहिन्दीHindiTool unavailable · open catalogবাংলাBengaliTool unavailable · open catalogதமிழ்TamilTool unavailable · open catalogతెలుగుTeluguTool unavailable · open catalogमराठीMarathiTool unavailable · open catalogગુજરાતીGujaratiTool unavailable · open catalog简体中文Chinese SimplifiedTool unavailable · open catalog繁體中文Chinese TraditionalTool unavailable · open catalog日本語JapaneseTool unavailable · open catalog한국어KoreanTool unavailable · open catalogTiếng ViệtVietnameseTool unavailable · open catalogไทยThaiTool unavailable · open catalogBahasa IndonesiaIndonesianTool unavailable · open catalogBahasa MelayuMalayTool unavailable · open catalogFilipinoFilipinoTool unavailable · open catalogKiswahiliSwahiliTool unavailable · open catalogAfrikaansAfrikaansTool unavailable · open catalogMagyarHungarianTool unavailable · open catalogБългарскиBulgarianTool unavailable · open catalogHrvatskiCroatianTool unavailable · open catalogSrpskiSerbianTool unavailable · open catalogSlovenčinaSlovakTool unavailable · open catalogSlovenščinaSlovenianTool unavailable · open catalogLietuviųLithuanianTool unavailable · open catalogLatviešuLatvianTool unavailable · open catalogEestiEstonianTool unavailable · open catalogCatalàCatalanTool unavailable · open catalogEuskaraBasqueTool unavailable · open catalog
← All topics and search

Java & JVM

Java language, JVM behavior, dependencies and application diagnostics.

75 troubleshooting guides · Page 3 / 4

  1. Why does a timed-out CompletableFuture leave the underlying request running?

    Completing the promise exceptionally and stopping the work that produces it are separate mechanisms. A waiting deadline alone is not a resource-cancellation strategy.

  2. Why does a finished Java command-line job stay alive after submitting executor tasks?

    Task completion and executor lifecycle are different responsibilities. A pool owned by the command may still have worker threads after its jobs finish.

  3. Why is a managed Maven dependency missing from compilation?

    An entry in dependencyManagement is a version policy, not a request to put a library on this module’s classpath. This often surfaces when a parent knows a JSON library but its child imports unavailable classes.

  4. Why does a provided dependency disappear when running a JAR?

    Provided scope expresses an environment promise: compilation sees a dependency that the runtime is expected to supply. A plain command-line JAR does not automatically provide an application server’s APIs.

  5. Why does source/target compile successfully but fail on an older JRE?

    Syntax and class-file targets do not by themselves prove that only the older platform’s APIs were used. A newer build JDK can expose a method absent from the supported runtime.

  6. Why does Maven report success without running my newly named test?

    Test discovery has naming and engine rules. A file called `InvoiceChecks.java` may compile without matching the active Surefire inclusion configuration.

  7. Why does selecting a Java toolchain not fix the Gradle daemon JDK?

    The JVM running Gradle and the compiler toolchain can differ. Selecting Java 21 for compilation does not guarantee an old wrapper can run under the JDK launching its daemon.

  8. Why does JAVA_HOME differ from the compiler used by a Gradle task?

    A task with an explicit toolchain can use a compiler other than the shell’s JDK. That separation is useful, but makes `java -version` an incomplete diagnostic.

  9. Why is @Transactional ignored by a same-bean method call?

    In normal proxy-based transaction advice, a direct call through `this` does not re-enter the Spring proxy. An annotation can therefore exist while the expected boundary is absent.

  10. Why does a checked exception leave my Spring transaction committed?

    Rollback rules are policy, not simply the presence of an exception. With standard declarative defaults, a checked business exception may not trigger the rollback expected; applications can customize those defaults.

  11. How do I resolve two PaymentGateway beans without parameter-name assumptions?

    Two implementations create an ambiguous dependency unless a selection policy narrows candidates. Renaming a constructor parameter is a fragile expression of a business choice.

  12. Why is a sibling-package Spring service not discovered?

    Default component scanning starts in the application class’s package. A service outside that tree can be valid Java code yet absent from the context.

  13. Why does editing application.properties not change a deployed setting?

    Configuration has precedence. A launch argument, environment variable or external file may override the packaged value. Editing a lower-priority file then appears ineffective.

  14. How do I reject an invalid timeout configuration before serving requests?

    A value can bind successfully yet be operationally invalid, such as a negative connection timeout. Scattered string parsing delays failure until an unlucky request.

  15. Why does a prototype dependency act like a singleton inside my service?

    A prototype injected once into a singleton is resolved at that injection point. The containing service does not receive a fresh instance on every method call automatically.

  16. Why do concurrent requests overwrite a Spring service field?

    A singleton service is shared across requests. Storing the current invoice in an instance field shares that state even when controller invocations look independent.

  17. Why does @Async still execute on the caller thread?

    Async annotations require enabled infrastructure and an intercepted call. A same-object call can bypass the proxy; a manually created object is not a managed async bean.

  18. Why does a scheduled import overlap its previous execution?

    Schedule semantics, executor capacity and multiple application instances are separate factors. A larger timer interval does not create a distributed exclusion guarantee.

  19. Why is advice absent from a final method on a class-based proxy?

    A class-based proxy must override an intercepted method. A final method blocks that override; an annotation cannot make this proxy rewrite it.

  20. Why is the wrong Spring profile active only in production?

    Profile activation can originate in deployment rather than the package. A stale launch variable may keep an unexpected profile active after a file is edited.

  21. Why does @Transactional not cover work launched on another thread?

    For ordinary imperative transaction management, transaction context belongs to execution on the calling thread. Launching a worker does not automatically carry its database transaction.

  22. Why is transactional initialization unreliable in @PostConstruct?

    Initialization occurs while a bean is being created, before ordinary use through its completed proxy boundary. Self-invoked transactional initialization mixes lifecycle and interception assumptions.

  23. Why does @Primary fix one injection but change unrelated services?

    Primary supplies a default preference for type-based selection, not a local instruction to one constructor. A newly primary implementation can redirect other unqualified dependencies.

  24. Why does an overridden configuration list replace rather than extend entries?

    Binding merge behavior depends on property shape. Treating a higher-priority list as individual patches to the lower-priority list can remove rules or change order unexpectedly.

Ask your own question · Sign in to post questions and answers.