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

Gradle Distribution Needs to be Installed to Load Gradle Projects

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 11.0
    • 11.0
    • projects - Gradle

    Description

      I generated a basic Spring Boot gradle project on http://start.spring.io (choose gradle project type then press generate, unzip downloaded archive).

      I opened the generated project in NB11.

      The following exception pops-up almost immediately after opening:

      java.lang.NullPointerException: The file parameter cannot be null
      at org.openide.util.Parameters.notNull(Parameters.java:64)
      at org.openide.filesystems.FileUtil.toFileObject(FileUtil.java:853)
      at org.netbeans.modules.gradle.queries.GradleSourceForBinary.findSourceRoots2(GradleSourceForBinary.java:59)
      at org.netbeans.api.java.queries.SourceForBinaryQuery.findSourceRoots2(SourceForBinaryQuery.java:101)
      at org.netbeans.modules.parsing.impl.indexing.PathRegistry.createResources(PathRegistry.java:728)
      at org.netbeans.modules.parsing.impl.indexing.PathRegistry.getSources(PathRegistry.java:275)
      at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$RootsWork.getDone(RepositoryUpdater.java:4888)
      at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$InitialRootsWork.getDone(RepositoryUpdater.java:5821)
      [catch] at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.doTheWork(RepositoryUpdater.java:3420)
      at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task._run(RepositoryUpdater.java:6183)
      at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task.access$4300(RepositoryUpdater.java:5834)
      at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2$1.run(RepositoryUpdater.java:6099)
      at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279)
      at org.netbeans.modules.parsing.impl.RunWhenScanFinishedSupport.performScan(RunWhenScanFinishedSupport.java:83)
      at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2.call(RepositoryUpdater.java:6095)
      at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2.call(RepositoryUpdater.java:6091)
      at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:153)
      at org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:335)
      at org.netbeans.modules.parsing.nb.DataObjectEnvFactory.runPriorityIO(DataObjectEnvFactory.java:118)
      at org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Utilities.java:67)
      at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task.run(RepositoryUpdater.java:6091)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      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)
      

      The resulting project is unloadable and unbuildable.

      A notification is also generated with a warning telling:

      null
      Could not run build action using Gradle installation 'null'

      The latter may be a distinct problem.

      On the console there is also another exception thrown (reporting essential part):

      SEVERE [org.openide.util.RequestProcessor]: Error in RequestProcessor org.netbeans.modules.parsing.ui.indexing.errors.ErrorAnnotator$1
      java.lang.NullPointerException
      at org.netbeans.modules.gradle.classpath.AbstractGradleScriptClassPath.getResources(AbstractGradleScriptClassPath.java:107)
      at org.netbeans.api.java.classpath.ClassPath.entries(ClassPath.java:363)
      at org.netbeans.api.java.classpath.ClassPath.getRoots(ClassPath.java:248)
      at org.netbeans.api.java.classpath.ClassPath.findOwnerRoot(ClassPath.java:544)
      at org.netbeans.modules.parsing.impl.indexing.errors.Utilities.getSourceClassPathFor(Utilities.java:65)
      at org.netbeans.modules.parsing.impl.indexing.errors.TaskCache.computePersistentFile(TaskCache.java:434)
      at org.netbeans.modules.parsing.impl.indexing.errors.TaskCache.getErrors(TaskCache.java:119)
      at org.netbeans.modules.parsing.impl.indexing.errors.TaskCache.isInError(TaskCache.java:359)
      at org.netbeans.modules.parsing.ui.indexing.errors.ErrorAnnotator$1.run(ErrorAnnotator.java:286)
      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: org.openide.util.RequestProcessor$SlowItem: task failed due to
      at org.openide.util.RequestProcessor$Task.schedule(RequestProcessor.java:1459)
      at org.netbeans.modules.parsing.ui.indexing.errors.ErrorAnnotator.enqueue(ErrorAnnotator.java:230)
      

      Attachments

        Issue Links

          Activity

            People

              lkishalmi Laszlo Kishalmi
              AlexFalappa Alessandro Falappa
              Votes:
              0 Vote for this issue
              Watchers:
              2 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 - 0.5h
                  0.5h