Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-5539

nb-javac "Compile on Save" causes "cannot find symbol" for types that are present



    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 12.3
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:


      What I did:

      1. Clean install of NetBeans 12.3
      2. Installed nb-javac as recommended, restarted NetBeans
      3. Cloned https://github.com/keycloak/keycloak.git (13.0.0-SNAPSHOT) from within NetBeans
      4. Opened the parent project
      5. Did "Clean and Build" of the whole project (success)
      6. Expanded "Modules", all looks fine
      7. Opened module "Keycloak REST Services": "Background scanning of projects..." takes a long time and there are constantly occurring "Unexpected Exception" (some NPE but it is impossible to select one because they are being replaced by a new occurrence all the time)
      8. Opened the attached project "netbeans-test"

      Expected behaviour:

      • All projects open without error

      Observed behaviour:

      • When opening the module "Keycloak REST Services" is complete, there are several "cannot find symbol" errors for types that are actually present, for example DefaultVaultTranscriber in VaultTranscriberTest (see screenshot)
      • In the project "netbeans-test", in NetBeansTest.java, the import org.keycloak.crypto.ES256SignatureProviderFactory as well has "cannot find symbol" and content-assist for the package org.keycloak.crypto only shows a subset of the types that actually are in the package


      Disabling "Compile on Save", deleting the cache in ~/.cache/netbeans, rebuilding the project, restarting NetBeans etc. does not solve the issue.

      "Uninstalling" nb-javac by deleting ~/.netbeans/12.3/modules and restarting NetBeans solves the problem, but then of course "Compile on Save" with all its advantages is not available any more.

      Then nb-javac can be installed and "Compile on Save" enabled again - no errors show up (but might occur again later?)

      Additional information:

      In NetBeans 12.4 Beta 1 "Compile on Save" can be enabled and works without installing nb-javac: Compile on Save support for vanilla javac.


        1. netbeans-test.tar.gz
          0.9 kB
          Torsten Römer
        2. VaultTranscriberTest.png
          187 kB
          Torsten Römer

          Issue Links



              • Assignee:
                dode Torsten Römer
              • Votes:
                0 Vote for this issue
                1 Start watching this issue


                • Created: