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

NPE when launching VSCode extension on JDK8

    XMLWordPrintableJSON

Details

    Description

      When launching 12.2beta3 VSCode extension  with JDK8 following error is raised:

      Exit code 0[Error - 8:23:34] Server initialization failed.  Message: Internal error.  Code: -32603 java.util.concurrent.CompletionException: java.lang.NullPointerException    at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273)    at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280)    at java.util.concurrent.CompletableFuture.uniRun(CompletableFuture.java:708)    at java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:687)    at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)    at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1962)    at org.netbeans.modules.java.lsp.server.protocol.Server$LanguageServerImpl.asyncOpenSelectedProjects(Server.java:210)    at org.netbeans.modules.java.lsp.server.protocol.Server$LanguageServerImpl.lambda$initialize$1(Server.java:276)    at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)    at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)    at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)    at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)Caused by: java.lang.NullPointerException    at org.netbeans.modules.java.lsp.server.protocol.Server$LanguageServerImpl.showIndexingCompleted(Server.java:219)    at java.util.concurrent.CompletableFuture.uniRun(CompletableFuture.java:705) 

      This is very likely due to missing nbjavac. Try:

      netbeans/java/java.lsp.server/vscode$ npm run nbcode -- --jdkhome /jdk1.8.0/ -J-Dnetbeans.logger.console=true
      

      followed by

      netbeans/java/java.lsp.server/vscode$ code --extensionDevelopmentPath=`pwd` ~/tmp/withcontrol/
      

      Attachments

        Issue Links

          Activity

            People

              jlahoda Jan Lahoda
              jtulach Jaroslav Tulach
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 40m
                  1h 40m